Skip to content

Commit ae62e3a

Browse files
committed
Add missing return statements on the src folder
1 parent 59500e3 commit ae62e3a

File tree

106 files changed

+162
-499
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+162
-499
lines changed

src/Address/CultureFeedAddressFactory.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88

99
class CultureFeedAddressFactory implements CultureFeedAddressFactoryInterface
1010
{
11-
/**
12-
* @return Address
13-
*/
14-
public function fromCdbAddress(\CultureFeed_Cdb_Data_Address_PhysicalAddress $cdbAddress)
11+
public function fromCdbAddress(\CultureFeed_Cdb_Data_Address_PhysicalAddress $cdbAddress): Address
1512
{
1613
$requiredFields = [
1714
'street' => $cdbAddress->getStreet(),

src/Address/CultureFeedAddressFactoryInterface.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,5 @@
66

77
interface CultureFeedAddressFactoryInterface
88
{
9-
/**
10-
* @return Address
11-
*/
12-
public function fromCdbAddress(\CultureFeed_Cdb_Data_Address_PhysicalAddress $cdbAddress);
9+
public function fromCdbAddress(\CultureFeed_Cdb_Data_Address_PhysicalAddress $cdbAddress): Address;
1310
}

src/BackwardsCompatiblePayloadSerializerFactory.php

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -445,18 +445,12 @@ function (array $serializedObject) use ($newClass) {
445445
return $payloadManipulatingSerializer;
446446
}
447447

448-
/**
449-
* @return array
450-
*/
451-
private static function replaceEventIdWithItemId(array $serializedObject)
448+
private static function replaceEventIdWithItemId(array $serializedObject): array
452449
{
453450
return self::replaceKeys('event_id', 'item_id', $serializedObject);
454451
}
455452

456-
/**
457-
* @return array
458-
*/
459-
private static function replacePlaceIdWithItemId(array $serializedObject)
453+
private static function replacePlaceIdWithItemId(array $serializedObject): array
460454
{
461455
return self::replaceKeys('place_id', 'item_id', $serializedObject);
462456
}
@@ -465,9 +459,8 @@ private static function replacePlaceIdWithItemId(array $serializedObject)
465459
* @param string $oldKey
466460
* @param string $newKey
467461
* @param array $serializedObject
468-
* @return array
469462
*/
470-
private static function replaceKeys($oldKey, $newKey, $serializedObject)
463+
private static function replaceKeys($oldKey, $newKey, $serializedObject): array
471464
{
472465
if (isset($serializedObject['payload'][$oldKey])) {
473466
$value = $serializedObject['payload'][$oldKey];
@@ -478,10 +471,7 @@ private static function replaceKeys($oldKey, $newKey, $serializedObject)
478471
return $serializedObject;
479472
}
480473

481-
/**
482-
* @return array
483-
*/
484-
private static function replaceKeywordWithLabel(array $serializedObject)
474+
private static function replaceKeywordWithLabel(array $serializedObject): array
485475
{
486476
$keyword = $serializedObject['payload']['keyword'];
487477
$serializedObject['payload']['label'] = $keyword;
@@ -490,13 +480,10 @@ private static function replaceKeywordWithLabel(array $serializedObject)
490480
return $serializedObject;
491481
}
492482

493-
/**
494-
* @return array
495-
*/
496483
private static function addLabelName(
497484
array $serializedObject,
498485
ReadRepositoryInterface $labelRepository
499-
) {
486+
): array {
500487
if (!isset($serializedObject['payload']['name'])) {
501488
$uuid = $serializedObject['payload']['uuid'];
502489
$label = $labelRepository->getByUuid(new UUID($uuid));
@@ -507,13 +494,10 @@ private static function addLabelName(
507494
return $serializedObject;
508495
}
509496

510-
/**
511-
* @return array
512-
*/
513497
private static function fixOrganizerLabelEvent(
514498
array $serializedObject,
515499
ReadRepositoryInterface $labelRepository
516-
) {
500+
): array {
517501
if (!isset($serializedObject['payload']['label']) ||
518502
!isset($serializedObject['payload']['visibility'])) {
519503
$uuid = $serializedObject['payload']['labelId'];
@@ -526,10 +510,7 @@ private static function fixOrganizerLabelEvent(
526510
return $serializedObject;
527511
}
528512

529-
/**
530-
* @return array
531-
*/
532-
private static function removeLocationNameAndAddress(array $serializedObject)
513+
private static function removeLocationNameAndAddress(array $serializedObject): array
533514
{
534515
if (isset($serializedObject['payload']['location']) && !is_string($serializedObject['payload']['location'])) {
535516
$locationId = $serializedObject['payload']['location']['cdbid'];
@@ -546,10 +527,7 @@ private static function removeLocationNameAndAddress(array $serializedObject)
546527
return $serializedObject;
547528
}
548529

549-
/**
550-
* @return array
551-
*/
552-
private static function addDefaultMainLanguage(array $serializedObject)
530+
private static function addDefaultMainLanguage(array $serializedObject): array
553531
{
554532
if (!isset($serializedObject['payload']['main_language'])) {
555533
$mainLanguage = new Language('nl');

src/Broadway/AMQP/Message/AMQPMessageFactoryInterface.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,5 @@
99

1010
interface AMQPMessageFactoryInterface
1111
{
12-
/**
13-
* @return AMQPMessage
14-
*/
15-
public function createAMQPMessage(DomainMessage $domainMessage);
12+
public function createAMQPMessage(DomainMessage $domainMessage): AMQPMessage;
1613
}

src/Broadway/AMQP/Message/DelegatingAMQPMessageFactory.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ public function __construct(
2424
$this->propertiesFactory = $propertiesFactory;
2525
}
2626

27-
/**
28-
* @return AMQPMessage
29-
*/
30-
public function createAMQPMessage(DomainMessage $domainMessage)
27+
public function createAMQPMessage(DomainMessage $domainMessage): AMQPMessage
3128
{
3229
return new AMQPMessage(
3330
$this->bodyFactory->createBody($domainMessage),

src/Broadway/AMQP/Message/Properties/CompositePropertiesFactory.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,14 @@ public function __construct()
1818
$this->factories = [];
1919
}
2020

21-
/**
22-
* @return CompositePropertiesFactory
23-
*/
24-
public function with(PropertiesFactoryInterface $factory)
21+
public function with(PropertiesFactoryInterface $factory): CompositePropertiesFactory
2522
{
2623
$c = clone $this;
2724
$c->factories[] = $factory;
2825
return $c;
2926
}
3027

31-
/**
32-
* @return array
33-
*/
34-
public function createProperties(DomainMessage $domainMessage)
28+
public function createProperties(DomainMessage $domainMessage): array
3529
{
3630
$properties = [];
3731

src/Broadway/AMQP/Message/Properties/ContentTypePropertiesFactory.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ public function __construct(ContentTypeLookupInterface $contentTypeLookup)
1616
$this->contentTypeLookup = $contentTypeLookup;
1717
}
1818

19-
/**
20-
* @return array
21-
*/
22-
public function createProperties(DomainMessage $domainMessage)
19+
public function createProperties(DomainMessage $domainMessage): array
2320
{
2421
$payloadClassName = get_class($domainMessage->getPayload());
2522
$contentType = $this->contentTypeLookup->getContentType($payloadClassName);

src/Broadway/AMQP/Message/Properties/CorrelationIdPropertiesFactory.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88

99
class CorrelationIdPropertiesFactory implements PropertiesFactoryInterface
1010
{
11-
/**
12-
* @return array
13-
*/
14-
public function createProperties(DomainMessage $domainMessage)
11+
public function createProperties(DomainMessage $domainMessage): array
1512
{
1613
return ['correlation_id' => $domainMessage->getId() . '-' . $domainMessage->getPlayhead()];
1714
}

src/Broadway/AMQP/Message/Properties/PropertiesFactoryInterface.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,5 @@
88

99
interface PropertiesFactoryInterface
1010
{
11-
/**
12-
* @return array
13-
*/
14-
public function createProperties(DomainMessage $domainMessage);
11+
public function createProperties(DomainMessage $domainMessage): array;
1512
}

src/Broadway/Domain/DomainMessageIsNot.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@ public function __construct(DomainMessageSpecificationInterface $domainMessageSp
1616
$this->domainMessageSpecification = $domainMessageSpecification;
1717
}
1818

19-
/**
20-
* @return bool
21-
*/
22-
public function isSatisfiedBy(DomainMessage $domainMessage)
19+
public function isSatisfiedBy(DomainMessage $domainMessage): bool
2320
{
2421
return !$this->domainMessageSpecification->isSatisfiedBy($domainMessage);
2522
}

0 commit comments

Comments
 (0)