diff --git a/app/Console/AbstractMappingCommand.php b/app/Console/AbstractMappingCommand.php index 10ea985f..51f0acb5 100644 --- a/app/Console/AbstractMappingCommand.php +++ b/app/Console/AbstractMappingCommand.php @@ -8,15 +8,9 @@ abstract class AbstractMappingCommand extends AbstractElasticSearchCommand { - /** - * @var string - */ - protected $indexName; + protected string $indexName; - /** - * @var string - */ - protected $documentType; + protected string $documentType; public function __construct(Client $client, string $indexName, string $documentType) { diff --git a/app/Console/AbstractReindexCommand.php b/app/Console/AbstractReindexCommand.php index 5f294c51..088b8771 100644 --- a/app/Console/AbstractReindexCommand.php +++ b/app/Console/AbstractReindexCommand.php @@ -15,25 +15,13 @@ abstract class AbstractReindexCommand extends AbstractElasticSearchCommand { - /** - * @var string - */ - private $readIndexName; - - /** - * @var string - */ - private $scrollTtl; - - /** - * @var int - */ - private $scrollSize; - - /** - * @var int - */ - private $bulkThreshold; + private string $readIndexName; + + private string $scrollTtl; + + private int $scrollSize; + + private int $bulkThreshold; private EventBus $eventBus; diff --git a/src/ElasticSearch/Aggregation/Aggregation.php b/src/ElasticSearch/Aggregation/Aggregation.php index 68d46f6c..497ee3e3 100644 --- a/src/ElasticSearch/Aggregation/Aggregation.php +++ b/src/ElasticSearch/Aggregation/Aggregation.php @@ -18,7 +18,7 @@ final class Aggregation /** * @var Bucket[] */ - private $buckets; + private array $buckets; /** * @param Bucket ...$buckets diff --git a/src/ElasticSearch/JsonDocument/Properties/Url.php b/src/ElasticSearch/JsonDocument/Properties/Url.php index ea486b9c..bde44825 100644 --- a/src/ElasticSearch/JsonDocument/Properties/Url.php +++ b/src/ElasticSearch/JsonDocument/Properties/Url.php @@ -10,10 +10,7 @@ final class Url { private string $url; - /** - * @var array - */ - private $urlParts; + private array $urlParts; public function __construct(string $url) { diff --git a/src/ElasticSearch/Operations/AbstractReindexUDB3CoreOperation.php b/src/ElasticSearch/Operations/AbstractReindexUDB3CoreOperation.php index 1f2e16fa..a92eb9a1 100644 --- a/src/ElasticSearch/Operations/AbstractReindexUDB3CoreOperation.php +++ b/src/ElasticSearch/Operations/AbstractReindexUDB3CoreOperation.php @@ -20,15 +20,9 @@ abstract class AbstractReindexUDB3CoreOperation extends AbstractElasticSearchOpe { private EventBus $eventBus; - /** - * @var string - */ - private $scrollTtl; + private string $scrollTtl; - /** - * @var int - */ - private $scrollSize; + private int $scrollSize; public function __construct( Client $client, diff --git a/src/Http/Offer/RequestParser/CompositeOfferRequestParser.php b/src/Http/Offer/RequestParser/CompositeOfferRequestParser.php index 8963988a..72d14e36 100644 --- a/src/Http/Offer/RequestParser/CompositeOfferRequestParser.php +++ b/src/Http/Offer/RequestParser/CompositeOfferRequestParser.php @@ -12,7 +12,7 @@ final class CompositeOfferRequestParser implements OfferRequestParserInterface /** * @var OfferRequestParserInterface[] */ - private $parsers = []; + private array $parsers = []; public function __construct() { diff --git a/src/Http/Organizer/RequestParser/CompositeOrganizerRequestParser.php b/src/Http/Organizer/RequestParser/CompositeOrganizerRequestParser.php index 72fc594b..b57d5a5e 100644 --- a/src/Http/Organizer/RequestParser/CompositeOrganizerRequestParser.php +++ b/src/Http/Organizer/RequestParser/CompositeOrganizerRequestParser.php @@ -12,7 +12,7 @@ final class CompositeOrganizerRequestParser implements OrganizerRequestParser /** * @var OrganizerRequestParser[] */ - private $parsers = []; + private array $parsers = []; public function __construct() { diff --git a/src/JsonDocument/CompositeJsonTransformer.php b/src/JsonDocument/CompositeJsonTransformer.php index d0420a85..5edc9f6a 100644 --- a/src/JsonDocument/CompositeJsonTransformer.php +++ b/src/JsonDocument/CompositeJsonTransformer.php @@ -9,7 +9,7 @@ final class CompositeJsonTransformer implements JsonTransformer /** * @var JsonTransformer[] */ - private $jsonTransformers; + private array $jsonTransformers; public function __construct(JsonTransformer ...$jsonTransformers) { diff --git a/src/Language/MultilingualString.php b/src/Language/MultilingualString.php index eb5ccd0c..e6a358fb 100644 --- a/src/Language/MultilingualString.php +++ b/src/Language/MultilingualString.php @@ -12,11 +12,7 @@ final class MultilingualString private string $originalString; - /** - * @var string[] - * Associative array with languages as keys and translations as values. - */ - private $translations; + private array $translations; public function __construct(Language $originalLanguage, string $originalString) { diff --git a/src/PagedResultSet.php b/src/PagedResultSet.php index aa2ec763..bc8c4c24 100644 --- a/src/PagedResultSet.php +++ b/src/PagedResultSet.php @@ -22,7 +22,7 @@ final class PagedResultSet /** * @var FacetTreeInterface[] */ - private $facets; + private array $facets; /** * @param JsonDocument[] $results diff --git a/tests/AMQP/DomainMessageJSONDeserializerTest.php b/tests/AMQP/DomainMessageJSONDeserializerTest.php index 9310069f..0b05f069 100644 --- a/tests/AMQP/DomainMessageJSONDeserializerTest.php +++ b/tests/AMQP/DomainMessageJSONDeserializerTest.php @@ -16,10 +16,7 @@ final class DomainMessageJSONDeserializerTest extends TestCase { - /** - * @var DomainMessageJSONDeserializer - */ - protected $domainMessageJSONDeserializer; + protected DomainMessageJSONDeserializer $domainMessageJSONDeserializer; protected function setUp(): void { diff --git a/tests/AMQP/Dummies/DummyEvent.php b/tests/AMQP/Dummies/DummyEvent.php index 3c8d3a22..e9f818de 100644 --- a/tests/AMQP/Dummies/DummyEvent.php +++ b/tests/AMQP/Dummies/DummyEvent.php @@ -8,15 +8,9 @@ final class DummyEvent implements Serializable { - /** - * @var string - */ - private $id; + private string $id; - /** - * @var string - */ - private $content; + private string $content; public function __construct(string $id, string $content) { diff --git a/tests/Deserializer/SimpleDeserializerLocatorTest.php b/tests/Deserializer/SimpleDeserializerLocatorTest.php index 9ddd642d..d8c7c2ac 100644 --- a/tests/Deserializer/SimpleDeserializerLocatorTest.php +++ b/tests/Deserializer/SimpleDeserializerLocatorTest.php @@ -8,10 +8,7 @@ final class SimpleDeserializerLocatorTest extends TestCase { - /** - * @var SimpleDeserializerLocator - */ - protected $deserializerLocator; + protected SimpleDeserializerLocator $deserializerLocator; public function setUp(): void { diff --git a/tests/ElasticSearch/Aggregation/NodeMapAggregationTransformerTest.php b/tests/ElasticSearch/Aggregation/NodeMapAggregationTransformerTest.php index 4c84b5be..7c74a0e7 100644 --- a/tests/ElasticSearch/Aggregation/NodeMapAggregationTransformerTest.php +++ b/tests/ElasticSearch/Aggregation/NodeMapAggregationTransformerTest.php @@ -17,19 +17,13 @@ final class NodeMapAggregationTransformerTest extends TestCase { private FacetName $facetName; - /** - * @var array - */ - private $nodeMap; - - private NodeMapAggregationTransformer $transformer; protected function setUp(): void { $this->facetName = FacetName::regions(); - $this->nodeMap = [ + $nodeMap = [ 'prv-vlaams-brabant' => [ 'name' => [ 'nl' => 'Vlaams-Brabant', @@ -82,7 +76,7 @@ protected function setUp(): void $this->transformer = new NodeMapAggregationTransformer( $this->facetName, - $this->nodeMap + $nodeMap ); } diff --git a/tests/ElasticSearch/JsonDocument/JsonLdPolyfillJsonTransformerTest.php b/tests/ElasticSearch/JsonDocument/JsonLdPolyfillJsonTransformerTest.php index 62688205..97f8a50b 100644 --- a/tests/ElasticSearch/JsonDocument/JsonLdPolyfillJsonTransformerTest.php +++ b/tests/ElasticSearch/JsonDocument/JsonLdPolyfillJsonTransformerTest.php @@ -8,12 +8,7 @@ final class JsonLdPolyfillJsonTransformerTest extends TestCase { - /** - * @var array - * The JSON-LD that should be poly-filled - */ - private $given; - + private array $given; private JsonLdPolyfillJsonTransformer $transformer;