Skip to content

Commit

Permalink
Add type hinting to the properties in the tests folder
Browse files Browse the repository at this point in the history
  • Loading branch information
LucWollants committed Sep 11, 2024
1 parent 25f9238 commit fae668f
Show file tree
Hide file tree
Showing 115 changed files with 213 additions and 828 deletions.
15 changes: 3 additions & 12 deletions tests/Broadway/AMQP/AMQPPublisherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,11 @@ class AMQPPublisherTest extends TestCase
*/
private $specification;

/**
* @var AMQPPublisher
*/
private $amqpPublisher;
private AMQPPublisher $amqpPublisher;

/**
* @var DomainMessage
*/
private $domainMessage;
private DomainMessage $domainMessage;

/**
* @var DelegatingAMQPMessageFactory
*/
private $messageFactory;
private DelegatingAMQPMessageFactory $messageFactory;

protected function setUp(): void
{
Expand Down
5 changes: 1 addition & 4 deletions tests/Broadway/AMQP/DomainMessage/AnyOfTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@

class AnyOfTest extends TestCase
{
/**
* @var AnyOf
*/
private $anyOf;
private AnyOf $anyOf;

protected function setUp(): void
{
Expand Down
5 changes: 1 addition & 4 deletions tests/Broadway/AMQP/DomainMessage/PayloadInNamespaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@

class PayloadInNamespaceTest extends TestCase
{
/**
* @var DomainMessage
*/
private $domainMessage;
private DomainMessage $domainMessage;

protected function setUp(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@

class EntireDomainMessageBodyFactoryTest extends TestCase
{
/**
* @var EntireDomainMessageBodyFactory
*/
private $entireDomainMessageBodyFactory;
private EntireDomainMessageBodyFactory $entireDomainMessageBodyFactory;

protected function setUp(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@ class DelegatingAMQPMessageFactoryTest extends TestCase
*/
private $propertiesFactory;

/**
* @var DelegatingAMQPMessageFactory
*/
private $messageFactory;
private DelegatingAMQPMessageFactory $messageFactory;

public function setUp(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ class CompositePropertiesFactoryTest extends TestCase
*/
private $mockFactory2;

/**
* @var CompositePropertiesFactory
*/
private $compositeFactory;
private CompositePropertiesFactory $compositeFactory;

public function setUp(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@

class CorrelationIdPropertiesFactoryTest extends TestCase
{
/**
* @var CorrelationIdPropertiesFactory
*/
private $factory;
private CorrelationIdPropertiesFactory $factory;

public function setUp(): void
{
Expand Down
10 changes: 2 additions & 8 deletions tests/Broadway/CommandHandling/RetryingCommandBusTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,9 @@

class RetryingCommandBusTest extends TestCase
{
/**
* @var MockObject
*/
private $decoratee;
private MockObject $decoratee;

/**
* @var RetryingCommandBus
*/
private $commandBus;
private RetryingCommandBus $commandBus;

protected function setUp(): void
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ class ValidatingCommandBusDecoratorTest extends TestCase
*/
private $validator;

/**
* @var ValidatingCommandBusDecorator
*/
private $decorator;
private ValidatingCommandBusDecorator $decorator;

public function setUp(): void
{
Expand Down
5 changes: 1 addition & 4 deletions tests/Cdb/ActorItemFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@

class ActorItemFactoryTest extends TestCase
{
/**
* @var ActorItemFactory
*/
private $factory;
private ActorItemFactory $factory;

public function setUp(): void
{
Expand Down
15 changes: 3 additions & 12 deletions tests/Cdb/CdbId/EventCdbIdExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,11 @@

class EventCdbIdExtractorTest extends TestCase
{
/**
* @var ArrayMappingService
*/
private $placeExternalIdMappingService;
private ArrayMappingService $placeExternalIdMappingService;

/**
* @var ArrayMappingService
*/
private $organizerExternalIdMappingService;
private ArrayMappingService $organizerExternalIdMappingService;

/**
* @var EventCdbIdExtractor
*/
private $cdbIdExtractor;
private EventCdbIdExtractor $cdbIdExtractor;

public function setUp(): void
{
Expand Down
5 changes: 1 addition & 4 deletions tests/Cdb/EventItemFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@

class EventItemFactoryTest extends TestCase
{
/**
* @var EventItemFactory
*/
private $factory;
private EventItemFactory $factory;

public function setUp(): void
{
Expand Down
5 changes: 1 addition & 4 deletions tests/Cdb/PriceDescriptionParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@

class PriceDescriptionParserTest extends TestCase
{
/**
* @var PriceDescriptionParser
*/
private $parser;
private PriceDescriptionParser $parser;

public function setUp(): void
{
Expand Down
20 changes: 4 additions & 16 deletions tests/Collection/CollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,13 @@

class CollectionTest extends TestCase
{
/**
* @var Foo
*/
protected $foo1;
protected Foo $foo1;

/**
* @var Foo
*/
protected $foo2;
protected Foo $foo2;

/**
* @var FooExtended
*/
protected $fooExtended;
protected FooExtended $fooExtended;

/**
* @var \stdClass
*/
protected $notFoo;
protected \stdClass $notFoo;

protected function setUp(): void
{
Expand Down
10 changes: 2 additions & 8 deletions tests/Collection/Mock/Foo.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,9 @@

class Foo
{
/**
* @var int
*/
protected $id;
protected int $id;

/**
* @var string
*/
protected $name;
protected string $name;

public function __construct(int $id, string $name)
{
Expand Down
5 changes: 1 addition & 4 deletions tests/CommandHandling/SimpleContextAwareCommandBusTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@

class SimpleContextAwareCommandBusTest extends TestCase
{
/**
* @var SimpleContextAwareCommandBus
*/
protected $commandBus;
protected SimpleContextAwareCommandBus $commandBus;

/**
* @var ContextAwareInterface&CommandHandler&MockObject
Expand Down
20 changes: 4 additions & 16 deletions tests/ContactPointTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,13 @@

class ContactPointTest extends TestCase
{
/**
* @var array
*/
private $phones;
private array $phones;

/**
* @var array
*/
private $emails;
private array $emails;

/**
* @var array
*/
private $urls;
private array $urls;

/**
* @var ContactPoint
*/
private $contactPoint;
private ContactPoint $contactPoint;

protected function setUp(): void
{
Expand Down
5 changes: 1 addition & 4 deletions tests/Deserializer/SimpleDeserializerLocatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@

class SimpleDeserializerLocatorTest extends TestCase
{
/**
* @var SimpleDeserializerLocator
*/
protected $deserializerLocator;
protected SimpleDeserializerLocator $deserializerLocator;

public function setUp(): void
{
Expand Down
5 changes: 1 addition & 4 deletions tests/Event/Commands/DeleteTypicalAgeRangeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@

class DeleteTypicalAgeRangeTest extends TestCase
{
/**
* @var DeleteTypicalAgeRange
*/
protected $deleteTypicalAgeRange;
protected DeleteTypicalAgeRange $deleteTypicalAgeRange;

public function setUp(): void
{
Expand Down
5 changes: 1 addition & 4 deletions tests/Event/Commands/UpdateBookingInfoTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@

class UpdateBookingInfoTest extends TestCase
{
/**
* @var UpdateBookingInfo
*/
protected $updateBookingInfo;
protected UpdateBookingInfo $updateBookingInfo;

public function setUp(): void
{
Expand Down
5 changes: 1 addition & 4 deletions tests/Event/Commands/UpdateContactPointTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@

class UpdateContactPointTest extends TestCase
{
/**
* @var UpdateContactPoint
*/
protected $updateContactPoint;
protected UpdateContactPoint $updateContactPoint;

public function setUp(): void
{
Expand Down
5 changes: 1 addition & 4 deletions tests/Event/Commands/UpdateDescriptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@

class UpdateDescriptionTest extends TestCase
{
/**
* @var UpdateDescription
*/
protected $updateDescription;
protected UpdateDescription $updateDescription;

public function setUp(): void
{
Expand Down
15 changes: 3 additions & 12 deletions tests/Event/Commands/UpdateLocationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,11 @@

class UpdateLocationTest extends TestCase
{
/**
* @var string
*/
private $eventId;
private string $eventId;

/**
* @var LocationId
*/
private $locationId;
private LocationId $locationId;

/**
* @var UpdateLocation
*/
private $updateLocation;
private UpdateLocation $updateLocation;

protected function setUp(): void
{
Expand Down
5 changes: 1 addition & 4 deletions tests/Event/Commands/UpdateTypicalAgeRangeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@

class UpdateTypicalAgeRangeTest extends TestCase
{
/**
* @var UpdateTypicalAgeRange
*/
protected $updateTypicalAgeRange;
protected UpdateTypicalAgeRange $updateTypicalAgeRange;

public function setUp(): void
{
Expand Down
Loading

0 comments on commit fae668f

Please sign in to comment.