mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-14 15:56:48 +03:00
Add uuid PECL stubs
This commit is contained in:
+2
-21
@@ -3,27 +3,8 @@
|
||||
|
||||
use AspectMock\Kernel;
|
||||
|
||||
include __DIR__ . '/../vendor/autoload.php'; // composer autoload
|
||||
|
||||
if (!function_exists('uuid_create')) {
|
||||
// Create stub of method so AspectMock can mock this function
|
||||
// if it doesn't exist in PHP.
|
||||
function uuid_create($type) {}
|
||||
}
|
||||
|
||||
if (!function_exists('uuid_parse')) {
|
||||
// Create stub of method so AspectMock can mock this function
|
||||
// if it doesn't exist in PHP.
|
||||
function uuid_parse($uuid) {}
|
||||
}
|
||||
|
||||
if (!defined('UUID_TYPE_TIME')) {
|
||||
define('UUID_TYPE_TIME', 1);
|
||||
}
|
||||
|
||||
if (!defined('UUID_TYPE_RANDOM')) {
|
||||
define('UUID_TYPE_RANDOM', 4);
|
||||
}
|
||||
require_once __DIR__ . '/../vendor/autoload.php'; // composer autoload
|
||||
require_once __DIR__ . '/phpstan-bootstrap.php';
|
||||
|
||||
$kernel = Kernel::getInstance();
|
||||
$kernel->init([
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
if (!function_exists('uuid_create')) {
|
||||
/**
|
||||
* @param int $type
|
||||
* @return string
|
||||
*/
|
||||
function uuid_create($type = 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('uuid_parse')) {
|
||||
/**
|
||||
* @param string $uuid
|
||||
* @return string
|
||||
*/
|
||||
function uuid_parse($uuid)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
if (!defined('UUID_TYPE_TIME')) {
|
||||
define('UUID_TYPE_TIME', 1);
|
||||
}
|
||||
|
||||
if (!defined('UUID_TYPE_RANDOM')) {
|
||||
define('UUID_TYPE_RANDOM', 4);
|
||||
}
|
||||
Reference in New Issue
Block a user