mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-14 15:56:48 +03:00
Rename Validator\Validator to Validator\GenericValidator
This commit is contained in:
+2
-2
@@ -40,7 +40,7 @@ use Ramsey\Uuid\Provider\Node\SystemNodeProvider;
|
||||
use Ramsey\Uuid\Provider\NodeProviderInterface;
|
||||
use Ramsey\Uuid\Provider\Time\SystemTimeProvider;
|
||||
use Ramsey\Uuid\Provider\TimeProviderInterface;
|
||||
use Ramsey\Uuid\Validator\Validator;
|
||||
use Ramsey\Uuid\Validator\GenericValidator;
|
||||
use Ramsey\Uuid\Validator\ValidatorInterface;
|
||||
|
||||
/**
|
||||
@@ -147,7 +147,7 @@ class FeatureSet
|
||||
$this->nodeProvider = $this->buildNodeProvider();
|
||||
$this->randomGenerator = $this->buildRandomGenerator();
|
||||
$this->setTimeProvider(new SystemTimeProvider());
|
||||
$this->validator = new Validator();
|
||||
$this->validator = new GenericValidator();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,9 +17,9 @@ namespace Ramsey\Uuid\Validator;
|
||||
use Ramsey\Uuid\Uuid;
|
||||
|
||||
/**
|
||||
* Validator validates strings as UUIDs of any variant
|
||||
* GenericValidator validates strings as UUIDs of any variant
|
||||
*/
|
||||
class Validator implements ValidatorInterface
|
||||
class GenericValidator implements ValidatorInterface
|
||||
{
|
||||
/**
|
||||
* Regular expression pattern for matching a UUID of any variant.
|
||||
+2
-2
@@ -30,7 +30,7 @@ use Ramsey\Uuid\Type\Time;
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Ramsey\Uuid\UuidFactory;
|
||||
use Ramsey\Uuid\UuidInterface;
|
||||
use Ramsey\Uuid\Validator\Validator;
|
||||
use Ramsey\Uuid\Validator\GenericValidator;
|
||||
use Ramsey\Uuid\Validator\ValidatorInterface;
|
||||
use stdClass;
|
||||
|
||||
@@ -874,7 +874,7 @@ class UuidTest extends TestCase
|
||||
$this->assertTrue(Uuid::isValid($argument));
|
||||
|
||||
// reset the static validator
|
||||
$factory->setValidator(new Validator());
|
||||
$factory->setValidator(new GenericValidator());
|
||||
}
|
||||
|
||||
public function testUsingNilAsValidUuid(): void
|
||||
|
||||
@@ -6,19 +6,19 @@ namespace Ramsey\Uuid\Test\Validator;
|
||||
|
||||
use PHPUnit\Framework\MockObject\MockObject;
|
||||
use Ramsey\Uuid\Test\TestCase;
|
||||
use Ramsey\Uuid\Validator\Validator;
|
||||
use Ramsey\Uuid\Validator\GenericValidator;
|
||||
|
||||
class ValidatorTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var MockObject & Validator
|
||||
* @var MockObject & GenericValidator
|
||||
*/
|
||||
private $validator = null;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
// Disable calls to the constructor, but do not override any methods.
|
||||
$this->validator = $this->getMockBuilder(Validator::class)
|
||||
$this->validator = $this->getMockBuilder(GenericValidator::class)
|
||||
->disableOriginalConstructor()
|
||||
->onlyMethods([])
|
||||
->getMock();
|
||||
|
||||
Reference in New Issue
Block a user