mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix: SA: Fix "...Short ternary operator..." rule.
SA stands for Static Analysis.
This commit is contained in:
parent
5a85d497ab
commit
e2a8437807
@ -20,11 +20,6 @@ parameters:
|
|||||||
count: 1
|
count: 1
|
||||||
path: src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php
|
path: src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php
|
||||||
|
|
||||||
-
|
|
||||||
message: "#^Short ternary operator is not allowed\\. Use null coalesce operator if applicable or consider using long ternary\\.$#"
|
|
||||||
count: 1
|
|
||||||
path: src/Bundle/ChillDocStoreBundle/EntityRepository/DocumentCategoryRepository.php
|
|
||||||
|
|
||||||
-
|
-
|
||||||
message: "#^Variable \\$participation might not be defined\\.$#"
|
message: "#^Variable \\$participation might not be defined\\.$#"
|
||||||
count: 3
|
count: 3
|
||||||
|
@ -34,6 +34,6 @@ class DocumentCategoryRepository extends EntityRepository
|
|||||||
'SELECT MAX(c.idInsideBundle) + 1 FROM ChillDocStoreBundle:DocumentCategory c')
|
'SELECT MAX(c.idInsideBundle) + 1 FROM ChillDocStoreBundle:DocumentCategory c')
|
||||||
->getSingleResult();
|
->getSingleResult();
|
||||||
|
|
||||||
return $array_res[1] ?: 0;
|
return reset($array_res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user