diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index ba9880e4..df861ff9 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -47,7 +47,9 @@ 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'], 'phpdoc_no_access' => true, 'phpdoc_no_package' => true, + 'phpdoc_order' => ['order' => ['test', 'dataProvider', 'param', 'throws', 'return']], 'phpdoc_scalar' => true, + 'phpdoc_separation' => ['groups' => [['Extbase\\*']]], 'phpdoc_trim' => true, 'phpdoc_types' => true, 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], diff --git a/Classes/Domain/Model/Date.php b/Classes/Domain/Model/Date.php index bb83aa1b..b673a8fe 100644 --- a/Classes/Domain/Model/Date.php +++ b/Classes/Domain/Model/Date.php @@ -59,6 +59,7 @@ public function getStart() /** * @param \DateTime $start + * * @return void */ public function setStart(\DateTime $start) @@ -81,6 +82,7 @@ public function getEnd() /** * @param \DateTime $end + * * @return void */ public function setEnd(\DateTime $end) @@ -117,6 +119,7 @@ public function setEvent(Event $event): self /** * @param int $languageUid + * * @return void */ public function setLanguageUid($languageUid) @@ -142,6 +145,7 @@ public function getCanceled(): string /** * @param string $canceled + * * @return void */ public function setCanceled(string $canceled) diff --git a/Classes/Domain/Model/Event.php b/Classes/Domain/Model/Event.php index 3cf910bc..02a96bf4 100644 --- a/Classes/Domain/Model/Event.php +++ b/Classes/Domain/Model/Event.php @@ -77,12 +77,14 @@ class Event extends AbstractEntity /** * @var ObjectStorage + * * @Extbase\ORM\Cascade remove */ protected $images; /** * @var ObjectStorage + * * @Extbase\ORM\Cascade remove * @Extbase\ORM\Lazy */ diff --git a/Classes/Extbase/AddSpecialProperties.php b/Classes/Extbase/AddSpecialProperties.php index bf293586..95b63405 100644 --- a/Classes/Extbase/AddSpecialProperties.php +++ b/Classes/Extbase/AddSpecialProperties.php @@ -40,6 +40,7 @@ class AddSpecialProperties /** * Internal info to speed things up if we know there are none. + * * @var bool */ private $doPostponedDatesExist = true; diff --git a/Classes/Service/CategoryService.php b/Classes/Service/CategoryService.php index d5cc5341..af3ac4f4 100644 --- a/Classes/Service/CategoryService.php +++ b/Classes/Service/CategoryService.php @@ -29,6 +29,7 @@ public function __construct() * * @param string $idList list of category ids to start * @param int $counter + * * @return string comma separated list of category ids */ public function getChildrenCategories($idList, int $counter = 0): string @@ -49,6 +50,7 @@ public function getChildrenCategories($idList, int $counter = 0): string * * @param string $idList list of category ids to start * @param int $counter + * * @return string comma separated list of category ids */ protected function getChildrenCategoriesRecursive($idList, $counter = 0): string @@ -96,6 +98,7 @@ protected function getChildrenCategoriesRecursive($idList, $counter = 0): string * Fetch ids again from DB to avoid false positives * * @param string $idList + * * @return string */ protected function getUidListFromRecords(string $idList): string diff --git a/Classes/Service/Cleanup/Files.php b/Classes/Service/Cleanup/Files.php index b90f01ba..20411ee1 100644 --- a/Classes/Service/Cleanup/Files.php +++ b/Classes/Service/Cleanup/Files.php @@ -230,6 +230,7 @@ private function getPotentialFilesToDelete(): array /** * @param array $files + * * @return array Index is file uid. */ private function filterPotentialFilesToDelete(array $files): array @@ -250,7 +251,7 @@ private function filterPotentialFilesToDelete(array $files): array foreach ($queryBuilder->execute() as $reference) { $file = []; - $fileUid = (int) $reference['uid_local']; + $fileUid = (int)$reference['uid_local']; if ( ( diff --git a/Classes/Service/DestinationDataImportService.php b/Classes/Service/DestinationDataImportService.php index 63549d28..d581946c 100644 --- a/Classes/Service/DestinationDataImportService.php +++ b/Classes/Service/DestinationDataImportService.php @@ -110,6 +110,7 @@ class DestinationDataImportService /** * ImportService constructor. + * * @param EventRepository $eventRepository * @param OrganizerRepository $organizerRepository * @param DateRepository $dateRepository diff --git a/Classes/Service/DestinationDataImportService/Slugger/SluggerType.php b/Classes/Service/DestinationDataImportService/Slugger/SluggerType.php index 1b1f8cff..7dd6d722 100644 --- a/Classes/Service/DestinationDataImportService/Slugger/SluggerType.php +++ b/Classes/Service/DestinationDataImportService/Slugger/SluggerType.php @@ -34,6 +34,7 @@ interface SluggerType * That way fields used by the generation can be populated. * * @param string[] $record + * * @return string[] */ public function prepareRecordForSlugGeneration(array $record): array; diff --git a/Tests/Functional/Import/DestinationDataTest/ImportsTicketsTest.php b/Tests/Functional/Import/DestinationDataTest/ImportsTicketsTest.php index 50ce39f8..430165d2 100644 --- a/Tests/Functional/Import/DestinationDataTest/ImportsTicketsTest.php +++ b/Tests/Functional/Import/DestinationDataTest/ImportsTicketsTest.php @@ -11,6 +11,7 @@ class ImportsTicketsTest extends AbstractTest { /** * @test + * * @todo: Missing "ticket" example and combinations. * Could not find any "ticket" real world example. */ diff --git a/Tests/Unit/Domain/Model/Dto/DateDemandFactoryTest.php b/Tests/Unit/Domain/Model/Dto/DateDemandFactoryTest.php index a4c2ce99..8f9ec54d 100644 --- a/Tests/Unit/Domain/Model/Dto/DateDemandFactoryTest.php +++ b/Tests/Unit/Domain/Model/Dto/DateDemandFactoryTest.php @@ -321,6 +321,7 @@ public function endIsSetByRequest(): void /** * @test + * * @dataProvider possibleEndAndStartNullCombinations */ public function returnsEndsOnSameDayIfAnyIsNull( @@ -412,6 +413,7 @@ public function returnsEndsOnSameDayIfBothAreOnDifferentDays(): void /** * @test + * * @dataProvider possibleSubmittedHighlights * * @param mixed $highlight @@ -443,6 +445,7 @@ public function possibleSubmittedHighlights(): \Generator /** * @test + * * @dataProvider possibleSubmittedFalsyHighlights * * @param mixed $highlight diff --git a/Tests/Unit/Domain/Model/LocationTest.php b/Tests/Unit/Domain/Model/LocationTest.php index ebfe5cfa..046beab9 100644 --- a/Tests/Unit/Domain/Model/LocationTest.php +++ b/Tests/Unit/Domain/Model/LocationTest.php @@ -34,7 +34,9 @@ final class LocationTest extends TestCase { /** * @test + * * @dataProvider possibleLatitudeAndLongitude + * * @param string|float $latitude * @param string|float $longitude */ diff --git a/Tests/Unit/Service/DestinationDataImportService/DatesFactoryTest.php b/Tests/Unit/Service/DestinationDataImportService/DatesFactoryTest.php index 22592ea4..58111c4d 100644 --- a/Tests/Unit/Service/DestinationDataImportService/DatesFactoryTest.php +++ b/Tests/Unit/Service/DestinationDataImportService/DatesFactoryTest.php @@ -46,6 +46,7 @@ public function canBeCreated(): void /** * @test + * * @dataProvider possibleUnkownInput */ public function returnsNoResultOnUnkownInput(array $unkownInput): void diff --git a/Tests/Unit/Service/DestinationDataImportService/UrlFactoryTest.php b/Tests/Unit/Service/DestinationDataImportService/UrlFactoryTest.php index d45a03ad..52eb709a 100644 --- a/Tests/Unit/Service/DestinationDataImportService/UrlFactoryTest.php +++ b/Tests/Unit/Service/DestinationDataImportService/UrlFactoryTest.php @@ -41,6 +41,7 @@ public function canBeCreated(): void /** * @test + * * @dataProvider possibleImports */ public function createSearchResultUrl( diff --git a/Tests/Unit/Utility/FloatPrecisionTest.php b/Tests/Unit/Utility/FloatPrecisionTest.php index 841fdaad..9e23caac 100644 --- a/Tests/Unit/Utility/FloatPrecisionTest.php +++ b/Tests/Unit/Utility/FloatPrecisionTest.php @@ -33,7 +33,9 @@ class FloatPrecisionTest extends TestCase { /** * @test + * * @dataProvider possibleCalls + * * @param int $precisionToUse */ public function returnsStringWithPrecision(