mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix: SA: Fix "...Variable in isset() is never defined...." rule.
SA stands for Static Analysis.
This commit is contained in:
parent
c94fb2efbf
commit
75d2d50dd2
@ -30,11 +30,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php
|
||||
|
||||
-
|
||||
message: "#^Variable \\$entity in isset\\(\\) is never defined\\.$#"
|
||||
count: 1
|
||||
path: src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php
|
||||
|
||||
-
|
||||
message: "#^Variable method call on object\\.$#"
|
||||
count: 2
|
||||
|
@ -347,7 +347,6 @@ class ApiController extends AbstractCRUDController
|
||||
*
|
||||
* @param string $action
|
||||
* @param Request $request
|
||||
* @return type
|
||||
*/
|
||||
protected function indexApiAction($action, Request $request, $_format)
|
||||
{
|
||||
@ -358,9 +357,7 @@ class ApiController extends AbstractCRUDController
|
||||
return $response;
|
||||
}
|
||||
|
||||
if (!isset($entity)) {
|
||||
$entity = '';
|
||||
}
|
||||
|
||||
$response = $this->onPostCheckACL($action, $request, $_format, $entity);
|
||||
if ($response instanceof Response) {
|
||||
@ -370,8 +367,13 @@ class ApiController extends AbstractCRUDController
|
||||
$totalItems = $this->countEntities($action, $request, $_format);
|
||||
$paginator = $this->getPaginatorFactory()->create($totalItems);
|
||||
|
||||
$response = $this->onPreIndexBuildQuery($action, $request, $_format, $totalItems,
|
||||
$paginator);
|
||||
$response = $this->onPreIndexBuildQuery(
|
||||
$action,
|
||||
$request,
|
||||
$_format,
|
||||
$totalItems,
|
||||
$paginator
|
||||
);
|
||||
|
||||
if ($response instanceof Response) {
|
||||
return $response;
|
||||
|
Loading…
x
Reference in New Issue
Block a user