From 9b243b616f66e3c0eb3fff85cc35dfbd604ab0eb Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Sat, 3 Jan 2026 21:24:39 +0100 Subject: [PATCH 1/4] Fix tests namespace --- tests/GaletteObjectsLend/Entity/tests/units/LendCategory.php | 2 +- tests/GaletteObjectsLend/Entity/tests/units/LendObject.php | 2 +- tests/GaletteObjectsLend/Entity/tests/units/LendRent.php | 2 +- tests/GaletteObjectsLend/Entity/tests/units/LendStatus.php | 2 +- tests/GaletteObjectsLend/Entity/tests/units/Preferences.php | 2 +- tests/GaletteObjectsLend/Filters/tests/units/CategoriesList.php | 2 +- tests/GaletteObjectsLend/Filters/tests/units/ObjectsList.php | 2 +- tests/GaletteObjectsLend/Filters/tests/units/StatusList.php | 2 +- tests/GaletteObjectsLend/Repository/tests/units/Categories.php | 2 +- tests/GaletteObjectsLend/Repository/tests/units/Objects.php | 2 +- tests/GaletteObjectsLend/Repository/tests/units/Status.php | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/GaletteObjectsLend/Entity/tests/units/LendCategory.php b/tests/GaletteObjectsLend/Entity/tests/units/LendCategory.php index 2610a81..8bd2c5a 100644 --- a/tests/GaletteObjectsLend/Entity/tests/units/LendCategory.php +++ b/tests/GaletteObjectsLend/Entity/tests/units/LendCategory.php @@ -21,7 +21,7 @@ namespace GaletteObjectsLends\Entity\tests\units; -use Galette\GaletteTestCase; +use Galette\Tests\GaletteTestCase; /** * Category tests diff --git a/tests/GaletteObjectsLend/Entity/tests/units/LendObject.php b/tests/GaletteObjectsLend/Entity/tests/units/LendObject.php index 12b0fb1..8577fb8 100644 --- a/tests/GaletteObjectsLend/Entity/tests/units/LendObject.php +++ b/tests/GaletteObjectsLend/Entity/tests/units/LendObject.php @@ -21,7 +21,7 @@ namespace GaletteObjectsLends\Entity\tests\units; -use Galette\GaletteTestCase; +use Galette\Tests\GaletteTestCase; /** * Status tests diff --git a/tests/GaletteObjectsLend/Entity/tests/units/LendRent.php b/tests/GaletteObjectsLend/Entity/tests/units/LendRent.php index d4c1c3c..90a200c 100644 --- a/tests/GaletteObjectsLend/Entity/tests/units/LendRent.php +++ b/tests/GaletteObjectsLend/Entity/tests/units/LendRent.php @@ -21,7 +21,7 @@ namespace GaletteObjectsLends\Entity\tests\units; -use Galette\GaletteTestCase; +use Galette\Tests\GaletteTestCase; /** * Status tests diff --git a/tests/GaletteObjectsLend/Entity/tests/units/LendStatus.php b/tests/GaletteObjectsLend/Entity/tests/units/LendStatus.php index a304304..103f726 100644 --- a/tests/GaletteObjectsLend/Entity/tests/units/LendStatus.php +++ b/tests/GaletteObjectsLend/Entity/tests/units/LendStatus.php @@ -21,7 +21,7 @@ namespace GaletteObjectsLends\Entity\tests\units; -use Galette\GaletteTestCase; +use Galette\Tests\GaletteTestCase; /** * Status tests diff --git a/tests/GaletteObjectsLend/Entity/tests/units/Preferences.php b/tests/GaletteObjectsLend/Entity/tests/units/Preferences.php index 092c568..4895a7b 100644 --- a/tests/GaletteObjectsLend/Entity/tests/units/Preferences.php +++ b/tests/GaletteObjectsLend/Entity/tests/units/Preferences.php @@ -21,7 +21,7 @@ namespace GaletteObjectsLends\Entity\tests\units; -use Galette\GaletteTestCase; +use Galette\Tests\GaletteTestCase; /** * Preferences tests diff --git a/tests/GaletteObjectsLend/Filters/tests/units/CategoriesList.php b/tests/GaletteObjectsLend/Filters/tests/units/CategoriesList.php index cb8704f..453c36f 100644 --- a/tests/GaletteObjectsLend/Filters/tests/units/CategoriesList.php +++ b/tests/GaletteObjectsLend/Filters/tests/units/CategoriesList.php @@ -23,7 +23,7 @@ namespace GaletteObjectslend\Filters\test\units; -use Galette\GaletteTestCase; +use Galette\Tests\GaletteTestCase; /** * Categories filters tests class diff --git a/tests/GaletteObjectsLend/Filters/tests/units/ObjectsList.php b/tests/GaletteObjectsLend/Filters/tests/units/ObjectsList.php index f28b1e0..355d6dc 100644 --- a/tests/GaletteObjectsLend/Filters/tests/units/ObjectsList.php +++ b/tests/GaletteObjectsLend/Filters/tests/units/ObjectsList.php @@ -23,7 +23,7 @@ namespace GaletteObjectslend\Filters\test\units; -use Galette\GaletteTestCase; +use Galette\Tests\GaletteTestCase; /** * Objects filters tests class diff --git a/tests/GaletteObjectsLend/Filters/tests/units/StatusList.php b/tests/GaletteObjectsLend/Filters/tests/units/StatusList.php index 3cbb573..58c18d6 100644 --- a/tests/GaletteObjectsLend/Filters/tests/units/StatusList.php +++ b/tests/GaletteObjectsLend/Filters/tests/units/StatusList.php @@ -23,7 +23,7 @@ namespace GaletteObjectslend\Filters\test\units; -use Galette\GaletteTestCase; +use Galette\Tests\GaletteTestCase; /** * Status filters tests class diff --git a/tests/GaletteObjectsLend/Repository/tests/units/Categories.php b/tests/GaletteObjectsLend/Repository/tests/units/Categories.php index 567a958..da26d60 100644 --- a/tests/GaletteObjectsLend/Repository/tests/units/Categories.php +++ b/tests/GaletteObjectsLend/Repository/tests/units/Categories.php @@ -21,7 +21,7 @@ namespace GaletteObjectsLends\Repository\tests\units; -use Galette\GaletteTestCase; +use Galette\Tests\GaletteTestCase; /** * Categories tests diff --git a/tests/GaletteObjectsLend/Repository/tests/units/Objects.php b/tests/GaletteObjectsLend/Repository/tests/units/Objects.php index 4d4e6e2..78de04d 100644 --- a/tests/GaletteObjectsLend/Repository/tests/units/Objects.php +++ b/tests/GaletteObjectsLend/Repository/tests/units/Objects.php @@ -21,7 +21,7 @@ namespace GaletteObjectsLends\Repository\tests\units; -use Galette\GaletteTestCase; +use Galette\Tests\GaletteTestCase; /** * Categories tests diff --git a/tests/GaletteObjectsLend/Repository/tests/units/Status.php b/tests/GaletteObjectsLend/Repository/tests/units/Status.php index b1f64f4..272708c 100644 --- a/tests/GaletteObjectsLend/Repository/tests/units/Status.php +++ b/tests/GaletteObjectsLend/Repository/tests/units/Status.php @@ -21,7 +21,7 @@ namespace GaletteObjectsLends\Repository\tests\units; -use Galette\GaletteTestCase; +use Galette\Tests\GaletteTestCase; /** * Categories tests From d371a8eaf6b2ca966c0a6da4e2e436a24d692b78 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Sat, 3 Jan 2026 21:24:59 +0100 Subject: [PATCH 2/4] Fix Core composer path --- .github/workflows/ci-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-linux.yml b/.github/workflows/ci-linux.yml index 5ac9a83..e198da9 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 From 674f1a7df3d36a6802c88d1a5e17a2146bcc012a Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Sat, 3 Jan 2026 21:25:50 +0100 Subject: [PATCH 3/4] cs-fixer --- .php-cs-fixer.dist.php | 55 +++++++++- _routes.php | 15 --- .../Controllers/Crud/CategoriesController.php | 20 ---- .../Controllers/Crud/ObjectsController.php | 34 ------ .../Controllers/Crud/StatusController.php | 20 ---- .../Controllers/ImagesController.php | 2 - .../Controllers/MainController.php | 4 - .../Controllers/PdfController.php | 4 - .../Entity/LendCategory.php | 28 +---- lib/GaletteObjectsLend/Entity/LendObject.php | 101 ++++-------------- lib/GaletteObjectsLend/Entity/LendRent.php | 32 ++---- lib/GaletteObjectsLend/Entity/LendStatus.php | 18 +--- lib/GaletteObjectsLend/Entity/Picture.php | 14 --- lib/GaletteObjectsLend/Entity/Preferences.php | 42 +++----- .../Filters/CategoriesList.php | 16 +-- .../Filters/ObjectsList.php | 20 +--- lib/GaletteObjectsLend/Filters/StatusList.php | 12 +-- lib/GaletteObjectsLend/IO/PdfObject.php | 8 -- lib/GaletteObjectsLend/IO/PdfObjects.php | 6 -- .../Repository/Categories.php | 8 -- lib/GaletteObjectsLend/Repository/Objects.php | 10 -- lib/GaletteObjectsLend/Repository/Status.php | 8 -- .../Entity/tests/units/LendCategory.php | 8 +- .../Entity/tests/units/LendObject.php | 14 +-- .../Entity/tests/units/LendRent.php | 13 +-- .../Entity/tests/units/LendStatus.php | 8 +- .../Entity/tests/units/Preferences.php | 6 +- .../Filters/tests/units/CategoriesList.php | 12 +-- .../Filters/tests/units/ObjectsList.php | 12 +-- .../Filters/tests/units/StatusList.php | 12 +-- .../Repository/tests/units/Categories.php | 6 +- .../Repository/tests/units/Objects.php | 8 +- .../Repository/tests/units/Status.php | 6 +- tests/TestsBootstrap.php | 2 + 34 files changed, 143 insertions(+), 441 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 09fc4ee..598d4a1 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/_routes.php b/_routes.php index 54d4713..02059ad 100644 --- a/_routes.php +++ b/_routes.php @@ -21,24 +21,9 @@ declare(strict_types=1); -use Analog\Analog; -use Galette\Entity\ContributionsTypes; -use Galette\Entity\Adherent; -use Galette\Entity\Contribution; -use Galette\Repository\Members; -use GaletteObjectsLend\Entity\Preferences; -use GaletteObjectsLend\Entity\ObjectPicture; -use GaletteObjectsLend\Entity\CategoryPicture; -use GaletteObjectsLend\Entity\LendCategory; -use GaletteObjectsLend\Entity\LendStatus; -use GaletteObjectsLend\Entity\LendObject; -use GaletteObjectsLend\Entity\LendRent; use GaletteObjectsLend\Repository\Categories; use GaletteObjectsLend\Repository\Objects; use GaletteObjectsLend\Repository\Status; -use GaletteObjectsLend\Filters\StatusList; -use GaletteObjectsLend\Filters\ObjectsList; -use GaletteObjectsLend\Filters\CategoriesList; use GaletteObjectsLend\Controllers\Crud\CategoriesController; use GaletteObjectsLend\Controllers\ImagesController; use GaletteObjectsLend\Controllers\Crud\StatusController; diff --git a/lib/GaletteObjectsLend/Controllers/Crud/CategoriesController.php b/lib/GaletteObjectsLend/Controllers/Crud/CategoriesController.php index 206ace6..b36f180 100644 --- a/lib/GaletteObjectsLend/Controllers/Crud/CategoriesController.php +++ b/lib/GaletteObjectsLend/Controllers/Crud/CategoriesController.php @@ -55,8 +55,6 @@ class CategoriesController extends AbstractPluginController * * @param Request $request PSR Request * @param Response $response PSR Response - * - * @return Response */ public function add(Request $request, Response $response): Response { @@ -68,8 +66,6 @@ public function add(Request $request, Response $response): Response * * @param Request $request PSR Request * @param Response $response PSR Response - * - * @return Response */ public function doAdd(Request $request, Response $response): Response { @@ -86,8 +82,6 @@ public function doAdd(Request $request, Response $response): Response * @param Response $response PSR Response * @param string|null $option One of 'page' or 'order' * @param int|string|null $value Value of the option - * - * @return Response */ public function list(Request $request, Response $response, ?string $option = null, int|string|null $value = null): Response { @@ -139,8 +133,6 @@ public function list(Request $request, Response $response, ?string $option = nul * * @param Request $request PSR Request * @param Response $response PSR Response - * - * @return Response */ public function filter(Request $request, Response $response): Response { @@ -190,8 +182,6 @@ public function filter(Request $request, Response $response): Response * @param Response $response PSR Response * @param int|null $id Model id * @param string $action Action - * - * @return Response */ public function edit(Request $request, Response $response, ?int $id = null, string $action = 'edit'): Response { @@ -235,8 +225,6 @@ public function edit(Request $request, Response $response, ?int $id = null, stri * @param Response $response PSR Response * @param null|int $id Model id for edit * @param string $action Either add or edit - * - * @return Response */ public function doEdit(Request $request, Response $response, ?int $id = null, string $action = 'edit'): Response { @@ -305,8 +293,6 @@ public function doEdit(Request $request, Response $response, ?int $id = null, st * Get redirection URI * * @param array $args Route arguments - * - * @return string */ public function redirectUri(array $args): string { @@ -317,8 +303,6 @@ public function redirectUri(array $args): string * Get form URI * * @param array $args Route arguments - * - * @return string */ public function formUri(array $args): string { @@ -332,8 +316,6 @@ public function formUri(array $args): string * Get confirmation removal page title * * @param array $args Route arguments - * - * @return string */ public function confirmRemoveTitle(array $args): string { @@ -349,8 +331,6 @@ public function confirmRemoveTitle(array $args): string * * @param array $args Route arguments * @param array $post POST values - * - * @return bool */ protected function doDelete(array $args, array $post): bool { diff --git a/lib/GaletteObjectsLend/Controllers/Crud/ObjectsController.php b/lib/GaletteObjectsLend/Controllers/Crud/ObjectsController.php index 3cc45e4..38e5d9c 100644 --- a/lib/GaletteObjectsLend/Controllers/Crud/ObjectsController.php +++ b/lib/GaletteObjectsLend/Controllers/Crud/ObjectsController.php @@ -65,8 +65,6 @@ class ObjectsController extends AbstractPluginController * * @param Request $request PSR Request * @param Response $response PSR Response - * - * @return Response */ public function add(Request $request, Response $response): Response { @@ -78,8 +76,6 @@ public function add(Request $request, Response $response): Response * * @param Request $request PSR Request * @param Response $response PSR Response - * - * @return Response */ public function doAdd(Request $request, Response $response): Response { @@ -96,8 +92,6 @@ public function doAdd(Request $request, Response $response): Response * @param Response $response PSR Response * @param string|null $option One of 'page' or 'order' * @param int|string|null $value Value of the option - * - * @return Response */ public function list(Request $request, Response $response, ?string $option = null, int|string|null $value = null): Response { @@ -166,8 +160,6 @@ public function list(Request $request, Response $response, ?string $option = nul * * @param Request $request PSR Request * @param Response $response PSR Response - * - * @return Response */ public function filter(Request $request, Response $response): Response { @@ -211,8 +203,6 @@ public function filter(Request $request, Response $response): Response * @param Request $request PSR Request * @param Response $response PSR Response * @param int $id Object id - * - * @return Response */ public function show(Request $request, Response $response, int $id): Response { @@ -253,8 +243,6 @@ public function show(Request $request, Response $response, int $id): Response * * @param Request $request PSR Request * @param Response $response PSR Response - * - * @return Response */ public function handleBatch(Request $request, Response $response): Response { @@ -305,8 +293,6 @@ public function handleBatch(Request $request, Response $response): Response * @param Response $response PSR Response * @param int|null $id Object id * @param string $action Action - * - * @return Response */ public function edit(Request $request, Response $response, ?int $id = null, string $action = 'edit'): Response { @@ -379,8 +365,6 @@ public function edit(Request $request, Response $response, ?int $id = null, stri * @param Response $response PSR Response * @param null|int $id Object id for edit * @param string $action Either add or edit - * - * @return Response */ public function doEdit(Request $request, Response $response, ?int $id = null, string $action = 'edit'): Response { @@ -478,8 +462,6 @@ public function doEdit(Request $request, Response $response, ?int $id = null, st * @param Response $response PSR Response * @param null|int $id Object id for edit * @param string $action Either add or edit - * - * @return Response */ public function doUpdateStatus(Request $request, Response $response, ?int $id = null, string $action = 'edit'): Response { @@ -517,8 +499,6 @@ public function doUpdateStatus(Request $request, Response $response, ?int $id = * @param Request $request PSR Request * @param Response $response PSR Response * @param int $id Object id for edit - * - * @return Response */ public function doClone(Request $request, Response $response, int $id): Response { @@ -558,8 +538,6 @@ public function doClone(Request $request, Response $response, int $id): Response * @param Response $response PSR Response * @param string $action Action (either 'take' or 'return') * @param int $id Objects ID - * - * @return Response */ public function lend(Request $request, Response $response, string $action, int $id): Response { @@ -705,8 +683,6 @@ public function lend(Request $request, Response $response, string $action, int $ * @param Request $request PSR Request * @param Response $response PSR Response * @param int $id Objects ID - * - * @return Response */ public function doTake(Request $request, Response $response, int $id): Response { @@ -860,8 +836,6 @@ public function doTake(Request $request, Response $response, int $id): Response * @param Request $request PSR Request * @param Response $response PSR Response * @param int $id Objects ID - * - * @return Response */ public function doReturn(Request $request, Response $response, int $id): Response { @@ -950,8 +924,6 @@ public function doReturn(Request $request, Response $response, int $id): Respons * Get redirection URI * * @param array $args Route arguments - * - * @return string */ public function redirectUri(array $args): string { @@ -962,8 +934,6 @@ public function redirectUri(array $args): string * Get form URI * * @param array $args Route arguments - * - * @return string */ public function formUri(array $args): string { @@ -999,8 +969,6 @@ protected function getIdsToRemove(array &$args, ?array $post): array|int|null * Get confirmation removal page title * * @param array $args Route arguments - * - * @return string */ public function confirmRemoveTitle(array $args): string { @@ -1027,8 +995,6 @@ public function confirmRemoveTitle(array $args): string * * @param array $args Route arguments * @param array $post POST values - * - * @return bool */ protected function doDelete(array $args, array $post): bool { diff --git a/lib/GaletteObjectsLend/Controllers/Crud/StatusController.php b/lib/GaletteObjectsLend/Controllers/Crud/StatusController.php index c397932..4a329c2 100644 --- a/lib/GaletteObjectsLend/Controllers/Crud/StatusController.php +++ b/lib/GaletteObjectsLend/Controllers/Crud/StatusController.php @@ -53,8 +53,6 @@ class StatusController extends AbstractPluginController * * @param Request $request PSR Request * @param Response $response PSR Response - * - * @return Response */ public function add(Request $request, Response $response): Response { @@ -66,8 +64,6 @@ public function add(Request $request, Response $response): Response * * @param Request $request PSR Request * @param Response $response PSR Response - * - * @return Response */ public function doAdd(Request $request, Response $response): Response { @@ -84,8 +80,6 @@ public function doAdd(Request $request, Response $response): Response * @param Response $response PSR Response * @param string|null $option One of 'page' or 'order' * @param int|string|null $value Value of the option - * - * @return Response */ public function list(Request $request, Response $response, ?string $option = null, int|string|null $value = null): Response { @@ -150,8 +144,6 @@ public function list(Request $request, Response $response, ?string $option = nul * * @param Request $request PSR Request * @param Response $response PSR Response - * - * @return Response */ public function filter(Request $request, Response $response): Response { @@ -208,8 +200,6 @@ public function filter(Request $request, Response $response): Response * @param Response $response PSR Response * @param int|null $id Model id * @param string $action Action - * - * @return Response */ public function edit(Request $request, Response $response, ?int $id = null, string $action = 'edit'): Response { @@ -252,8 +242,6 @@ public function edit(Request $request, Response $response, ?int $id = null, stri * @param Response $response PSR Response * @param null|int $id Model id for edit * @param string $action Either add or edit - * - * @return Response */ public function doEdit(Request $request, Response $response, ?int $id = null, string $action = 'edit'): Response { @@ -312,8 +300,6 @@ public function doEdit(Request $request, Response $response, ?int $id = null, st * Get redirection URI * * @param array $args Route arguments - * - * @return string */ public function redirectUri(array $args): string { @@ -324,8 +310,6 @@ public function redirectUri(array $args): string * Get form URI * * @param array $args Route arguments - * - * @return string */ public function formUri(array $args): string { @@ -339,8 +323,6 @@ public function formUri(array $args): string * Get confirmation removal page title * * @param array $args Route arguments - * - * @return string */ public function confirmRemoveTitle(array $args): string { @@ -356,8 +338,6 @@ public function confirmRemoveTitle(array $args): string * * @param array $args Route arguments * @param array $post POST values - * - * @return bool */ protected function doDelete(array $args, array $post): bool { diff --git a/lib/GaletteObjectsLend/Controllers/ImagesController.php b/lib/GaletteObjectsLend/Controllers/ImagesController.php index 5149985..1818b2c 100644 --- a/lib/GaletteObjectsLend/Controllers/ImagesController.php +++ b/lib/GaletteObjectsLend/Controllers/ImagesController.php @@ -46,8 +46,6 @@ class ImagesController extends GImagesController * @param string $type Requested type (category or object) * @param string $mode Either thumbnail or photo * @param ?int $id Object id - * - * @return Response */ public function lendPicture(Request $request, Response $response, string $type, string $mode, ?int $id = null): Response { diff --git a/lib/GaletteObjectsLend/Controllers/MainController.php b/lib/GaletteObjectsLend/Controllers/MainController.php index 6172a9d..1d50975 100644 --- a/lib/GaletteObjectsLend/Controllers/MainController.php +++ b/lib/GaletteObjectsLend/Controllers/MainController.php @@ -49,8 +49,6 @@ class MainController extends AbstractPluginController * * @param Request $request PSR Request * @param Response $response PSR Response - * - * @return Response */ public function preferences(Request $request, Response $response): Response { @@ -89,8 +87,6 @@ public function preferences(Request $request, Response $response): Response * * @param Request $request PSR Request * @param Response $response PSR Response - * - * @return Response */ public function storePreferences(Request $request, Response $response): Response { diff --git a/lib/GaletteObjectsLend/Controllers/PdfController.php b/lib/GaletteObjectsLend/Controllers/PdfController.php index 413b3df..da41667 100644 --- a/lib/GaletteObjectsLend/Controllers/PdfController.php +++ b/lib/GaletteObjectsLend/Controllers/PdfController.php @@ -47,8 +47,6 @@ class PdfController extends GPdfController * @param Request $request PSR Request * @param Response $response PSR Response * @param int $id Object ID - * - * @return Response */ public function printObject(Request $request, Response $response, int $id): Response { @@ -81,8 +79,6 @@ public function printObject(Request $request, Response $response, int $id): Resp * * @param Request $request PSR Request * @param Response $response PSR Response - * - * @return Response */ public function printObjects(Request $request, Response $response): Response { diff --git a/lib/GaletteObjectsLend/Entity/LendCategory.php b/lib/GaletteObjectsLend/Entity/LendCategory.php index af3393f..681de68 100644 --- a/lib/GaletteObjectsLend/Entity/LendCategory.php +++ b/lib/GaletteObjectsLend/Entity/LendCategory.php @@ -34,9 +34,9 @@ * @author Mélissa Djebel * @author Johan Cwiklinski * - * @property bool $is_active - * @property string $name - * @property int $category_id + * @property bool $is_active + * @property string $name + * @property int $category_id * @property CategoryPicture $picture */ class LendCategory @@ -112,8 +112,6 @@ public function __construct(Db $zdb, int|ArrayObject|null $args = null, ?array $ * Populate object from a resultset row * * @param ArrayObject $r the resultset row - * - * @return void */ private function loadFromRS(ArrayObject $r): void { @@ -136,8 +134,6 @@ private function loadFromRS(ArrayObject $r): void /** * Store category - * - * @return bool */ public function store(): bool { @@ -189,8 +185,6 @@ public function store(): bool /** * Drop a category. All objects for removed category will be assigned to none. - * - * @return bool */ public function delete(): bool { @@ -227,8 +221,6 @@ public function delete(): bool * Get category name * * @param bool $count Whether to display count along with name (defaults to true) - * - * @return string */ public function getName(bool $count = true): string { @@ -264,8 +256,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 { @@ -274,8 +264,6 @@ public function __set(string $name, mixed $value): void /** * Get object ID - * - * @return ?int */ public function getId(): ?int { @@ -284,8 +272,6 @@ public function getId(): ?int /** * Is object active - * - * @return bool */ public function isActive(): bool { @@ -294,8 +280,6 @@ public function isActive(): bool /** * Get picture - * - * @return ?CategoryPicture */ public function getPicture(): ?CategoryPicture { @@ -304,8 +288,6 @@ public function getPicture(): ?CategoryPicture /** * Get sum - * - * @return float */ public function getSum(): float { @@ -314,8 +296,6 @@ public function getSum(): float /** * Get objects count - * - * @return int */ public function getObjectsNb(): int { @@ -326,8 +306,6 @@ public function getObjectsNb(): int * Generic isset function * * @param string $name Property name - * - * @return bool */ public function __isset(string $name): bool { diff --git a/lib/GaletteObjectsLend/Entity/LendObject.php b/lib/GaletteObjectsLend/Entity/LendObject.php index 2b24506..885c726 100644 --- a/lib/GaletteObjectsLend/Entity/LendObject.php +++ b/lib/GaletteObjectsLend/Entity/LendObject.php @@ -36,29 +36,29 @@ * @author Mélissa Djebel * @author Johan Cwiklinski * - * @property ?int $object_id + * @property ?int $object_id * @property ObjectPicture $picture - * @property string $name - * @property string $description - * @property string $serial_number - * @property float $price - * @property float $rent_price - * @property float $value_rent_price - * @property bool $price_per_day - * @property string $dimension - * @property float $weight - * @property bool $is_active - * @property string $cat_name - * @property string $status_text - * @property string $date_begin - * @property Adherent $member - * @property string $date_forecast - * @property array $rents - * @property int $category_id - * @property string $nom_adh - * @property string $prenom_adh - * @property string $currency - * @property bool $in_stock + * @property string $name + * @property string $description + * @property string $serial_number + * @property float $price + * @property float $rent_price + * @property float $value_rent_price + * @property bool $price_per_day + * @property string $dimension + * @property float $weight + * @property bool $is_active + * @property string $cat_name + * @property string $status_text + * @property string $date_begin + * @property Adherent $member + * @property string $date_forecast + * @property array $rents + * @property int $category_id + * @property string $nom_adh + * @property string $prenom_adh + * @property string $currency + * @property bool $in_stock */ class LendObject { @@ -218,8 +218,6 @@ public function __construct(Db $zdb, int|ArrayObject|null $args = null, ?array $ * Populate object from a resultset row * * @param ArrayObject $r the resultset row - * - * @return void */ private function loadFromRS(ArrayObject $r): void { @@ -303,8 +301,6 @@ private function loadFromRS(ArrayObject $r): void /** * Store object - * - * @return bool */ public function store(): bool { @@ -391,8 +387,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 { @@ -415,8 +409,6 @@ public function __set(string $name, mixed $value): void /** * Get currency - * - * @return string */ public function getCurrency(): string { @@ -425,8 +417,6 @@ public function getCurrency(): string /** * Get current rent - * - * @return LendRent|null */ public function getCurrentRent(): ?LendRent { @@ -440,8 +430,6 @@ public function getCurrentRent(): ?LendRent * Is current object active? * * Check for activity from object and from its parent category if any - * - * @return bool */ public function isActive(): bool { @@ -453,8 +441,6 @@ public function isActive(): bool * * @param ObjectsList $filters Filters * @param string $field Field name - * - * @return string */ private function getHighlighted(ObjectsList $filters, string $field): string { @@ -499,8 +485,6 @@ private function getHighlighted(ObjectsList $filters, string $field): string * Displays name, with search terms highlighted * * @param ObjectsList $filters Filters - * - * @return string */ public function displayName(ObjectsList $filters): string { @@ -511,8 +495,6 @@ public function displayName(ObjectsList $filters): string * Displays description, with search terms highlighted * * @param ObjectsList $filters Filters - * - * @return string */ public function displayDescription(ObjectsList $filters): string { @@ -523,8 +505,6 @@ public function displayDescription(ObjectsList $filters): string * Displays serial number, with search terms highlighted * * @param ObjectsList $filters Filters - * - * @return string */ public function displaySerial(ObjectsList $filters): string { @@ -535,8 +515,6 @@ public function displaySerial(ObjectsList $filters): string * Displays dimension, with search terms highlighted * * @param ObjectsList $filters Filters - * - * @return string */ public function displayDimension(ObjectsList $filters): string { @@ -545,8 +523,6 @@ public function displayDimension(ObjectsList $filters): string /** * Delete object - * - * @return bool */ public function delete(): bool { @@ -578,8 +554,6 @@ public function delete(): bool /** * Clone object - * - * @return bool */ public function clone(): bool { @@ -592,8 +566,6 @@ public function clone(): bool /** * Get ID - * - * @return ?int */ public function getId(): ?int { @@ -602,8 +574,6 @@ public function getId(): ?int /** * Get name - * - * @return string */ public function getName(): string { @@ -612,8 +582,6 @@ public function getName(): string /** * Get picture - * - * @return ObjectPicture */ public function getPicture(): ObjectPicture { @@ -622,8 +590,6 @@ public function getPicture(): ObjectPicture /** * Get price - * - * @return float */ public function getPrice(): float { @@ -632,8 +598,6 @@ public function getPrice(): float /** * Get rent price - * - * @return float */ public function getRentPrice(): float { @@ -642,8 +606,6 @@ public function getRentPrice(): float /** * Is a price per day - * - * @return bool */ public function isPricePerDay(): bool { @@ -652,8 +614,6 @@ public function isPricePerDay(): bool /** * Get weight - * - * @return float */ public function getWeight(): float { @@ -662,8 +622,6 @@ public function getWeight(): float /** * Get textual status - * - * @return string */ public function getStatusText(): string { @@ -672,8 +630,6 @@ public function getStatusText(): string /** * Is in stock - * - * @return bool */ public function inStock(): bool { @@ -683,7 +639,6 @@ public function inStock(): bool /** * Get localized begin date * - * @return string * @throws \Exception */ public function getDateBegin(): string @@ -694,7 +649,6 @@ public function getDateBegin(): string /** * Get localized forecast date * - * @return string * @throws \Exception */ public function getDateForecast(): string @@ -704,8 +658,6 @@ public function getDateForecast(): string /** * Get member ID - * - * @return ?int */ public function getIdAdh(): ?int { @@ -714,8 +666,6 @@ public function getIdAdh(): ?int /** * Get rent ID - * - * @return ?int */ public function getRentId(): ?int { @@ -724,8 +674,6 @@ public function getRentId(): ?int /** * Get category ID - * - * @return ?int */ public function getCategoryId(): ?int { @@ -734,8 +682,6 @@ public function getCategoryId(): ?int /** * Get serial number - * - * @return string */ public function getSerialNumber(): string { @@ -747,7 +693,6 @@ public function getSerialNumber(): string * * @param string $name Field name * - * @return string * @throws \Exception */ protected function getDateField(string $name): string @@ -764,8 +709,6 @@ protected function getDateField(string $name): string * Generic isset function * * @param string $name Property name - * - * @return bool */ public function __isset(string $name): bool { diff --git a/lib/GaletteObjectsLend/Entity/LendRent.php b/lib/GaletteObjectsLend/Entity/LendRent.php index 407541a..047565e 100644 --- a/lib/GaletteObjectsLend/Entity/LendRent.php +++ b/lib/GaletteObjectsLend/Entity/LendRent.php @@ -34,20 +34,20 @@ * @author Mélissa Djebel * @author Johan Cwiklinski * - * @property int $rent_id - * @property int $object_id + * @property int $rent_id + * @property int $object_id * @property ?string $date_begin * @property ?string $date_forecast * @property ?string $date_end - * @property int $status_id - * @property ?int $adherent_id - * @property string $comments - * @property bool $in_stock - * @property string $status_text - * @property string $nom_adh - * @property string $prenom_adh - * @property string $pseudo_adh - * @property string $email_adh + * @property int $status_id + * @property ?int $adherent_id + * @property string $comments + * @property bool $in_stock + * @property string $status_text + * @property string $nom_adh + * @property string $prenom_adh + * @property string $pseudo_adh + * @property string $email_adh */ class LendRent { @@ -118,8 +118,6 @@ public function __construct(int|ArrayObject|null $args = null) * Populate object from a resultset row * * @param ArrayObject $r the resultset row - * - * @return void */ private function loadFromRS(ArrayObject $r): void { @@ -137,8 +135,6 @@ private function loadFromRS(ArrayObject $r): void /** * Store current element - * - * @return bool */ public function store(): bool { @@ -263,8 +259,6 @@ public static function getRentsForObjectId(int $object_id, bool $only_last = fal * * @param int $object_id Object ID * @param string $comments Comment to add on lend that will be closed - * - * @return bool */ public static function closeAllRentsForObject(int $object_id, string $comments): bool { @@ -362,8 +356,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 { @@ -418,8 +410,6 @@ public function __set(string $name, mixed $value): void * Generic isset function * * @param string $name Property name - * - * @return bool */ public function __isset(string $name): bool { diff --git a/lib/GaletteObjectsLend/Entity/LendStatus.php b/lib/GaletteObjectsLend/Entity/LendStatus.php index 3f73da3..6c1a0b0 100644 --- a/lib/GaletteObjectsLend/Entity/LendStatus.php +++ b/lib/GaletteObjectsLend/Entity/LendStatus.php @@ -33,11 +33,11 @@ * @author Mélissa Djebel * @author Johan Cwiklinski * - * @property int $status_id + * @property int $status_id * @property string $status_text - * @property bool $in_stock - * @property bool $is_active - * @property int $rent_day_number + * @property bool $in_stock + * @property bool $is_active + * @property int $rent_day_number */ class LendStatus { @@ -94,8 +94,6 @@ public function __construct(Db $zdb, int|ArrayObject|null $args = null) * Populate object from a resultset row * * @param ArrayObject $r the resultset row - * - * @return void */ private function loadFromRS(ArrayObject $r): void { @@ -108,8 +106,6 @@ private function loadFromRS(ArrayObject $r): void /** * Store current element - * - * @return bool */ public function store(): bool { @@ -249,8 +245,6 @@ public static function getActiveStockStatuses(Db $zdb): array /** * Delete status - * - * @return bool */ public function delete(): bool { @@ -286,8 +280,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 { @@ -298,8 +290,6 @@ public function __set(string $name, mixed $value): void * Generic isset function * * @param string $name Property name - * - * @return bool */ public function __isset(string $name): bool { diff --git a/lib/GaletteObjectsLend/Entity/Picture.php b/lib/GaletteObjectsLend/Entity/Picture.php index 05b48f2..e695735 100644 --- a/lib/GaletteObjectsLend/Entity/Picture.php +++ b/lib/GaletteObjectsLend/Entity/Picture.php @@ -81,8 +81,6 @@ public function __construct(mixed $objectid = null) * Gets the default picture to show, anyway * * @see Logo::getDefaultPicture() - * - * @return void */ protected function getDefaultPicture(): void { @@ -99,8 +97,6 @@ protected function getDefaultPicture(): void * * @param Response $response Response * @param Preferences $prefs Preferences instance - * - * @return Response */ public function displayThumb(Response $response, Preferences $prefs): Response { @@ -126,8 +122,6 @@ public function displayThumb(Response $response, Preferences $prefs): Response * @param string $ext file's extension * @param ?string $dest the destination image. * If null, we'll use the source image. Defaults to null - * - * @return bool */ private function createThumb(string $source, string $ext, ?string $dest = null): bool { @@ -271,8 +265,6 @@ public function storeFile(UploadedFileInterface $file, ?array $cropping = null): * * @param string[] $success Success messages * @param string[] $error Error messages - * - * @return void */ public function restorePictures(array &$success, array &$error): void { @@ -316,8 +308,6 @@ public function restorePictures(array &$success, array &$error): void /** * Get thumbnail file path - * - * @return string */ public function getThumbPath(): string { @@ -339,8 +329,6 @@ public function getThumbPath(): string * Should override Picture::setSize(), but this one is private :/ * * @param Preferences $prefs Preferences instance - * - * @return void */ private function setThumbSizes(Preferences $prefs): void { @@ -413,8 +401,6 @@ public function getOptimalThumbWidth(Preferences $prefs): int /** * Get storage directory - * - * @return string */ public function getDir(): string { diff --git a/lib/GaletteObjectsLend/Entity/Preferences.php b/lib/GaletteObjectsLend/Entity/Preferences.php index 07d7fb0..5d7bf93 100644 --- a/lib/GaletteObjectsLend/Entity/Preferences.php +++ b/lib/GaletteObjectsLend/Entity/Preferences.php @@ -32,22 +32,22 @@ * @author Mélissa Djebel * @author Johan Cwiklinski * - * @property bool $ENABLE_MEMBER_RENT_OBJECT - * @property bool $AUTO_GENERATE_CONTRIBUTION - * @property int $GENERATED_CONTRIBUTION_TYPE_ID + * @property bool $ENABLE_MEMBER_RENT_OBJECT + * @property bool $AUTO_GENERATE_CONTRIBUTION + * @property int $GENERATED_CONTRIBUTION_TYPE_ID * @property string $GENERATED_CONTRIB_INFO_TEXT - * @property bool $VIEW_CATEGORY - * @property bool $VIEW_SERIAL - * @property bool $VIEW_THUMBNAIL - * @property bool $VIEW_DESCRIPTION - * @property bool $VIEW_PRICE - * @property bool $VIEW_DIMENSION - * @property bool $VIEW_WEIGHT - * @property bool $VIEW_LEND_PRICE - * @property bool $VIEW_DATE_FORECAST - * @property bool $VIEW_LIST_PRICE_SUM - * @property int $THUMB_MAX_WIDTH - * @property int $THUMB_MAX_HEIGHT + * @property bool $VIEW_CATEGORY + * @property bool $VIEW_SERIAL + * @property bool $VIEW_THUMBNAIL + * @property bool $VIEW_DESCRIPTION + * @property bool $VIEW_PRICE + * @property bool $VIEW_DIMENSION + * @property bool $VIEW_WEIGHT + * @property bool $VIEW_LEND_PRICE + * @property bool $VIEW_DATE_FORECAST + * @property bool $VIEW_LIST_PRICE_SUM + * @property int $THUMB_MAX_WIDTH + * @property int $THUMB_MAX_HEIGHT */ class Preferences { @@ -208,8 +208,6 @@ public function __get(string $name): mixed * Store preferences * * @param array $data Posted data - * - * @return bool */ public function store(array $data): bool { @@ -258,8 +256,6 @@ public function store(array $data): bool /** * Load current preferences from database. - * - * @return bool */ public function load(): bool { @@ -288,8 +284,6 @@ public function load(): bool /** * Get thumbnail maximum with - * - * @return int */ public function getThumbWidth(): int { @@ -298,8 +292,6 @@ public function getThumbWidth(): int /** * Get thumbnail maximum height - * - * @return int */ public function getThumbHeight(): int { @@ -308,8 +300,6 @@ public function getThumbHeight(): int /** * Whether to display images (as thumbnails) in lists - * - * @return bool */ public function imagesInLists(): bool { @@ -320,8 +310,6 @@ public function imagesInLists(): bool * Shall we show fullsize images? * * Would appear editing object, and on thumbnails click - * - * @return bool */ public function showFullsize(): bool { diff --git a/lib/GaletteObjectsLend/Filters/CategoriesList.php b/lib/GaletteObjectsLend/Filters/CategoriesList.php index 5614892..7b69b0e 100644 --- a/lib/GaletteObjectsLend/Filters/CategoriesList.php +++ b/lib/GaletteObjectsLend/Filters/CategoriesList.php @@ -32,11 +32,11 @@ * * @author Johan Cwiklinski * - * @property ?string $filter_str - * @property ?int $active_filter - * @property ?bool $not_empty + * @property ?string $filter_str + * @property ?int $active_filter + * @property ?bool $not_empty * @property ?ObjectsList $objects_filters - * @property string $query + * @property string $query */ class CategoriesList extends Pagination @@ -68,8 +68,6 @@ public function __construct() /** * Returns the field we want to default set order to - * - * @return int|string */ protected function getDefaultOrder(): int|string { @@ -78,8 +76,6 @@ protected function getDefaultOrder(): int|string /** * Reinit default parameters - * - * @return void */ public function reinit(): void { @@ -121,8 +117,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 { @@ -174,8 +168,6 @@ public function __set(string $name, mixed $value): void * Set objects filter * * @param ObjectsList $filters Filters for objects list - * - * @return self */ public function setObjectsFilter(ObjectsList $filters): self { diff --git a/lib/GaletteObjectsLend/Filters/ObjectsList.php b/lib/GaletteObjectsLend/Filters/ObjectsList.php index 183177e..c361e38 100644 --- a/lib/GaletteObjectsLend/Filters/ObjectsList.php +++ b/lib/GaletteObjectsLend/Filters/ObjectsList.php @@ -35,11 +35,11 @@ * @author Johan Cwiklinski * * @property ?string $filter_str - * @property ?int $category_filter - * @property ?int $active_filter - * @property ?int $field_filter - * @property array $selected - * @property string $query + * @property ?int $category_filter + * @property ?int $active_filter + * @property ?int $field_filter + * @property array $selected + * @property string $query */ class ObjectsList extends Pagination @@ -74,8 +74,6 @@ public function __construct() /** * Returns the field we want to default set order to - * - * @return int|string */ protected function getDefaultOrder(): int|string { @@ -84,8 +82,6 @@ protected function getDefaultOrder(): int|string /** * Reinit default parameters - * - * @return void */ public function reinit(): void { @@ -101,8 +97,6 @@ public function reinit(): void * Default isset * * @param string $name Property name - * - * @return bool */ public function __isset(string $name): bool { @@ -144,8 +138,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 { @@ -232,8 +224,6 @@ public function __set(string $name, mixed $value): void * * @param \GaletteObjectsLend\Entity\Preferences $prefs Preferences instance * @param Twig $view Template reference - * - * @return void */ public function setViewCommonsFilters(Preferences $prefs, Twig $view): void { diff --git a/lib/GaletteObjectsLend/Filters/StatusList.php b/lib/GaletteObjectsLend/Filters/StatusList.php index 0b9a4c7..0ed6179 100644 --- a/lib/GaletteObjectsLend/Filters/StatusList.php +++ b/lib/GaletteObjectsLend/Filters/StatusList.php @@ -33,9 +33,9 @@ * @author Johan Cwiklinski * * @property ?string $filter_str - * @property ?int $active_filter - * @property ?int $stock_filter - * @property string $query + * @property ?int $active_filter + * @property ?int $stock_filter + * @property string $query */ class StatusList extends Pagination @@ -57,8 +57,6 @@ class StatusList extends Pagination /** * Returns the field we want to default set order to - * - * @return int|string */ protected function getDefaultOrder(): int|string { @@ -67,8 +65,6 @@ protected function getDefaultOrder(): int|string /** * Reinit default parameters - * - * @return void */ public function reinit(): void { @@ -109,8 +105,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 { diff --git a/lib/GaletteObjectsLend/IO/PdfObject.php b/lib/GaletteObjectsLend/IO/PdfObject.php index 975af06..ff8d0bf 100644 --- a/lib/GaletteObjectsLend/IO/PdfObject.php +++ b/lib/GaletteObjectsLend/IO/PdfObject.php @@ -60,8 +60,6 @@ public function __construct(Db $zdb, Preferences $prefs, LPreferences $lprefs) /** * Initialize PDF - * - * @return void */ public function init(): void { @@ -85,8 +83,6 @@ public function init(): void * Draw listed object cards * * @param LendObject[] $objects Object list - * - * @return void */ public function drawCards(array $objects): void { @@ -104,8 +100,6 @@ public function drawCards(array $objects): void * Draw object card * * @param LendObject $object Object - * - * @return void */ public function drawCard(LendObject $object): void { @@ -220,8 +214,6 @@ public function drawCard(LendObject $object): void * @param string $title Line title * @param string $value Line value * @param int $width Cell width - * - * @return void */ private function addCell(string $title, string $value, int $width): void { diff --git a/lib/GaletteObjectsLend/IO/PdfObjects.php b/lib/GaletteObjectsLend/IO/PdfObjects.php index ba2a935..03026ba 100644 --- a/lib/GaletteObjectsLend/IO/PdfObjects.php +++ b/lib/GaletteObjectsLend/IO/PdfObjects.php @@ -76,8 +76,6 @@ public function __construct( /** * Initialize PDF - * - * @return void */ public function init(): void { @@ -98,8 +96,6 @@ public function init(): void /** * Page header * - * @return void - * * @phpcs:disable */ public function Header(): void @@ -134,8 +130,6 @@ public function Header(): void * Draw objects list * * @param LendObject[] $objects List of objects - * - * @return void */ public function drawList(array $objects): void { diff --git a/lib/GaletteObjectsLend/Repository/Categories.php b/lib/GaletteObjectsLend/Repository/Categories.php index d567c51..a4fa79a 100644 --- a/lib/GaletteObjectsLend/Repository/Categories.php +++ b/lib/GaletteObjectsLend/Repository/Categories.php @@ -207,8 +207,6 @@ private function buildSelect(?array $fields, bool $count = false): Select * Count categories from the query * * @param Select $select Original select - * - * @return void */ private function proceedCount(Select $select): void { @@ -279,8 +277,6 @@ private function buildOrderClause(?array $fields = null): array * Builds where clause, for filtering on simple list mode * * @param Select $select Original select - * - * @return void */ private function buildWhereClause(Select $select): void { @@ -336,8 +332,6 @@ private function buildWhereClause(Select $select): void * * @param string $field_name Field name to order by * @param ?array $fields SELECTE'ed fields - * - * @return bool */ private function canOrderBy(string $field_name, ?array $fields): bool { @@ -357,8 +351,6 @@ private function canOrderBy(string $field_name, ?array $fields): bool /** * Get count for current query - * - * @return ?int */ public function getCount(): ?int { diff --git a/lib/GaletteObjectsLend/Repository/Objects.php b/lib/GaletteObjectsLend/Repository/Objects.php index 1134e2f..bb7efa7 100644 --- a/lib/GaletteObjectsLend/Repository/Objects.php +++ b/lib/GaletteObjectsLend/Repository/Objects.php @@ -149,8 +149,6 @@ public function getObjectsList( * Remove specified objects, and their full history * * @param array $ids Objects identifiers to delete - * - * @return bool */ public function removeObjects(array $ids): bool { @@ -296,8 +294,6 @@ private function buildSelect(?array $fields, bool $count = false): Select * Count members from the query * * @param Select $select Original select - * - * @return void */ private function proceedCount(Select $select): void { @@ -419,8 +415,6 @@ private function buildOrderClause(?array $fields = null): array * Builds where clause, for filtering on simple list mode * * @param Select $select Original select - * - * @return void */ public function buildWhereClause(Select $select): void { @@ -504,8 +498,6 @@ public function buildWhereClause(Select $select): void * * @param string $field_name Field name to order by * @param ?string[] $fields SELECTE'ed fields - * - * @return bool */ private function canOrderBy(string $field_name, ?array $fields): bool { @@ -525,8 +517,6 @@ private function canOrderBy(string $field_name, ?array $fields): bool /** * Get count for current query - * - * @return ?int */ public function getCount(): ?int { diff --git a/lib/GaletteObjectsLend/Repository/Status.php b/lib/GaletteObjectsLend/Repository/Status.php index c145ddf..2c5bdd3 100644 --- a/lib/GaletteObjectsLend/Repository/Status.php +++ b/lib/GaletteObjectsLend/Repository/Status.php @@ -196,8 +196,6 @@ private function buildSelect(?array $fields, bool $photos = false, bool $count = * Count members from the query * * @param Select $select Original select - * - * @return void */ private function proceedCount(Select $select): void { @@ -280,8 +278,6 @@ private function buildOrderClause(?array $fields = null): array * Builds where clause, for filtering on simple list mode * * @param Select $select Original select - * - * @return void */ private function buildWhereClause(Select $select): void { @@ -323,8 +319,6 @@ private function buildWhereClause(Select $select): void * * @param string $field_name Field name to order by * @param ?string[] $fields SELECTE'ed fields - * - * @return bool */ private function canOrderBy(string $field_name, ?array $fields): bool { @@ -344,8 +338,6 @@ private function canOrderBy(string $field_name, ?array $fields): bool /** * Get count for current query - * - * @return ?int */ public function getCount(): ?int { diff --git a/tests/GaletteObjectsLend/Entity/tests/units/LendCategory.php b/tests/GaletteObjectsLend/Entity/tests/units/LendCategory.php index 8bd2c5a..17270d1 100644 --- a/tests/GaletteObjectsLend/Entity/tests/units/LendCategory.php +++ b/tests/GaletteObjectsLend/Entity/tests/units/LendCategory.php @@ -19,6 +19,8 @@ * along with Galette. If not, see . */ +declare(strict_types=1); + namespace GaletteObjectsLends\Entity\tests\units; use Galette\Tests\GaletteTestCase; @@ -34,8 +36,6 @@ class LendCategory extends GaletteTestCase /** * Cleanup after each test method - * - * @return void */ public function tearDown(): void { @@ -46,8 +46,6 @@ public function tearDown(): void /** * Test empty - * - * @return void */ public function testEmpty(): void { @@ -72,8 +70,6 @@ public function testEmpty(): void /** * Test add and update - * - * @return void */ public function testCrud(): void { diff --git a/tests/GaletteObjectsLend/Entity/tests/units/LendObject.php b/tests/GaletteObjectsLend/Entity/tests/units/LendObject.php index 8577fb8..6ec730b 100644 --- a/tests/GaletteObjectsLend/Entity/tests/units/LendObject.php +++ b/tests/GaletteObjectsLend/Entity/tests/units/LendObject.php @@ -19,6 +19,8 @@ * along with Galette. If not, see . */ +declare(strict_types=1); + namespace GaletteObjectsLends\Entity\tests\units; use Galette\Tests\GaletteTestCase; @@ -40,8 +42,6 @@ class LendObject extends GaletteTestCase /** * Set up tests - * - * @return void */ public function setUp(): void { @@ -52,8 +52,6 @@ public function setUp(): void /** * Cleanup after each test method - * - * @return void */ public function tearDown(): void { @@ -74,8 +72,6 @@ public function tearDown(): void /** * Test empty - * - * @return void */ public function testEmpty(): void { @@ -102,8 +98,6 @@ public function testEmpty(): void /** * Test add and update - * - * @return void */ public function testCrud(): void { @@ -214,8 +208,6 @@ public function testCrud(): void /** * Create few status - * - * @return void */ private function createStatus(): void { @@ -243,8 +235,6 @@ private function createStatus(): void /** * Create few categories - * - * @return void */ private function createCategories(): void { diff --git a/tests/GaletteObjectsLend/Entity/tests/units/LendRent.php b/tests/GaletteObjectsLend/Entity/tests/units/LendRent.php index 90a200c..6fbfa42 100644 --- a/tests/GaletteObjectsLend/Entity/tests/units/LendRent.php +++ b/tests/GaletteObjectsLend/Entity/tests/units/LendRent.php @@ -19,6 +19,8 @@ * along with Galette. If not, see . */ +declare(strict_types=1); + namespace GaletteObjectsLends\Entity\tests\units; use Galette\Tests\GaletteTestCase; @@ -38,8 +40,6 @@ class LendRent extends GaletteTestCase /** * Set up tests - * - * @return void */ public function setUp(): void { @@ -49,8 +49,6 @@ public function setUp(): void /** * Cleanup after each test method - * - * @return void */ public function tearDown(): void { @@ -72,8 +70,6 @@ public function tearDown(): void /** * Test empty - * - * @return void */ public function testEmpty(): void { @@ -90,8 +86,6 @@ public function testEmpty(): void /** * Test add and update - * - * @return void */ public function testCrud(): void { @@ -217,8 +211,6 @@ public function testCrud(): void /** * Create few status - * - * @return void */ private function createStatus(): void { @@ -243,5 +235,4 @@ private function createStatus(): void $this->assertTrue($status->store()); $this->inactive_instock_status = $status->status_id; } - } diff --git a/tests/GaletteObjectsLend/Entity/tests/units/LendStatus.php b/tests/GaletteObjectsLend/Entity/tests/units/LendStatus.php index 103f726..aa9dc6a 100644 --- a/tests/GaletteObjectsLend/Entity/tests/units/LendStatus.php +++ b/tests/GaletteObjectsLend/Entity/tests/units/LendStatus.php @@ -19,6 +19,8 @@ * along with Galette. If not, see . */ +declare(strict_types=1); + namespace GaletteObjectsLends\Entity\tests\units; use Galette\Tests\GaletteTestCase; @@ -34,8 +36,6 @@ class LendStatus extends GaletteTestCase /** * Cleanup after each test method - * - * @return void */ public function tearDown(): void { @@ -46,8 +46,6 @@ public function tearDown(): void /** * Test empty - * - * @return void */ public function testEmpty(): void { @@ -61,8 +59,6 @@ public function testEmpty(): void /** * Test add and update - * - * @return void */ public function testCrud(): void { diff --git a/tests/GaletteObjectsLend/Entity/tests/units/Preferences.php b/tests/GaletteObjectsLend/Entity/tests/units/Preferences.php index 4895a7b..c9eab27 100644 --- a/tests/GaletteObjectsLend/Entity/tests/units/Preferences.php +++ b/tests/GaletteObjectsLend/Entity/tests/units/Preferences.php @@ -19,6 +19,8 @@ * along with Galette. If not, see . */ +declare(strict_types=1); + namespace GaletteObjectsLends\Entity\tests\units; use Galette\Tests\GaletteTestCase; @@ -34,8 +36,6 @@ class Preferences extends GaletteTestCase /** * Test defaults - * - * @return void */ public function testDefaults(): void { @@ -63,8 +63,6 @@ public function testDefaults(): void /** * Test add and update - * - * @return void */ public function testCrud(): void { diff --git a/tests/GaletteObjectsLend/Filters/tests/units/CategoriesList.php b/tests/GaletteObjectsLend/Filters/tests/units/CategoriesList.php index 453c36f..a6903c2 100644 --- a/tests/GaletteObjectsLend/Filters/tests/units/CategoriesList.php +++ b/tests/GaletteObjectsLend/Filters/tests/units/CategoriesList.php @@ -36,8 +36,6 @@ class CategoriesList extends GaletteTestCase * Test filter defaults values * * @param \GaletteObjectsLend\Filters\CategoriesList $filters Filters instance - * - * @return void */ protected function testDefaults(\GaletteObjectsLend\Filters\CategoriesList $filters): void { @@ -51,8 +49,6 @@ protected function testDefaults(\GaletteObjectsLend\Filters\CategoriesList $filt /** * Test creation - * - * @return void */ public function testCreate(): void { @@ -116,10 +112,8 @@ public function testCreate(): void /** * Test setting non existing filter - * - * @return void */ - public function testSetNotExisting() + public function testSetNotExisting(): void { $filters = new \GaletteObjectsLend\Filters\CategoriesList(); $this->testDefaults($filters); @@ -130,10 +124,8 @@ public function testSetNotExisting() /** * Test getting non existing filter - * - * @return void */ - public function testGetNotExisting() + public function testGetNotExisting(): void { $filters = new \GaletteObjectsLend\Filters\CategoriesList(); $this->testDefaults($filters); diff --git a/tests/GaletteObjectsLend/Filters/tests/units/ObjectsList.php b/tests/GaletteObjectsLend/Filters/tests/units/ObjectsList.php index 355d6dc..348a5b6 100644 --- a/tests/GaletteObjectsLend/Filters/tests/units/ObjectsList.php +++ b/tests/GaletteObjectsLend/Filters/tests/units/ObjectsList.php @@ -36,8 +36,6 @@ class ObjectsList extends GaletteTestCase * Test filter defaults values * * @param \GaletteObjectsLend\Filters\ObjectsList $filters Filters instance - * - * @return void */ protected function testDefaults(\GaletteObjectsLend\Filters\ObjectsList $filters): void { @@ -52,8 +50,6 @@ protected function testDefaults(\GaletteObjectsLend\Filters\ObjectsList $filters /** * Test creation - * - * @return void */ public function testCreate(): void { @@ -111,10 +107,8 @@ public function testCreate(): void /** * Test setting non existing filter - * - * @return void */ - public function testSetNotExisting() + public function testSetNotExisting(): void { $filters = new \GaletteObjectsLend\Filters\ObjectsList(); $this->testDefaults($filters); @@ -125,10 +119,8 @@ public function testSetNotExisting() /** * Test getting non existing filter - * - * @return void */ - public function testGetNotExisting() + public function testGetNotExisting(): void { $filters = new \GaletteObjectsLend\Filters\ObjectsList(); $this->testDefaults($filters); diff --git a/tests/GaletteObjectsLend/Filters/tests/units/StatusList.php b/tests/GaletteObjectsLend/Filters/tests/units/StatusList.php index 58c18d6..59ef479 100644 --- a/tests/GaletteObjectsLend/Filters/tests/units/StatusList.php +++ b/tests/GaletteObjectsLend/Filters/tests/units/StatusList.php @@ -36,8 +36,6 @@ class StatusList extends GaletteTestCase * Test filter defaults values * * @param \GaletteObjectsLend\Filters\StatusList $filters Filters instance - * - * @return void */ protected function testDefaults(\GaletteObjectsLend\Filters\StatusList $filters): void { @@ -50,8 +48,6 @@ protected function testDefaults(\GaletteObjectsLend\Filters\StatusList $filters) /** * Test creation - * - * @return void */ public function testCreate(): void { @@ -121,10 +117,8 @@ public function testCreate(): void /** * Test setting non existing filter - * - * @return void */ - public function testSetNotExisting() + public function testSetNotExisting(): void { $filters = new \GaletteObjectsLend\Filters\StatusList(); $this->testDefaults($filters); @@ -135,10 +129,8 @@ public function testSetNotExisting() /** * Test getting non existing filter - * - * @return void */ - public function testGetNotExisting() + public function testGetNotExisting(): void { $filters = new \GaletteObjectsLend\Filters\StatusList(); $this->testDefaults($filters); diff --git a/tests/GaletteObjectsLend/Repository/tests/units/Categories.php b/tests/GaletteObjectsLend/Repository/tests/units/Categories.php index da26d60..1d2cdc2 100644 --- a/tests/GaletteObjectsLend/Repository/tests/units/Categories.php +++ b/tests/GaletteObjectsLend/Repository/tests/units/Categories.php @@ -19,6 +19,8 @@ * along with Galette. If not, see . */ +declare(strict_types=1); + namespace GaletteObjectsLends\Repository\tests\units; use Galette\Tests\GaletteTestCase; @@ -34,8 +36,6 @@ class Categories extends GaletteTestCase /** * Cleanup after each test method - * - * @return void */ public function tearDown(): void { @@ -49,8 +49,6 @@ public function tearDown(): void /** * Test getList - * - * @return void */ public function testGetList(): void { diff --git a/tests/GaletteObjectsLend/Repository/tests/units/Objects.php b/tests/GaletteObjectsLend/Repository/tests/units/Objects.php index 78de04d..7ac4255 100644 --- a/tests/GaletteObjectsLend/Repository/tests/units/Objects.php +++ b/tests/GaletteObjectsLend/Repository/tests/units/Objects.php @@ -19,6 +19,8 @@ * along with Galette. If not, see . */ +declare(strict_types=1); + namespace GaletteObjectsLends\Repository\tests\units; use Galette\Tests\GaletteTestCase; @@ -36,8 +38,6 @@ class Objects extends GaletteTestCase /** * Set up tests - * - * @return void */ public function setUp(): void { @@ -47,8 +47,6 @@ public function setUp(): void /** * Cleanup after each test method - * - * @return void */ public function tearDown(): void { @@ -63,8 +61,6 @@ public function tearDown(): void /** * Test getList - * - * @return void */ public function testGetList(): void { diff --git a/tests/GaletteObjectsLend/Repository/tests/units/Status.php b/tests/GaletteObjectsLend/Repository/tests/units/Status.php index 272708c..26d300e 100644 --- a/tests/GaletteObjectsLend/Repository/tests/units/Status.php +++ b/tests/GaletteObjectsLend/Repository/tests/units/Status.php @@ -19,6 +19,8 @@ * along with Galette. If not, see . */ +declare(strict_types=1); + namespace GaletteObjectsLends\Repository\tests\units; use Galette\Tests\GaletteTestCase; @@ -34,8 +36,6 @@ class Status extends GaletteTestCase /** * Cleanup after each test method - * - * @return void */ public function tearDown(): void { @@ -47,8 +47,6 @@ public function tearDown(): void /** * Test getList - * - * @return void */ public function testGetList(): void { diff --git a/tests/TestsBootstrap.php b/tests/TestsBootstrap.php index 17f3cb0..d5d877f 100644 --- a/tests/TestsBootstrap.php +++ b/tests/TestsBootstrap.php @@ -19,6 +19,8 @@ * along with Galette. If not, see . */ +declare(strict_types=1); + /** * Bootstrap tests file for Galette ObjectsLend plugin * From b95a6c592d44d37056b5b9d2e0fda551fd2eec96 Mon Sep 17 00:00:00 2001 From: Johan Cwiklinski Date: Sat, 3 Jan 2026 21:28:23 +0100 Subject: [PATCH 4/4] =?UTF-8?q?Update=20=C2=A9=20date?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _config.inc.php | 2 +- _define.php | 2 +- _routes.php | 2 +- .../Controllers/Crud/CategoriesController.php | 2 +- lib/GaletteObjectsLend/Controllers/Crud/ObjectsController.php | 2 +- lib/GaletteObjectsLend/Controllers/Crud/StatusController.php | 2 +- lib/GaletteObjectsLend/Controllers/ImagesController.php | 2 +- lib/GaletteObjectsLend/Controllers/MainController.php | 2 +- lib/GaletteObjectsLend/Controllers/PdfController.php | 2 +- lib/GaletteObjectsLend/Entity/CategoryPicture.php | 2 +- lib/GaletteObjectsLend/Entity/LendCategory.php | 2 +- lib/GaletteObjectsLend/Entity/LendObject.php | 2 +- lib/GaletteObjectsLend/Entity/LendPDF.php | 2 +- lib/GaletteObjectsLend/Entity/LendRent.php | 2 +- lib/GaletteObjectsLend/Entity/LendStatus.php | 2 +- lib/GaletteObjectsLend/Entity/ObjectPicture.php | 2 +- lib/GaletteObjectsLend/Entity/Picture.php | 2 +- lib/GaletteObjectsLend/Entity/Preferences.php | 2 +- lib/GaletteObjectsLend/Filters/CategoriesList.php | 2 +- lib/GaletteObjectsLend/Filters/ObjectsList.php | 2 +- lib/GaletteObjectsLend/Filters/StatusList.php | 2 +- lib/GaletteObjectsLend/IO/PdfObject.php | 2 +- lib/GaletteObjectsLend/IO/PdfObjects.php | 2 +- lib/GaletteObjectsLend/PluginGaletteObjectslend.php | 2 +- lib/GaletteObjectsLend/Repository/Categories.php | 2 +- lib/GaletteObjectsLend/Repository/Objects.php | 2 +- lib/GaletteObjectsLend/Repository/Status.php | 2 +- tests/GaletteObjectsLend/Entity/tests/units/LendCategory.php | 2 +- tests/GaletteObjectsLend/Entity/tests/units/LendObject.php | 2 +- tests/GaletteObjectsLend/Entity/tests/units/LendRent.php | 2 +- tests/GaletteObjectsLend/Entity/tests/units/LendStatus.php | 2 +- tests/GaletteObjectsLend/Entity/tests/units/Preferences.php | 2 +- tests/GaletteObjectsLend/Filters/tests/units/CategoriesList.php | 2 +- tests/GaletteObjectsLend/Filters/tests/units/ObjectsList.php | 2 +- tests/GaletteObjectsLend/Filters/tests/units/StatusList.php | 2 +- tests/GaletteObjectsLend/Repository/tests/units/Categories.php | 2 +- tests/GaletteObjectsLend/Repository/tests/units/Objects.php | 2 +- tests/GaletteObjectsLend/Repository/tests/units/Status.php | 2 +- tests/TestsBootstrap.php | 2 +- 39 files changed, 39 insertions(+), 39 deletions(-) diff --git a/_config.inc.php b/_config.inc.php index de0cd27..a73196e 100644 --- a/_config.inc.php +++ b/_config.inc.php @@ -1,7 +1,7 @@