Add strict types for bookmarks management

Parameters typing and using strict types overall increase the codebase
quality by enforcing the a given parameter will have the expected type.

It also removes the need to unnecessary unit tests checking methods
behavior with invalid input.
This commit is contained in:
ArthurHoaro 2020-10-02 17:50:59 +02:00
parent 29c31b7ec6
commit efb7d21b52
19 changed files with 209 additions and 285 deletions
application/front/controller/admin

View file

@ -52,7 +52,7 @@ class ThumbnailsController extends ShaarliAdminController
}
try {
$bookmark = $this->container->bookmarkService->get($id);
$bookmark = $this->container->bookmarkService->get((int) $id);
} catch (BookmarkNotFoundException $e) {
return $response->withStatus(404);
}