From 87779dfcbaab9074dd6ba1f0aefb89f358f7eb0e Mon Sep 17 00:00:00 2001 From: Massimiliano Braglia Date: Mon, 6 Apr 2020 16:52:41 +0200 Subject: [PATCH] Style fix --- src/Builder.php | 4 ++-- src/Collection/CollectionInterface.php | 2 +- src/Configuration.php | 6 +++--- src/DocumentManager.php | 10 +++++----- src/DocumentManagerInterface.php | 4 ++-- src/Geotools/Coordinate/Coordinate.php | 6 ++---- src/Hydrator/Internal/ProxyInstantiator.php | 2 +- src/Id/AssignedIdGenerator.php | 5 +---- src/Metadata/Loader/AnnotationLoader.php | 4 ++-- src/Metadata/MetadataFactory.php | 2 +- src/Metadata/Processor/DocumentIdProcessor.php | 6 +++--- src/Metadata/Processor/DocumentProcessor.php | 4 ++-- src/Metadata/Processor/FieldProcessor.php | 4 ++-- src/Metadata/Processor/IndexNameProcessor.php | 4 ++-- src/Metadata/Processor/IndexProcessor.php | 4 ++-- src/Metadata/Processor/SettingProcessor.php | 4 ++-- src/Metadata/Processor/TypeNameProcessor.php | 4 ++-- src/UnitOfWork.php | 2 +- tests/Collection/CollectionTest.php | 4 ++-- tests/Collection/DatabaseTest.php | 4 ++-- tests/Command/DropSchemaCommandTest.php | 2 +- tests/DocumentManagerTest.php | 4 ++-- tests/Hydrator/ObjectHydratorTest.php | 8 ++++---- tests/Internal/DocumentGraphTest.php | 2 +- tests/Metadata/Processor/DocumentIdProcessorTest.php | 4 ++-- tests/Metadata/Processor/IndexProcessorTest.php | 2 +- tests/Traits/DocumentManagerTestTrait.php | 2 +- tests/Type/AbstractDoctrineTypeTest.php | 4 ++-- tests/Type/AbstractPrimitiveTypeTest.php | 2 +- tests/Type/CompletionTypeTest.php | 2 +- tests/Type/GeoPointTypeTest.php | 2 +- tests/Type/PercolatorTypeTest.php | 2 +- tests/Type/RawTypeTest.php | 2 +- tests/Type/TypeManagerTest.php | 4 ++-- 34 files changed, 61 insertions(+), 66 deletions(-) diff --git a/src/Builder.php b/src/Builder.php index b8ad64e..1d7a9a4 100644 --- a/src/Builder.php +++ b/src/Builder.php @@ -3,13 +3,13 @@ namespace Refugis\ODM\Elastica; use Elastica\Client; +use ProxyManager\Factory\LazyLoadingGhostFactory; +use Psr\Log\LoggerInterface; use Refugis\ODM\Elastica\Collection\Database; use Refugis\ODM\Elastica\Metadata\Loader; use Refugis\ODM\Elastica\Metadata\MetadataFactory; use Refugis\ODM\Elastica\Type\TypeInterface; use Refugis\ODM\Elastica\Type\TypeManager; -use ProxyManager\Factory\LazyLoadingGhostFactory; -use Psr\Log\LoggerInterface; final class Builder { diff --git a/src/Collection/CollectionInterface.php b/src/Collection/CollectionInterface.php index 2f51be4..d4db749 100644 --- a/src/Collection/CollectionInterface.php +++ b/src/Collection/CollectionInterface.php @@ -96,7 +96,7 @@ public function delete(string $id): void; * for the limitations of this method and the available parameters. * * @param Query\AbstractQuery $query - * @param array $params + * @param array $params */ public function deleteByQuery(Query\AbstractQuery $query, array $params = []): void; diff --git a/src/Configuration.php b/src/Configuration.php index 8856374..ec9aff6 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -2,15 +2,15 @@ namespace Refugis\ODM\Elastica; +use Kcs\Metadata\Factory\MetadataFactoryInterface; +use ProxyManager\Factory\LazyLoadingGhostFactory; +use Psr\Cache\CacheItemPoolInterface; use Refugis\ODM\Elastica\Exception\InvalidDocumentRepositoryException; use Refugis\ODM\Elastica\Repository\DefaultRepositoryFactory; use Refugis\ODM\Elastica\Repository\DocumentRepository; use Refugis\ODM\Elastica\Repository\DocumentRepositoryInterface; use Refugis\ODM\Elastica\Repository\RepositoryFactoryInterface; use Refugis\ODM\Elastica\Type\TypeManager; -use Kcs\Metadata\Factory\MetadataFactoryInterface; -use ProxyManager\Factory\LazyLoadingGhostFactory; -use Psr\Cache\CacheItemPoolInterface; final class Configuration { diff --git a/src/DocumentManager.php b/src/DocumentManager.php index f1bafc6..766c491 100644 --- a/src/DocumentManager.php +++ b/src/DocumentManager.php @@ -4,6 +4,11 @@ use Doctrine\Common\EventManager; use Elastica\Query; +use Kcs\Metadata\Factory\MetadataFactoryInterface; +use ProxyManager\Factory\LazyLoadingGhostFactory; +use ProxyManager\Proxy\LazyLoadingInterface; +use ProxyManager\Proxy\ProxyInterface; +use Psr\Cache\CacheItemPoolInterface; use Refugis\ODM\Elastica\Collection\CollectionInterface; use Refugis\ODM\Elastica\Collection\DatabaseInterface; use Refugis\ODM\Elastica\Hydrator\HydratorInterface; @@ -16,11 +21,6 @@ use Refugis\ODM\Elastica\Search\Search; use Refugis\ODM\Elastica\Type\TypeManager; use Refugis\ODM\Elastica\Util\ClassUtil; -use Kcs\Metadata\Factory\MetadataFactoryInterface; -use ProxyManager\Factory\LazyLoadingGhostFactory; -use ProxyManager\Proxy\LazyLoadingInterface; -use ProxyManager\Proxy\ProxyInterface; -use Psr\Cache\CacheItemPoolInterface; class DocumentManager implements DocumentManagerInterface { diff --git a/src/DocumentManagerInterface.php b/src/DocumentManagerInterface.php index b7f90d1..17825d8 100644 --- a/src/DocumentManagerInterface.php +++ b/src/DocumentManagerInterface.php @@ -4,13 +4,13 @@ use Doctrine\Common\EventManager; use Doctrine\Common\Persistence\ObjectManager; +use ProxyManager\Factory\LazyLoadingGhostFactory; +use Psr\Cache\CacheItemPoolInterface; use Refugis\ODM\Elastica\Collection\CollectionInterface; use Refugis\ODM\Elastica\Collection\DatabaseInterface; use Refugis\ODM\Elastica\Hydrator\HydratorInterface; use Refugis\ODM\Elastica\Search\Search; use Refugis\ODM\Elastica\Type\TypeManager; -use ProxyManager\Factory\LazyLoadingGhostFactory; -use Psr\Cache\CacheItemPoolInterface; interface DocumentManagerInterface extends ObjectManager { diff --git a/src/Geotools/Coordinate/Coordinate.php b/src/Geotools/Coordinate/Coordinate.php index 3650646..6036c35 100644 --- a/src/Geotools/Coordinate/Coordinate.php +++ b/src/Geotools/Coordinate/Coordinate.php @@ -126,7 +126,7 @@ public function getLongitude(): float public function setFromString($coordinates) { if (! \is_string($coordinates)) { - throw new \InvalidArgumentException('The given coordinates should be a string !'); + throw new \InvalidArgumentException('The given coordinates should be a string!'); } $inDecimalDegree = $this->toDecimalDegrees($coordinates); @@ -199,9 +199,7 @@ private function toDecimalDegrees($coordinates) ]; } - throw new \InvalidArgumentException( - 'It should be a valid and acceptable ways to write geographic coordinates !' - ); + throw new \InvalidArgumentException('It should be a valid and acceptable ways to write geographic coordinates !'); } /** diff --git a/src/Hydrator/Internal/ProxyInstantiator.php b/src/Hydrator/Internal/ProxyInstantiator.php index f36de52..5a084d6 100644 --- a/src/Hydrator/Internal/ProxyInstantiator.php +++ b/src/Hydrator/Internal/ProxyInstantiator.php @@ -3,10 +3,10 @@ namespace Refugis\ODM\Elastica\Hydrator\Internal; use Doctrine\Instantiator\InstantiatorInterface; +use ProxyManager\Proxy\GhostObjectInterface; use Refugis\ODM\Elastica\DocumentManagerInterface; use Refugis\ODM\Elastica\Metadata\DocumentMetadata; use Refugis\ODM\Elastica\Metadata\FieldMetadata; -use ProxyManager\Proxy\GhostObjectInterface; class ProxyInstantiator implements InstantiatorInterface { diff --git a/src/Id/AssignedIdGenerator.php b/src/Id/AssignedIdGenerator.php index d9ea272..90a30f7 100644 --- a/src/Id/AssignedIdGenerator.php +++ b/src/Id/AssignedIdGenerator.php @@ -19,10 +19,7 @@ public function generate(DocumentManagerInterface $dm, $document) $id = $class->getSingleIdentifier($document); if (null === $id) { - throw new InvalidIdentifierException( - 'Document of type "'.$class->name.'" is missing an assigned ID.'. - 'NONE generator strategy requires the ID field to be populated before persist is called.' - ); + throw new InvalidIdentifierException('Document of type "'.$class->name.'" is missing an assigned ID.'.'NONE generator strategy requires the ID field to be populated before persist is called.'); } return $id; diff --git a/src/Metadata/Loader/AnnotationLoader.php b/src/Metadata/Loader/AnnotationLoader.php index bb8476c..7c1f6a8 100644 --- a/src/Metadata/Loader/AnnotationLoader.php +++ b/src/Metadata/Loader/AnnotationLoader.php @@ -2,12 +2,12 @@ namespace Refugis\ODM\Elastica\Metadata\Loader; -use Refugis\ODM\Elastica\Annotation\Document; -use Refugis\ODM\Elastica\Metadata\FieldMetadata; use Kcs\ClassFinder\Finder\RecursiveFinder; use Kcs\Metadata\ClassMetadataInterface; use Kcs\Metadata\Loader\AnnotationProcessorLoader; use Kcs\Metadata\Loader\Processor\ProcessorFactoryInterface; +use Refugis\ODM\Elastica\Annotation\Document; +use Refugis\ODM\Elastica\Metadata\FieldMetadata; class AnnotationLoader extends AnnotationProcessorLoader implements LoaderInterface { diff --git a/src/Metadata/MetadataFactory.php b/src/Metadata/MetadataFactory.php index a7dbe3b..762d3e5 100644 --- a/src/Metadata/MetadataFactory.php +++ b/src/Metadata/MetadataFactory.php @@ -4,10 +4,10 @@ use Doctrine\Common\EventManager; use Doctrine\Common\Persistence\Mapping\ClassMetadataFactory; -use Refugis\ODM\Elastica\Metadata\Loader\LoaderInterface; use Kcs\Metadata\ClassMetadataInterface; use Kcs\Metadata\Exception\InvalidMetadataException; use Kcs\Metadata\Factory\AbstractMetadataFactory; +use Refugis\ODM\Elastica\Metadata\Loader\LoaderInterface; class MetadataFactory extends AbstractMetadataFactory implements ClassMetadataFactory { diff --git a/src/Metadata/Processor/DocumentIdProcessor.php b/src/Metadata/Processor/DocumentIdProcessor.php index c44f119..b4548a9 100644 --- a/src/Metadata/Processor/DocumentIdProcessor.php +++ b/src/Metadata/Processor/DocumentIdProcessor.php @@ -2,12 +2,12 @@ namespace Refugis\ODM\Elastica\Metadata\Processor; -use Refugis\ODM\Elastica\Annotation\DocumentId; -use Refugis\ODM\Elastica\Metadata\DocumentMetadata; -use Refugis\ODM\Elastica\Metadata\FieldMetadata; use Kcs\Metadata\Loader\Processor\Annotation\Processor; use Kcs\Metadata\Loader\Processor\ProcessorInterface; use Kcs\Metadata\MetadataInterface; +use Refugis\ODM\Elastica\Annotation\DocumentId; +use Refugis\ODM\Elastica\Metadata\DocumentMetadata; +use Refugis\ODM\Elastica\Metadata\FieldMetadata; /** * @Processor(annotation=DocumentId::class) diff --git a/src/Metadata/Processor/DocumentProcessor.php b/src/Metadata/Processor/DocumentProcessor.php index 6790c7c..ed3cda4 100644 --- a/src/Metadata/Processor/DocumentProcessor.php +++ b/src/Metadata/Processor/DocumentProcessor.php @@ -2,11 +2,11 @@ namespace Refugis\ODM\Elastica\Metadata\Processor; -use Refugis\ODM\Elastica\Annotation\Document; -use Refugis\ODM\Elastica\Metadata\DocumentMetadata; use Kcs\Metadata\Loader\Processor\Annotation\Processor; use Kcs\Metadata\Loader\Processor\ProcessorInterface; use Kcs\Metadata\MetadataInterface; +use Refugis\ODM\Elastica\Annotation\Document; +use Refugis\ODM\Elastica\Metadata\DocumentMetadata; /** * @Processor(annotation=Document::class) diff --git a/src/Metadata/Processor/FieldProcessor.php b/src/Metadata/Processor/FieldProcessor.php index 15bf992..19dfb43 100644 --- a/src/Metadata/Processor/FieldProcessor.php +++ b/src/Metadata/Processor/FieldProcessor.php @@ -2,11 +2,11 @@ namespace Refugis\ODM\Elastica\Metadata\Processor; -use Refugis\ODM\Elastica\Annotation\Field; -use Refugis\ODM\Elastica\Metadata\FieldMetadata; use Kcs\Metadata\Loader\Processor\Annotation\Processor; use Kcs\Metadata\Loader\Processor\ProcessorInterface; use Kcs\Metadata\MetadataInterface; +use Refugis\ODM\Elastica\Annotation\Field; +use Refugis\ODM\Elastica\Metadata\FieldMetadata; /** * @Processor(annotation=Field::class) diff --git a/src/Metadata/Processor/IndexNameProcessor.php b/src/Metadata/Processor/IndexNameProcessor.php index 435cee9..41ac624 100644 --- a/src/Metadata/Processor/IndexNameProcessor.php +++ b/src/Metadata/Processor/IndexNameProcessor.php @@ -2,11 +2,11 @@ namespace Refugis\ODM\Elastica\Metadata\Processor; -use Refugis\ODM\Elastica\Annotation\IndexName; -use Refugis\ODM\Elastica\Metadata\FieldMetadata; use Kcs\Metadata\Loader\Processor\Annotation\Processor; use Kcs\Metadata\Loader\Processor\ProcessorInterface; use Kcs\Metadata\MetadataInterface; +use Refugis\ODM\Elastica\Annotation\IndexName; +use Refugis\ODM\Elastica\Metadata\FieldMetadata; /** * @Processor(annotation=IndexName::class) diff --git a/src/Metadata/Processor/IndexProcessor.php b/src/Metadata/Processor/IndexProcessor.php index d793b9b..312b717 100644 --- a/src/Metadata/Processor/IndexProcessor.php +++ b/src/Metadata/Processor/IndexProcessor.php @@ -2,11 +2,11 @@ namespace Refugis\ODM\Elastica\Metadata\Processor; -use Refugis\ODM\Elastica\Annotation\Index; -use Refugis\ODM\Elastica\Metadata\DocumentMetadata; use Kcs\Metadata\Loader\Processor\Annotation\Processor; use Kcs\Metadata\Loader\Processor\ProcessorInterface; use Kcs\Metadata\MetadataInterface; +use Refugis\ODM\Elastica\Annotation\Index; +use Refugis\ODM\Elastica\Metadata\DocumentMetadata; /** * @Processor(annotation=Index::class) diff --git a/src/Metadata/Processor/SettingProcessor.php b/src/Metadata/Processor/SettingProcessor.php index a92d290..f403a40 100644 --- a/src/Metadata/Processor/SettingProcessor.php +++ b/src/Metadata/Processor/SettingProcessor.php @@ -2,11 +2,11 @@ namespace Refugis\ODM\Elastica\Metadata\Processor; -use Refugis\ODM\Elastica\Annotation\Setting; -use Refugis\ODM\Elastica\Metadata\DocumentMetadata; use Kcs\Metadata\Loader\Processor\Annotation\Processor; use Kcs\Metadata\Loader\Processor\ProcessorInterface; use Kcs\Metadata\MetadataInterface; +use Refugis\ODM\Elastica\Annotation\Setting; +use Refugis\ODM\Elastica\Metadata\DocumentMetadata; /** * @Processor(annotation=Setting::class) diff --git a/src/Metadata/Processor/TypeNameProcessor.php b/src/Metadata/Processor/TypeNameProcessor.php index dea2edd..474055f 100644 --- a/src/Metadata/Processor/TypeNameProcessor.php +++ b/src/Metadata/Processor/TypeNameProcessor.php @@ -2,11 +2,11 @@ namespace Refugis\ODM\Elastica\Metadata\Processor; -use Refugis\ODM\Elastica\Annotation\TypeName; -use Refugis\ODM\Elastica\Metadata\FieldMetadata; use Kcs\Metadata\Loader\Processor\Annotation\Processor; use Kcs\Metadata\Loader\Processor\ProcessorInterface; use Kcs\Metadata\MetadataInterface; +use Refugis\ODM\Elastica\Annotation\TypeName; +use Refugis\ODM\Elastica\Metadata\FieldMetadata; /** * @Processor(annotation=TypeName::class) diff --git a/src/UnitOfWork.php b/src/UnitOfWork.php index f1929ae..77ddd5a 100644 --- a/src/UnitOfWork.php +++ b/src/UnitOfWork.php @@ -6,6 +6,7 @@ use Doctrine\Common\EventManager; use Doctrine\Common\Persistence\ObjectManagerAware; use Elastica\Document; +use ProxyManager\Proxy\LazyLoadingInterface; use Refugis\ODM\Elastica\Events\LifecycleEventManager; use Refugis\ODM\Elastica\Events\PreFlushEventArgs; use Refugis\ODM\Elastica\Exception\IndexNotFoundException; @@ -18,7 +19,6 @@ use Refugis\ODM\Elastica\Metadata\FieldMetadata; use Refugis\ODM\Elastica\Persister\DocumentPersister; use Refugis\ODM\Elastica\Util\ClassUtil; -use ProxyManager\Proxy\LazyLoadingInterface; final class UnitOfWork { diff --git a/tests/Collection/CollectionTest.php b/tests/Collection/CollectionTest.php index 29c533c..d18dcd6 100644 --- a/tests/Collection/CollectionTest.php +++ b/tests/Collection/CollectionTest.php @@ -10,6 +10,8 @@ use Elastica\Search as ElasticaSearch; use Elastica\Type; use Elasticsearch\Endpoints; +use PHPUnit\Framework\TestCase; +use Prophecy\Prophecy\ObjectProphecy; use Refugis\ODM\Elastica\Collection\Collection; use Refugis\ODM\Elastica\Collection\CollectionInterface; use Refugis\ODM\Elastica\DocumentManagerInterface; @@ -19,8 +21,6 @@ use Refugis\ODM\Elastica\Tests\Fixtures\Document\FooNoAutoCreate; use Refugis\ODM\Elastica\Tests\Traits\DocumentManagerTestTrait; use Refugis\ODM\Elastica\Tests\Traits\FixturesTestTrait; -use PHPUnit\Framework\TestCase; -use Prophecy\Prophecy\ObjectProphecy; class CollectionTest extends TestCase { diff --git a/tests/Collection/DatabaseTest.php b/tests/Collection/DatabaseTest.php index d1f352f..895e70a 100644 --- a/tests/Collection/DatabaseTest.php +++ b/tests/Collection/DatabaseTest.php @@ -4,10 +4,10 @@ use Elastica\Client; use Elastica\Index; -use Refugis\ODM\Elastica\Collection\Database; -use Refugis\ODM\Elastica\Metadata\DocumentMetadata; use PHPUnit\Framework\TestCase; use Prophecy\Prophecy\ObjectProphecy; +use Refugis\ODM\Elastica\Collection\Database; +use Refugis\ODM\Elastica\Metadata\DocumentMetadata; class DatabaseTest extends TestCase { diff --git a/tests/Command/DropSchemaCommandTest.php b/tests/Command/DropSchemaCommandTest.php index bf1057e..a2fabcf 100644 --- a/tests/Command/DropSchemaCommandTest.php +++ b/tests/Command/DropSchemaCommandTest.php @@ -2,10 +2,10 @@ namespace Refugis\ODM\Elastica\Tests\Command; +use PHPUnit\Framework\TestCase; use Refugis\ODM\Elastica\Command\DropSchemaCommand; use Refugis\ODM\Elastica\Tests\Traits\DocumentManagerTestTrait; use Refugis\ODM\Elastica\Tests\Traits\FixturesTestTrait; -use PHPUnit\Framework\TestCase; use Symfony\Component\Console\Tester\CommandTester; class DropSchemaCommandTest extends TestCase diff --git a/tests/DocumentManagerTest.php b/tests/DocumentManagerTest.php index 4888cb0..6e73bbb 100644 --- a/tests/DocumentManagerTest.php +++ b/tests/DocumentManagerTest.php @@ -4,6 +4,8 @@ use Elastica\Index; use Elastica\Type; +use PHPUnit\Framework\TestCase; +use ProxyManager\Proxy\ProxyInterface; use Refugis\ODM\Elastica\DocumentManager; use Refugis\ODM\Elastica\Geotools\Coordinate\Coordinate; use Refugis\ODM\Elastica\Tests\Fixtures\Document\Foo; @@ -12,8 +14,6 @@ use Refugis\ODM\Elastica\Tests\Traits\DocumentManagerTestTrait; use Refugis\ODM\Elastica\Tests\Traits\FixturesTestTrait; use Refugis\ODM\Elastica\VarDumper\VarDumperTestTrait; -use PHPUnit\Framework\TestCase; -use ProxyManager\Proxy\ProxyInterface; /** * @group functional diff --git a/tests/Hydrator/ObjectHydratorTest.php b/tests/Hydrator/ObjectHydratorTest.php index bd28f30..8f8e0ac 100644 --- a/tests/Hydrator/ObjectHydratorTest.php +++ b/tests/Hydrator/ObjectHydratorTest.php @@ -9,6 +9,10 @@ use Elastica\Response; use Elastica\Result; use Elastica\ResultSet; +use PHPUnit\Framework\TestCase; +use Prophecy\Argument; +use Prophecy\Prophecy\ObjectProphecy; +use ProxyManager\Factory\LazyLoadingGhostFactory; use Refugis\ODM\Elastica\DocumentManagerInterface; use Refugis\ODM\Elastica\Hydrator\ObjectHydrator; use Refugis\ODM\Elastica\Metadata\DocumentMetadata; @@ -17,10 +21,6 @@ use Refugis\ODM\Elastica\Type\StringType; use Refugis\ODM\Elastica\Type\TypeManager; use Refugis\ODM\Elastica\UnitOfWork; -use PHPUnit\Framework\TestCase; -use Prophecy\Argument; -use Prophecy\Prophecy\ObjectProphecy; -use ProxyManager\Factory\LazyLoadingGhostFactory; class ObjectHydratorTest extends TestCase { diff --git a/tests/Internal/DocumentGraphTest.php b/tests/Internal/DocumentGraphTest.php index 02528f5..9ce7a66 100644 --- a/tests/Internal/DocumentGraphTest.php +++ b/tests/Internal/DocumentGraphTest.php @@ -2,11 +2,11 @@ namespace Refugis\ODM\Elastica\Tests\Internal; +use PHPUnit\Framework\TestCase; use Refugis\ODM\Elastica\Internal\DocumentGraph; use Refugis\ODM\Elastica\Internal\DocumentGraphEdge; use Refugis\ODM\Elastica\Internal\DocumentGraphNode; use Refugis\ODM\Elastica\Tests\Fixtures\Document\Foo; -use PHPUnit\Framework\TestCase; class DocumentGraphTest extends TestCase { diff --git a/tests/Metadata/Processor/DocumentIdProcessorTest.php b/tests/Metadata/Processor/DocumentIdProcessorTest.php index bb0acbc..8fdf76a 100644 --- a/tests/Metadata/Processor/DocumentIdProcessorTest.php +++ b/tests/Metadata/Processor/DocumentIdProcessorTest.php @@ -2,13 +2,13 @@ namespace Refugis\ODM\Elastica\Tests\Metadata\Processor; +use PHPUnit\Framework\TestCase; +use Prophecy\Prophecy\ObjectProphecy; use Refugis\ODM\Elastica\Annotation\DocumentId; use Refugis\ODM\Elastica\Metadata\DocumentMetadata; use Refugis\ODM\Elastica\Metadata\FieldMetadata; use Refugis\ODM\Elastica\Metadata\Processor\DocumentIdProcessor; use Refugis\ODM\Elastica\Tests\Fixtures\Document\Foo; -use PHPUnit\Framework\TestCase; -use Prophecy\Prophecy\ObjectProphecy; class DocumentIdProcessorTest extends TestCase { diff --git a/tests/Metadata/Processor/IndexProcessorTest.php b/tests/Metadata/Processor/IndexProcessorTest.php index a7d8e5c..72e09c4 100644 --- a/tests/Metadata/Processor/IndexProcessorTest.php +++ b/tests/Metadata/Processor/IndexProcessorTest.php @@ -3,6 +3,7 @@ namespace Refugis\ODM\Elastica\Tests\Metadata\Processor; use Elastica\Type\Mapping; +use PHPUnit\Framework\TestCase; use Refugis\ODM\Elastica\Annotation\Analyzer; use Refugis\ODM\Elastica\Annotation\Filter; use Refugis\ODM\Elastica\Annotation\Index; @@ -11,7 +12,6 @@ use Refugis\ODM\Elastica\Metadata\Processor\IndexProcessor; use Refugis\ODM\Elastica\Tests\Fixtures\Document\Foo; use Refugis\ODM\Elastica\Tests\Traits\DocumentManagerTestTrait; -use PHPUnit\Framework\TestCase; class IndexProcessorTest extends TestCase { diff --git a/tests/Traits/DocumentManagerTestTrait.php b/tests/Traits/DocumentManagerTestTrait.php index 1b60cd5..4679fe9 100644 --- a/tests/Traits/DocumentManagerTestTrait.php +++ b/tests/Traits/DocumentManagerTestTrait.php @@ -3,10 +3,10 @@ namespace Refugis\ODM\Elastica\Tests\Traits; use Doctrine\Common\Annotations\AnnotationReader; +use Kcs\Metadata\Loader\Processor\ProcessorFactory; use Refugis\ODM\Elastica\Builder; use Refugis\ODM\Elastica\DocumentManagerInterface; use Refugis\ODM\Elastica\Metadata\Loader\AnnotationLoader; -use Kcs\Metadata\Loader\Processor\ProcessorFactory; trait DocumentManagerTestTrait { diff --git a/tests/Type/AbstractDoctrineTypeTest.php b/tests/Type/AbstractDoctrineTypeTest.php index f874385..da605a9 100644 --- a/tests/Type/AbstractDoctrineTypeTest.php +++ b/tests/Type/AbstractDoctrineTypeTest.php @@ -4,10 +4,10 @@ use Doctrine\Common\Persistence\ManagerRegistry; use Doctrine\Common\Persistence\ObjectManager; -use Refugis\ODM\Elastica\Tests\Fixtures\Type\TestDoctrineType; -use Refugis\ODM\Elastica\Type\TypeInterface; use PHPUnit\Framework\TestCase; use Prophecy\Prophecy\ObjectProphecy; +use Refugis\ODM\Elastica\Tests\Fixtures\Type\TestDoctrineType; +use Refugis\ODM\Elastica\Type\TypeInterface; class AbstractDoctrineTypeTest extends TestCase implements TypeTestInterface { diff --git a/tests/Type/AbstractPrimitiveTypeTest.php b/tests/Type/AbstractPrimitiveTypeTest.php index f3837a1..26949b1 100644 --- a/tests/Type/AbstractPrimitiveTypeTest.php +++ b/tests/Type/AbstractPrimitiveTypeTest.php @@ -2,8 +2,8 @@ namespace Refugis\ODM\Elastica\Tests\Type; -use Refugis\ODM\Elastica\Type\TypeInterface; use PHPUnit\Framework\TestCase; +use Refugis\ODM\Elastica\Type\TypeInterface; abstract class AbstractPrimitiveTypeTest extends TestCase { diff --git a/tests/Type/CompletionTypeTest.php b/tests/Type/CompletionTypeTest.php index 436346a..afed998 100644 --- a/tests/Type/CompletionTypeTest.php +++ b/tests/Type/CompletionTypeTest.php @@ -2,10 +2,10 @@ namespace Refugis\ODM\Elastica\Tests\Type; +use PHPUnit\Framework\TestCase; use Refugis\ODM\Elastica\Completion; use Refugis\ODM\Elastica\Type\CompletionType; use Refugis\ODM\Elastica\Type\TypeInterface; -use PHPUnit\Framework\TestCase; class CompletionTypeTest extends TestCase { diff --git a/tests/Type/GeoPointTypeTest.php b/tests/Type/GeoPointTypeTest.php index b888700..2dc3908 100644 --- a/tests/Type/GeoPointTypeTest.php +++ b/tests/Type/GeoPointTypeTest.php @@ -2,10 +2,10 @@ namespace Refugis\ODM\Elastica\Tests\Type; +use PHPUnit\Framework\TestCase; use Refugis\ODM\Elastica\Geotools\Coordinate\Coordinate; use Refugis\ODM\Elastica\Type\GeoPointType; use Refugis\ODM\Elastica\Type\TypeInterface; -use PHPUnit\Framework\TestCase; class GeoPointTypeTest extends TestCase { diff --git a/tests/Type/PercolatorTypeTest.php b/tests/Type/PercolatorTypeTest.php index 5cfd408..70e47a8 100644 --- a/tests/Type/PercolatorTypeTest.php +++ b/tests/Type/PercolatorTypeTest.php @@ -4,9 +4,9 @@ use Elastica\Query; use Elastica\Query\Match; +use PHPUnit\Framework\TestCase; use Refugis\ODM\Elastica\Type\PercolatorType; use Refugis\ODM\Elastica\Type\TypeInterface; -use PHPUnit\Framework\TestCase; class PercolatorTypeTest extends TestCase { diff --git a/tests/Type/RawTypeTest.php b/tests/Type/RawTypeTest.php index d515205..1e9fa92 100644 --- a/tests/Type/RawTypeTest.php +++ b/tests/Type/RawTypeTest.php @@ -2,8 +2,8 @@ namespace Refugis\ODM\Elastica\Tests\Type; -use Refugis\ODM\Elastica\Type\RawType; use PHPUnit\Framework\TestCase; +use Refugis\ODM\Elastica\Type\RawType; class RawTypeTest extends TestCase { diff --git a/tests/Type/TypeManagerTest.php b/tests/Type/TypeManagerTest.php index e806895..6a54a5d 100644 --- a/tests/Type/TypeManagerTest.php +++ b/tests/Type/TypeManagerTest.php @@ -2,11 +2,11 @@ namespace Refugis\ODM\Elastica\Tests\Type; +use PHPUnit\Framework\TestCase; +use Prophecy\Prophecy\ObjectProphecy; use Refugis\ODM\Elastica\Exception\NoSuchTypeException; use Refugis\ODM\Elastica\Type\TypeInterface; use Refugis\ODM\Elastica\Type\TypeManager; -use PHPUnit\Framework\TestCase; -use Prophecy\Prophecy\ObjectProphecy; class TypeManagerTest extends TestCase {