mirror of
https://github.com/werkraum-media/events.git
synced 2024-11-22 03:16:11 +01:00
Improve CGL
This commit is contained in:
parent
0ca95bc410
commit
9f0eaac154
12 changed files with 22 additions and 1 deletions
|
@ -47,7 +47,9 @@ return (new \PhpCsFixer\Config())
|
||||||
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
|
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
|
||||||
'phpdoc_no_access' => true,
|
'phpdoc_no_access' => true,
|
||||||
'phpdoc_no_package' => true,
|
'phpdoc_no_package' => true,
|
||||||
|
'phpdoc_order' => ['order' => ['test', 'dataProvider', 'param', 'throws', 'return']],
|
||||||
'phpdoc_scalar' => true,
|
'phpdoc_scalar' => true,
|
||||||
|
'phpdoc_separation' => ['groups' => [['Extbase\\*']]],
|
||||||
'phpdoc_trim' => true,
|
'phpdoc_trim' => true,
|
||||||
'phpdoc_types' => true,
|
'phpdoc_types' => true,
|
||||||
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
|
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
|
||||||
|
|
|
@ -59,6 +59,7 @@ class Date extends AbstractEntity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \DateTime $start
|
* @param \DateTime $start
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setStart(\DateTime $start)
|
public function setStart(\DateTime $start)
|
||||||
|
@ -81,6 +82,7 @@ class Date extends AbstractEntity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \DateTime $end
|
* @param \DateTime $end
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setEnd(\DateTime $end)
|
public function setEnd(\DateTime $end)
|
||||||
|
@ -117,6 +119,7 @@ class Date extends AbstractEntity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $languageUid
|
* @param int $languageUid
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setLanguageUid($languageUid)
|
public function setLanguageUid($languageUid)
|
||||||
|
@ -142,6 +145,7 @@ class Date extends AbstractEntity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param string $canceled
|
* @param string $canceled
|
||||||
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setCanceled(string $canceled)
|
public function setCanceled(string $canceled)
|
||||||
|
|
|
@ -77,12 +77,14 @@ class Event extends AbstractEntity
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ObjectStorage<FileReference>
|
* @var ObjectStorage<FileReference>
|
||||||
|
*
|
||||||
* @Extbase\ORM\Cascade remove
|
* @Extbase\ORM\Cascade remove
|
||||||
*/
|
*/
|
||||||
protected $images;
|
protected $images;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var ObjectStorage<Date>
|
* @var ObjectStorage<Date>
|
||||||
|
*
|
||||||
* @Extbase\ORM\Cascade remove
|
* @Extbase\ORM\Cascade remove
|
||||||
* @Extbase\ORM\Lazy
|
* @Extbase\ORM\Lazy
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -40,6 +40,7 @@ class AddSpecialProperties
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Internal info to speed things up if we know there are none.
|
* Internal info to speed things up if we know there are none.
|
||||||
|
*
|
||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
private $doPostponedDatesExist = true;
|
private $doPostponedDatesExist = true;
|
||||||
|
|
|
@ -29,6 +29,7 @@ class CategoryService
|
||||||
*
|
*
|
||||||
* @param string $idList list of category ids to start
|
* @param string $idList list of category ids to start
|
||||||
* @param int $counter
|
* @param int $counter
|
||||||
|
*
|
||||||
* @return string comma separated list of category ids
|
* @return string comma separated list of category ids
|
||||||
*/
|
*/
|
||||||
public function getChildrenCategories($idList, int $counter = 0): string
|
public function getChildrenCategories($idList, int $counter = 0): string
|
||||||
|
@ -49,6 +50,7 @@ class CategoryService
|
||||||
*
|
*
|
||||||
* @param string $idList list of category ids to start
|
* @param string $idList list of category ids to start
|
||||||
* @param int $counter
|
* @param int $counter
|
||||||
|
*
|
||||||
* @return string comma separated list of category ids
|
* @return string comma separated list of category ids
|
||||||
*/
|
*/
|
||||||
protected function getChildrenCategoriesRecursive($idList, $counter = 0): string
|
protected function getChildrenCategoriesRecursive($idList, $counter = 0): string
|
||||||
|
@ -96,6 +98,7 @@ class CategoryService
|
||||||
* Fetch ids again from DB to avoid false positives
|
* Fetch ids again from DB to avoid false positives
|
||||||
*
|
*
|
||||||
* @param string $idList
|
* @param string $idList
|
||||||
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
protected function getUidListFromRecords(string $idList): string
|
protected function getUidListFromRecords(string $idList): string
|
||||||
|
|
|
@ -230,6 +230,7 @@ class Files
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array<int, array{storage: int, identifier: string}> $files
|
* @param array<int, array{storage: int, identifier: string}> $files
|
||||||
|
*
|
||||||
* @return array<int, array{storage: int, identifier: string}> Index is file uid.
|
* @return array<int, array{storage: int, identifier: string}> Index is file uid.
|
||||||
*/
|
*/
|
||||||
private function filterPotentialFilesToDelete(array $files): array
|
private function filterPotentialFilesToDelete(array $files): array
|
||||||
|
@ -250,7 +251,7 @@ class Files
|
||||||
|
|
||||||
foreach ($queryBuilder->execute() as $reference) {
|
foreach ($queryBuilder->execute() as $reference) {
|
||||||
$file = [];
|
$file = [];
|
||||||
$fileUid = (int) $reference['uid_local'];
|
$fileUid = (int)$reference['uid_local'];
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(
|
(
|
||||||
|
|
|
@ -110,6 +110,7 @@ class DestinationDataImportService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ImportService constructor.
|
* ImportService constructor.
|
||||||
|
*
|
||||||
* @param EventRepository $eventRepository
|
* @param EventRepository $eventRepository
|
||||||
* @param OrganizerRepository $organizerRepository
|
* @param OrganizerRepository $organizerRepository
|
||||||
* @param DateRepository $dateRepository
|
* @param DateRepository $dateRepository
|
||||||
|
|
|
@ -34,6 +34,7 @@ interface SluggerType
|
||||||
* That way fields used by the generation can be populated.
|
* That way fields used by the generation can be populated.
|
||||||
*
|
*
|
||||||
* @param string[] $record
|
* @param string[] $record
|
||||||
|
*
|
||||||
* @return string[]
|
* @return string[]
|
||||||
*/
|
*/
|
||||||
public function prepareRecordForSlugGeneration(array $record): array;
|
public function prepareRecordForSlugGeneration(array $record): array;
|
||||||
|
|
|
@ -11,6 +11,7 @@ class ImportsTicketsTest extends AbstractTest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
|
*
|
||||||
* @todo: Missing "ticket" example and combinations.
|
* @todo: Missing "ticket" example and combinations.
|
||||||
* Could not find any "ticket" real world example.
|
* Could not find any "ticket" real world example.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -321,6 +321,7 @@ class DateDemandFactoryTest extends TestCase
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
|
*
|
||||||
* @dataProvider possibleEndAndStartNullCombinations
|
* @dataProvider possibleEndAndStartNullCombinations
|
||||||
*/
|
*/
|
||||||
public function returnsEndsOnSameDayIfAnyIsNull(
|
public function returnsEndsOnSameDayIfAnyIsNull(
|
||||||
|
@ -412,6 +413,7 @@ class DateDemandFactoryTest extends TestCase
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
|
*
|
||||||
* @dataProvider possibleSubmittedHighlights
|
* @dataProvider possibleSubmittedHighlights
|
||||||
*
|
*
|
||||||
* @param mixed $highlight
|
* @param mixed $highlight
|
||||||
|
@ -443,6 +445,7 @@ class DateDemandFactoryTest extends TestCase
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
|
*
|
||||||
* @dataProvider possibleSubmittedFalsyHighlights
|
* @dataProvider possibleSubmittedFalsyHighlights
|
||||||
*
|
*
|
||||||
* @param mixed $highlight
|
* @param mixed $highlight
|
||||||
|
|
|
@ -46,6 +46,7 @@ class DatesFactoryTest extends TestCase
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
|
*
|
||||||
* @dataProvider possibleUnkownInput
|
* @dataProvider possibleUnkownInput
|
||||||
*/
|
*/
|
||||||
public function returnsNoResultOnUnkownInput(array $unkownInput): void
|
public function returnsNoResultOnUnkownInput(array $unkownInput): void
|
||||||
|
|
|
@ -41,6 +41,7 @@ class UrlFactoryTest extends TestCase
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
|
*
|
||||||
* @dataProvider possibleImports
|
* @dataProvider possibleImports
|
||||||
*/
|
*/
|
||||||
public function createSearchResultUrl(
|
public function createSearchResultUrl(
|
||||||
|
|
Loading…
Reference in a new issue