mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 11:33:49 +00:00
cs: Enable a couple of risky rules.
This commit is contained in:
@@ -742,7 +742,7 @@ class ParticipationController extends AbstractController
|
||||
$single = $request->query->has('person_id');
|
||||
$multiple = $request->query->has('persons_ids');
|
||||
|
||||
if (true === $single and true === $multiple) {
|
||||
if (true === $single && true === $multiple) {
|
||||
// we are not allowed to have both person_id and persons_ids
|
||||
throw new RuntimeException("You are not allow to provide both 'person_id' and "
|
||||
. "'persons_ids' simulaneously");
|
||||
|
@@ -135,7 +135,7 @@ class EventSearch extends AbstractSearch
|
||||
|
||||
public function supports($domain, $format)
|
||||
{
|
||||
return 'event' === $domain or 'events' === $domain;
|
||||
return 'event' === $domain || 'events' === $domain;
|
||||
}
|
||||
|
||||
protected function composeQuery(QueryBuilder &$qb, $terms)
|
||||
@@ -171,8 +171,8 @@ class EventSearch extends AbstractSearch
|
||||
}
|
||||
|
||||
if (
|
||||
(isset($terms['name']) or isset($terms['_default']))
|
||||
and (!empty($terms['name']) or !empty($terms['_default']))) {
|
||||
(isset($terms['name']) || isset($terms['_default']))
|
||||
&& (!empty($terms['name']) || !empty($terms['_default']))) {
|
||||
// the form with name:"xyz" has precedence
|
||||
$name = $terms['name'] ?? $terms['_default'];
|
||||
|
||||
|
Reference in New Issue
Block a user