Skip to content

Commit

Permalink
Improve CGL
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSiepmann committed Jul 4, 2023
1 parent a42ccec commit 3d88269
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
4 changes: 4 additions & 0 deletions Classes/Domain/Model/Date.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public function getStart()

/**
* @param \DateTime $start
*
* @return void
*/
public function setStart(\DateTime $start)
Expand All @@ -81,6 +82,7 @@ public function getEnd()

/**
* @param \DateTime $end
*
* @return void
*/
public function setEnd(\DateTime $end)
Expand Down Expand Up @@ -117,6 +119,7 @@ public function setEvent(Event $event): self

/**
* @param int $languageUid
*
* @return void
*/
public function setLanguageUid($languageUid)
Expand All @@ -142,6 +145,7 @@ public function getCanceled(): string

/**
* @param string $canceled
*
* @return void
*/
public function setCanceled(string $canceled)
Expand Down
2 changes: 2 additions & 0 deletions Classes/Domain/Model/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,14 @@ class Event extends AbstractEntity

/**
* @var ObjectStorage<FileReference>
*
* @Extbase\ORM\Cascade remove
*/
protected $images;

/**
* @var ObjectStorage<Date>
*
* @Extbase\ORM\Cascade remove
* @Extbase\ORM\Lazy
*/
Expand Down
1 change: 1 addition & 0 deletions Classes/Extbase/AddSpecialProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class AddSpecialProperties

/**
* Internal info to speed things up if we know there are none.
*
* @var bool
*/
private $doPostponedDatesExist = true;
Expand Down
3 changes: 3 additions & 0 deletions Classes/Service/CategoryService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion Classes/Service/Cleanup/Files.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ private function getPotentialFilesToDelete(): array

/**
* @param array<int, array{storage: int, identifier: string}> $files
*
* @return array<int, array{storage: int, identifier: string}> Index is file uid.
*/
private function filterPotentialFilesToDelete(array $files): array
Expand All @@ -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 (
(
Expand Down
1 change: 1 addition & 0 deletions Classes/Service/DestinationDataImportService.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ class DestinationDataImportService

/**
* ImportService constructor.
*
* @param EventRepository $eventRepository
* @param OrganizerRepository $organizerRepository
* @param DateRepository $dateRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class ImportsTicketsTest extends AbstractTest
{
/**
* @test
*
* @todo: Missing "ticket" example and combinations.
* Could not find any "ticket" real world example.
*/
Expand Down
3 changes: 3 additions & 0 deletions Tests/Unit/Domain/Model/Dto/DateDemandFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ public function endIsSetByRequest(): void

/**
* @test
*
* @dataProvider possibleEndAndStartNullCombinations
*/
public function returnsEndsOnSameDayIfAnyIsNull(
Expand Down Expand Up @@ -412,6 +413,7 @@ public function returnsEndsOnSameDayIfBothAreOnDifferentDays(): void

/**
* @test
*
* @dataProvider possibleSubmittedHighlights
*
* @param mixed $highlight
Expand Down Expand Up @@ -443,6 +445,7 @@ public function possibleSubmittedHighlights(): \Generator

/**
* @test
*
* @dataProvider possibleSubmittedFalsyHighlights
*
* @param mixed $highlight
Expand Down
2 changes: 2 additions & 0 deletions Tests/Unit/Domain/Model/LocationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ final class LocationTest extends TestCase
{
/**
* @test
*
* @dataProvider possibleLatitudeAndLongitude
*
* @param string|float $latitude
* @param string|float $longitude
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public function canBeCreated(): void

/**
* @test
*
* @dataProvider possibleUnkownInput
*/
public function returnsNoResultOnUnkownInput(array $unkownInput): void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function canBeCreated(): void

/**
* @test
*
* @dataProvider possibleImports
*/
public function createSearchResultUrl(
Expand Down
2 changes: 2 additions & 0 deletions Tests/Unit/Utility/FloatPrecisionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ class FloatPrecisionTest extends TestCase
{
/**
* @test
*
* @dataProvider possibleCalls
*
* @param int $precisionToUse
*/
public function returnsStringWithPrecision(
Expand Down

0 comments on commit 3d88269

Please sign in to comment.