diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 8da3191..4c41522 100644 --- a/.github/workflows/ci-linux.yml +++ b/.github/workflows/ci-linux.yml @@ -64,7 +64,7 @@ jobs: - name: Install dependencies run: | - cd galette-core/galette + cd galette-core composer install --ignore-platform-reqs - name: CS diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index e96cc0a..cb99c26 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -13,11 +13,60 @@ ->setRules([ '@PSR12' => true, '@PER-CS' => true, - '@PHP82Migration' => true, + '@PHP8x2Migration' => true, 'trailing_comma_in_multiline' => false, - 'cast_spaces' => false, + 'cast_spaces' => ['space' => 'none'], 'single_line_empty_body' => false, - 'no_unused_imports' => true + 'no_unused_imports' => true, + // rules for phpdoc + // Removes @param, @return and @var tags that don't provide any useful information - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:no_superfluous_phpdoc_tags + 'no_superfluous_phpdoc_tags' => [ + 'allow_mixed' => true, + 'remove_inheritdoc' => true, + ], + // require phpdoc for non typed arguments - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_add_missing_param_annotation + 'phpdoc_add_missing_param_annotation' => true, + // no @access - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_no_access + 'phpdoc_no_access' => true, + // no @package - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_no_package + 'phpdoc_no_package' => true, + // order phpdoc tags - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_order + 'phpdoc_order' => ['order' => ['since', 'var', 'see', 'param', 'return', 'throw', 'todo', 'deprecated']], + // phpdoc param in same order as signature - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_param_order + 'phpdoc_param_order' => true, + // align tags - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_align + 'phpdoc_align' => [ + 'align' => 'vertical', + 'tags' => [ + 'param', + 'property', + 'property-read', + 'property-write', + 'phpstan-param', + 'phpstan-property', + 'phpstan-property-read', + 'phpstan-property-write', + 'phpstan-assert', + 'phpstan-assert-if-true', + 'phpstan-assert-if-false', + 'psalm-param', + 'psalm-param-out', + 'psalm-property', + 'psalm-property-read', + 'psalm-property-write', + 'psalm-assert', + 'psalm-assert-if-true', + 'psalm-assert-if-false' + ], + ], + // Check types case - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_types + 'phpdoc_types' => true, + // Use native scalar types - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_scalar + 'phpdoc_scalar' => true, + // remove extra empty lines - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_trim + 'phpdoc_trim' => true, + // remove empty lines inside phpdoc block - https://mlocati.github.io/php-cs-fixer-configurator/#version:3.90|fixer:phpdoc_trim_consecutive_blank_line_separation + 'phpdoc_trim_consecutive_blank_line_separation' => true, ]) ->setFinder($finder) ; diff --git a/_config.inc.php b/_config.inc.php index 30d5b42..87e2ded 100644 --- a/_config.inc.php +++ b/_config.inc.php @@ -1,7 +1,7 @@ * - * @property int $id + * @property int $id * @property string $value */ abstract class AbstractObject @@ -77,7 +77,7 @@ public function __construct(Db $zdb, string $table, string $pk, string $field, s /** * Get the list * - * @return array + * @return array> */ public function getList(): array { @@ -103,8 +103,6 @@ public function getList(): array * Loads a record * * @param int $id id of the record - * - * @return bool */ public function load(int $id): bool { @@ -138,8 +136,6 @@ public function load(int $id): bool * Store current record * * @param bool $new New record or existing one - * - * @return bool */ public function store(bool $new = false): bool { @@ -182,8 +178,6 @@ public function store(bool $new = false): bool * Delete some records * * @param int[] $ids Array of records id to delete - * - * @return bool */ public function delete(array $ids): bool { @@ -206,8 +200,6 @@ public function delete(array $ids): bool * Set filters * * @param PropertiesList $filters Filters - * - * @return self */ public function setFilters(PropertiesList $filters): self { @@ -217,15 +209,11 @@ public function setFilters(PropertiesList $filters): self /** * Get field label - * - * @return string */ abstract public function getFieldLabel(): string; /** * Get property route name - * - * @return string */ abstract public function getRouteName(): string; @@ -254,8 +242,6 @@ public function __get(string $name): mixed * Required for twig to access properties via __get * * @param string $name name of the property we want to retrieve - * - * @return bool */ public function __isset(string $name): bool { @@ -267,8 +253,6 @@ public function __isset(string $name): bool * * @param string $name name of the property we want to assign a value to * @param mixed $value a relevant value for the property - * - * @return void */ public function __set(string $name, mixed $value): void { @@ -284,8 +268,6 @@ public function __set(string $name, mixed $value): void * * @param RouteParser $routeparser Route parser instance * @param string $property Property name - * - * @return string */ public static function getListRoute(RouteParser $routeparser, string $property): string { @@ -319,8 +301,6 @@ public static function getListRoute(RouteParser $routeparser, string $property): * Get object name from route property * * @param string $property Route property - * - * @return string */ public static function getClassForPropName(string $property): string { @@ -378,8 +358,6 @@ private function buildSelect(): Select * Count objects from the query * * @param Select $select Original select - * - * @return void */ private function proceedCount(Select $select): void { @@ -418,8 +396,6 @@ private function proceedCount(Select $select): void /** * Get count for list - * - * @return int */ public function getCount(): int { @@ -428,8 +404,6 @@ public function getCount(): int /** * Display localized count for object - * - * @return string */ public function displayCount(): string { @@ -442,8 +416,6 @@ public function displayCount(): string /** * Get localized count string for object list - * - * @return string */ abstract protected function getLocalizedCount(): string; } diff --git a/lib/GaletteAuto/Auto.php b/lib/GaletteAuto/Auto.php index 50963c7..2b9c635 100644 --- a/lib/GaletteAuto/Auto.php +++ b/lib/GaletteAuto/Auto.php @@ -1,7 +1,7 @@ * - * @property int $id - * @property string $registration - * @property string $name - * @property string $first_registration_date - * @property string $first_circulation_date - * @property int $mileage - * @property string $comment - * @property string $chassis_number - * @property int $seats - * @property int $horsepower - * @property int $engine_size - * @property string $creation_date - * @property int $fuel - * @property Color $color - * @property Body $body - * @property State $state + * @property int $id + * @property string $registration + * @property string $name + * @property string $first_registration_date + * @property string $first_circulation_date + * @property int $mileage + * @property string $comment + * @property string $chassis_number + * @property int $seats + * @property int $horsepower + * @property int $engine_size + * @property string $creation_date + * @property int $fuel + * @property Color $color + * @property Body $body + * @property State $state * @property Transmission $transmission - * @property Finition $finition - * @property Model $model - * @property int $owner_id - * @property Adherent $owner - * @property Picture $picture - * @property History $history + * @property Finition $finition + * @property Model $model + * @property int $owner_id + * @property Adherent $owner + * @property Picture $picture + * @property History $history */ class Auto { @@ -69,6 +69,7 @@ class Auto private Plugins $plugins; private Db $zdb; + /** @var array */ private array $fields = [ 'id_car' => 'integer', 'car_name' => 'string', @@ -92,6 +93,7 @@ class Auto Adherent::PK => 'integer' ]; + /** @var array */ private array $required = [ 'name' => 1, 'model' => 1, @@ -145,7 +147,9 @@ class Auto //do we have to fire a history entry? private bool $fire_history = false; - //internal properties (not updatable outside the object) + /** + * @var array internal properties (not updatable outside the object) + */ private array $internals = [ 'id', 'creation_date', @@ -158,14 +162,15 @@ class Auto 'plugins', 'zdb' ]; + /** @var array */ private array $errors = []; /** * Default constructor * - * @param Plugins $plugins Plugins - * @param Db $zdb Database instance - * @param ?ArrayObject $args A resultset row to load + * @param Plugins $plugins Plugins + * @param Db $zdb Database instance + * @param ?ArrayObject $args A resultset row to load */ public function __construct(Plugins $plugins, Db $zdb, ?ArrayObject $args = null) { @@ -210,8 +215,6 @@ public function __construct(Plugins $plugins, Db $zdb, ?ArrayObject $args = null * Loads a car from its id * * @param int $id the identifiant for the car to load - * - * @return bool */ public function load(int $id): bool { @@ -243,9 +246,7 @@ public function load(int $id): bool /** * Populate object from a resultset row * - * @param ArrayObject $r a resultset row - * - * @return void + * @param ArrayObject $r a resultset row */ private function loadFromRS(ArrayObject $r): void { @@ -286,7 +287,7 @@ private function loadFromRS(ArrayObject $r): void /** * Return the list of available fuels * - * @return array + * @return array List of fuels */ public function listFuels(): array { @@ -307,8 +308,6 @@ public function listFuels(): array * * @param bool $new true if it's a new record, false to update on * that already exists. Defaults to false - * - * @return bool */ public function store(bool $new = false): bool { @@ -457,12 +456,12 @@ public function store(bool $new = false): bool * @param bool $restrict true to exclude $this->internals from returned * result, false otherwise. Default to false * - * @return array + * @return array List of properties */ private function getAllProperties(bool $restrict = false): array { $result = []; - foreach (get_class_vars(static::class) as $key => $value) { + foreach (array_keys(get_class_vars(static::class)) as $key) { if ( !$restrict || !in_array($key, $this->internals) @@ -477,7 +476,7 @@ private function getAllProperties(bool $restrict = false): array * Get object's properties. List only properties that can be modified * externally (ie. not in $this->internals) * - * @return array + * @return array List of properties */ public function getProperties(): array { @@ -491,8 +490,6 @@ public function getProperties(): array /** * Does the current car has a picture? - * - * @return bool */ public function hasPicture(): bool { @@ -503,8 +500,6 @@ public function hasPicture(): bool * Set car's owner to current logged user * * @param Login $login Login instance - * - * @return void */ public function appropriateCar(Login $login): void { @@ -589,8 +584,6 @@ public function __get(string $name): mixed * * @param string $name name of the property we want to assign a value to * @param mixed $value a relevant value for the property - * - * @return void */ public function __set(string $name, mixed $value): void { @@ -636,8 +629,6 @@ public function __set(string $name, mixed $value): void * Required for twig to access properties via __get * * @param string $name name of the property we want to retrieve - * - * @return bool */ public function __isset(string $name): bool { @@ -657,10 +648,8 @@ public function __isset(string $name): bool /** * Check posted values validity * - * @param array $post All values to check, basically the $_POST array - * after sending the form - * - * @return bool + * @param array $post All values to check, basically the $_POST array + * after sending the form */ public function check(array $post): bool { @@ -810,7 +799,7 @@ public function check(array $post): bool /** * Get errors * - * @return array + * @return array */ public function getErrors(): array { @@ -820,7 +809,7 @@ public function getErrors(): array /** * Get required fields * - * @return array + * @return array */ public function getRequired(): array { @@ -837,8 +826,6 @@ public function getRequired(): array * Handle car picture upload * * @param array $files Files sent - * - * @return bool */ public function handleFiles(array $files): bool { diff --git a/lib/GaletteAuto/Autos.php b/lib/GaletteAuto/Autos.php index d840e52..ab05e94 100644 --- a/lib/GaletteAuto/Autos.php +++ b/lib/GaletteAuto/Autos.php @@ -1,7 +1,7 @@ $ids Vehicles identifiers to delete */ public function removeVehicles(int|array $ids): bool { @@ -156,7 +154,7 @@ public function removeVehicles(int|array $ids): bool * @param int $id_adh Members id * @param ?AutosList $filters Filters * - * @return array + * @return array Vehicles list */ public function getMemberList(int $id_adh, ?AutosList $filters): array { @@ -166,14 +164,14 @@ public function getMemberList(int $id_adh, ?AutosList $filters): array /** * Get the list of all vehicles * - * @param bool $as_autos return the results as an array of Auto object. - * When true, fields are not relevant - * @param bool $mine show only current logged member cars - * @param ?array $fields field(s) name(s) to get. - * or an array. If null, all fields will be returned - * @param ?AutosList $filters Filters - * @param ?int $id_adh Member id - * @param bool $public Get public list + * @param bool $as_autos return the results as an array of Auto object. + * When true, fields are not relevant + * @param bool $mine show only current logged member cars + * @param ?array $fields field(s) name(s) to get. + * or an array. If null, all fields will be returned + * @param ?AutosList $filters Filters + * @param ?int $id_adh Member id + * @param bool $public Get public list * * @return array|ResultSet */ @@ -274,8 +272,6 @@ public function getList( * * @param Select $select Original select * @param ?AutosList $filters Filters - * - * @return void */ private function proceedCount(Select $select, ?AutosList $filters): void { @@ -313,8 +309,6 @@ private function proceedCount(Select $select, ?AutosList $filters): void /** * Get count for list - * - * @return int */ public function getCount(): int { diff --git a/lib/GaletteAuto/Body.php b/lib/GaletteAuto/Body.php index 6df0de1..4ee0103 100644 --- a/lib/GaletteAuto/Body.php +++ b/lib/GaletteAuto/Body.php @@ -1,7 +1,7 @@ * @copyright 2009-2014 The Galette Team * @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version @@ -66,8 +65,6 @@ public function __construct(Db $zdb, ?int $id = null) /** * Get field label - * - * @return string */ public function getFieldLabel(): string { @@ -76,8 +73,6 @@ public function getFieldLabel(): string /** * Get property route name - * - * @return string */ public function getRouteName(): string { @@ -105,8 +100,6 @@ public function __get(string $name): mixed /** * Get localized count string for object list - * - * @return string */ protected function getLocalizedCount(): string { diff --git a/lib/GaletteAuto/Color.php b/lib/GaletteAuto/Color.php index edc4a1f..09c2540 100644 --- a/lib/GaletteAuto/Color.php +++ b/lib/GaletteAuto/Color.php @@ -1,7 +1,7 @@ $args Route arguments */ public function redirectUri(array $args): string { @@ -325,9 +311,7 @@ public function redirectUri(array $args): string /** * Get form URI * - * @param array $args Route arguments - * - * @return string + * @param array $args Route arguments */ public function formUri(array $args): string { @@ -340,9 +324,7 @@ public function formUri(array $args): string /** * Get confirmation removal page title * - * @param array $args Route arguments - * - * @return string + * @param array $args Route arguments */ public function confirmRemoveTitle(array $args): string { @@ -367,10 +349,8 @@ public function confirmRemoveTitle(array $args): string /** * Remove object * - * @param array $args Route arguments - * @param array $post POST values - * - * @return bool + * @param array $args Route arguments + * @param array $post POST values */ protected function doDelete(array $args, array $post): bool { diff --git a/lib/GaletteAuto/Controllers/Crud/PropertiesController.php b/lib/GaletteAuto/Controllers/Crud/PropertiesController.php index ca78d9e..764e3dd 100644 --- a/lib/GaletteAuto/Controllers/Crud/PropertiesController.php +++ b/lib/GaletteAuto/Controllers/Crud/PropertiesController.php @@ -1,7 +1,7 @@ zdb); $title = _T("Brands list", "auto"); - $show_title = _T("Brand '%s'", "auto"); $add_text = _T("Add new brand", "auto"); $can_show = true; break; @@ -241,7 +212,6 @@ protected function propertiesList( $params = [ 'page_title' => $title, - //'models' => $models->getList(), 'list' => $obj->getList(), 'set' => $property, 'field_name' => $obj->getFieldLabel(), @@ -269,11 +239,7 @@ protected function propertiesList( /** * Filtering * - * @param Request $request PSR Request - * @param Response $response PSR Response - * @param string $property Property name - * - * @return Response + * @param string $property Property name */ public function filter(Request $request, Response $response, string $property): Response { @@ -302,29 +268,21 @@ public function filter(Request $request, Response $response, string $property): /** * Add property * - * @param Request $request Request - * @param Response $response Response - * @param string $property Property name - * - * @return Response + * @param string $property Property name */ public function propertyAdd(Request $request, Response $response, string $property): Response { - return $this->propertyEdit($request, $response, $property, null, 'add'); + return $this->propertyEdit($response, $property, null, 'add'); } /** * Add/edit property * - * @param Request $request Request - * @param Response $response Response - * @param string $property Property name - * @param ?int $id Property ID, if any - * @param string $action 'add' or 'edit' - * - * @return Response + * @param string $property Property name + * @param ?int $id Property ID, if any + * @param string $action 'add' or 'edit' */ - public function propertyEdit(Request $request, Response $response, string $property, ?int $id = null, string $action = 'edit'): Response + public function propertyEdit(Response $response, string $property, ?int $id = null, string $action = 'edit'): Response { $is_new = ($action === 'add'); @@ -366,11 +324,7 @@ public function propertyEdit(Request $request, Response $response, string $prope /** * Do add property * - * @param Request $request Request - * @param Response $response Response - * @param string $property Property name - * - * @return Response + * @param string $property Property name */ public function doPropertyAdd( Request $request, @@ -383,13 +337,9 @@ public function doPropertyAdd( /** * Do add/edit property * - * @param Request $request Request - * @param Response $response Response - * @param string $property Property name - * @param ?int $id Property ID, if any - * @param string $action 'add' or 'edit' - * - * @return Response + * @param string $property Property name + * @param ?int $id Property ID, if any + * @param string $action 'add' or 'edit' */ public function doPropertyEdit( Request $request, @@ -475,15 +425,10 @@ public function doPropertyEdit( /** * Show property * - * @param Request $request Request - * @param Response $response Response - * @param string $property Property name - * @param int $id Property ID, if any - * - * - * @return Response + * @param string $property Property name + * @param int $id Property ID, if any */ - public function propertyShow(Request $request, Response $response, string $property, int $id): Response + public function propertyShow(Response $response, string $property, int $id): Response { $classname = AbstractObject::getClassForPropName($property); $object = new $classname($this->zdb); @@ -521,12 +466,8 @@ public function propertyShow(Request $request, Response $response, string $prope /** * Remove property confirmation page * - * @param Request $request Request - * @param Response $response Response - * @param string $property Property name - * @param int $id Property id - * - * @return Response + * @param string $property Property name + * @param int $id Property id */ public function removeProperty(Request $request, Response $response, string $property, int $id): Response { @@ -568,12 +509,8 @@ public function removeProperty(Request $request, Response $response, string $pro /** * Do remove property * - * @param Request $request Request - * @param Response $response Response - * @param string $property Property name - * @param ?int $id Property id - * - * @return Response + * @param string $property Property name + * @param ?int $id Property id */ public function doRemoveProperty(Request $request, Response $response, string $property, ?int $id = null): Response { @@ -728,8 +665,6 @@ public function doRemoveProperty(Request $request, Response $response, string $p * Get filters * * @param AbstractObject|string $class Class name or instance - * - * @return PropertiesList */ protected function getFilters(AbstractObject|string $class): PropertiesList { @@ -743,8 +678,6 @@ protected function getFilters(AbstractObject|string $class): PropertiesList * * @param AbstractObject|string $class Class name or instance * @param PropertiesList $filters Filters instance - * - * @return void */ protected function saveFilters(AbstractObject|string $class, PropertiesList $filters): void { diff --git a/lib/GaletteAuto/Filters/AutosList.php b/lib/GaletteAuto/Filters/AutosList.php index 055c184..46fec9d 100644 --- a/lib/GaletteAuto/Filters/AutosList.php +++ b/lib/GaletteAuto/Filters/AutosList.php @@ -1,7 +1,7 @@ * - * @property int $id_car - * @property array $fields - * @property array $entries + * @property int $id_car + * @property array $fields + * @property array> $entries */ class History { @@ -43,7 +43,9 @@ class History private Db $zdb; - //fields list and type + /** + * @var array $fields fields list and type + */ private array $fields = [ Auto::PK => 'integer', Adherent::PK => 'integer', @@ -79,8 +81,6 @@ public function __construct(Db $zdb, ?int $id = null) * Loads history for specified car * * @param int $id car's id we want history for - * - * @return bool */ public function load(int $id): bool { @@ -110,7 +110,7 @@ public function load(int $id): bool /** * Get the most recent history entry * - * @return ArrayObject|false row + * @return ArrayObject|false row */ public function getLatest(): ArrayObject|false { @@ -143,8 +143,6 @@ public function getLatest(): ArrayObject|false * Format entries dates, also loads Member * * @param array> $entries list of entries to format - * - * @return void */ private function formatEntries(array $entries): void { @@ -172,9 +170,7 @@ private function formatEntries(array $entries): void /** * Register a new history entry. * - * @param array $props list of properties to update - * - * @return void + * @param array $props list of properties to update */ public function register(array $props): void { diff --git a/lib/GaletteAuto/Model.php b/lib/GaletteAuto/Model.php index c5c2959..dd70bc6 100644 --- a/lib/GaletteAuto/Model.php +++ b/lib/GaletteAuto/Model.php @@ -1,7 +1,7 @@ * - * @property int $id - * @property string $model - * @property Brand $brand + * @property int $id + * @property string $model + * @property Brand $brand */ class Model { @@ -54,8 +54,8 @@ class Model /** * Default constructor * - * @param Db $zdb Database instance - * @param ArrayObject|int|null $args model's id to load or ResultSet. Defaults to null + * @param Db $zdb Database instance + * @param ArrayObject|int|null $args model's id to load or ResultSet. Defaults to null */ public function __construct(Db $zdb, ArrayObject|int|null $args = null) { @@ -73,8 +73,6 @@ public function __construct(Db $zdb, ArrayObject|int|null $args = null) * Load a model * * @param int $id Id for the model we want - * - * @return bool */ public function load(int $id): bool { @@ -106,9 +104,7 @@ public function load(int $id): bool /** * Populate object from a resultset row * - * @param ArrayObject $r the resultset row - * - * @return void + * @param ArrayObject $r the resultset row */ private function loadFromRS(ArrayObject $r): void { @@ -122,8 +118,6 @@ private function loadFromRS(ArrayObject $r): void * Store current model * * @param bool $new New record or existing one - * - * @return bool */ public function store(bool $new = false): bool { @@ -166,9 +160,7 @@ public function store(bool $new = false): bool /** * Delete some models * - * @param array $ids Array of models id to delete - * - * @return bool + * @param array $ids Array of models id to delete */ public function delete(array $ids): bool { @@ -204,8 +196,6 @@ public function __get(string $name): mixed * Required for twig to access properties via __get * * @param string $name name of the property we want to retrieve - * - * @return bool */ public function __isset(string $name): bool { @@ -215,10 +205,8 @@ public function __isset(string $name): bool /** * Check posted values validity * - * @param array $post All values to check, basically the $_POST array - * after sending the form - * - * @return bool + * @param array $post All values to check, basically the $_POST array + * after sending the form */ public function check(array $post): bool { @@ -251,8 +239,6 @@ public function getErrors(): array * Set brand from ID * * @param int $id Brand ID - * - * @return self */ public function setBrand(int $id): self { diff --git a/lib/GaletteAuto/Picture.php b/lib/GaletteAuto/Picture.php index 55f41f5..e0f3fe8 100644 --- a/lib/GaletteAuto/Picture.php +++ b/lib/GaletteAuto/Picture.php @@ -1,7 +1,7 @@ > */ public static function getMenusContents(): array { @@ -124,7 +124,7 @@ public static function getMenusContents(): array /** * Extra public menus entries * - * @return array|array[] + * @return array> */ public static function getPublicMenusItemsList(): array { @@ -142,7 +142,7 @@ public static function getPublicMenusItemsList(): array /** * Get current logged-in user dashboards contents * - * @return array|array[] + * @return array> */ public static function getMyDashboardsContents(): array { @@ -167,7 +167,7 @@ public static function getMyDashboardsContents(): array /** * Get dashboards contents * - * @return array|array[] + * @return array> */ public static function getDashboardsContents(): array { @@ -200,7 +200,7 @@ public static function getListActionsContents(Adherent $member): array * * @param Adherent $member Member instance * - * @return array|array[] + * @return array> */ public static function getDetailedActionsContents(Adherent $member): array { @@ -210,7 +210,7 @@ public static function getDetailedActionsContents(Adherent $member): array /** * Get batch actions contents * - * @return array|array[] + * @return array> */ public static function getBatchActionsContents(): array { diff --git a/lib/GaletteAuto/Repository/Models.php b/lib/GaletteAuto/Repository/Models.php index da09e7d..14da5fc 100644 --- a/lib/GaletteAuto/Repository/Models.php +++ b/lib/GaletteAuto/Repository/Models.php @@ -1,7 +1,7 @@ SQL ORDER clause */ private function buildOrderClause(): array { @@ -149,8 +149,6 @@ private function buildOrderClause(): array * Count contributions from the query * * @param Select $select Original select - * - * @return void */ private function proceedCount(Select $select): void { @@ -187,8 +185,6 @@ private function proceedCount(Select $select): void * Add default values in database * * @param bool $check_first Check first if it seems initialized, defaults to true - * - * @return bool */ public function installInit(bool $check_first = true): bool { @@ -197,8 +193,6 @@ public function installInit(bool $check_first = true): bool /** * Get count for current query - * - * @return int */ public function getCount(): int { diff --git a/lib/GaletteAuto/State.php b/lib/GaletteAuto/State.php index f77fd51..e14989c 100644 --- a/lib/GaletteAuto/State.php +++ b/lib/GaletteAuto/State.php @@ -1,7 +1,7 @@