Rename Validator\Validator to Validator\GenericValidator

This commit is contained in:
Ben Ramsey
2020-01-13 16:08:29 -06:00
parent 2ad77d9ca7
commit 5d1f106882
4 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -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
View File
@@ -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
+3 -3
View File
@@ -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();