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:
parent
29c31b7ec6
commit
efb7d21b52
19 changed files with 209 additions and 285 deletions
application/front/controller/admin
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue