@@ -52,8 +52,8 @@ discard block |
||
| 52 | 52 | { |
| 53 | 53 | $now = new DateTime(); |
| 54 | 54 | $loader = $this->all(); |
| 55 | - $loader->addFilter('publishDate', $now->format('Y-m-d H:i:s'), [ 'operator' => '<=' ]) |
|
| 56 | - ->addFilter('expiryDate', $now->format('Y-m-d H:i:s'), [ 'operator' => '>=' ]); |
|
| 55 | + $loader->addFilter('publishDate', $now->format('Y-m-d H:i:s'), ['operator' => '<=']) |
|
| 56 | + ->addFilter('expiryDate', $now->format('Y-m-d H:i:s'), ['operator' => '>=']); |
|
| 57 | 57 | |
| 58 | 58 | return $loader; |
| 59 | 59 | } |
@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | { |
| 66 | 66 | $now = new DateTime(); |
| 67 | 67 | $loader = $this->all(); |
| 68 | - $loader->addFilter('publishDate', $now->format('Y-m-d H:i:s'), [ 'operator' => '<=' ]) |
|
| 69 | - ->addFilter('expiryDate', $now->format('Y-m-d H:i:s'), [ 'operator' => '<=' ]); |
|
| 68 | + $loader->addFilter('publishDate', $now->format('Y-m-d H:i:s'), ['operator' => '<=']) |
|
| 69 | + ->addFilter('expiryDate', $now->format('Y-m-d H:i:s'), ['operator' => '<=']); |
|
| 70 | 70 | |
| 71 | 71 | return $loader; |
| 72 | 72 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | { |
| 57 | 57 | $now = new DateTime(); |
| 58 | 58 | $loader = $this->all(); |
| 59 | - $loader->addFilter('publishDate', $now->format('Y-m-d H:i:s'), [ 'operator' => '<=' ]) |
|
| 59 | + $loader->addFilter('publishDate', $now->format('Y-m-d H:i:s'), ['operator' => '<=']) |
|
| 60 | 60 | ->addOrder('start_date', 'asc'); |
| 61 | 61 | |
| 62 | 62 | return $loader; |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | { |
| 98 | 98 | $date = $this->parseAsDate($date); |
| 99 | 99 | $loader = $this->published(); |
| 100 | - $loader->addFilter('end_date', $date->format('Y-m-d H:i:s'), [ 'operator' => '>=' ]); |
|
| 100 | + $loader->addFilter('end_date', $date->format('Y-m-d H:i:s'), ['operator' => '>=']); |
|
| 101 | 101 | |
| 102 | 102 | return $loader; |
| 103 | 103 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | { |
| 114 | 114 | $date = $this->parseAsDate($date); |
| 115 | 115 | $loader = $this->published(); |
| 116 | - $loader->addFilter('end_date', $date->format('Y-m-d H:i:s'), [ 'operator' => '<' ]); |
|
| 116 | + $loader->addFilter('end_date', $date->format('Y-m-d H:i:s'), ['operator' => '<']); |
|
| 117 | 117 | |
| 118 | 118 | return $loader; |
| 119 | 119 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | } |
| 133 | 133 | |
| 134 | 134 | if (isset($contextObject['active'])) { |
| 135 | - return (bool)$contextObject['active']; |
|
| 135 | + return (bool) $contextObject['active']; |
|
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | return true; |
@@ -452,7 +452,7 @@ discard block |
||
| 452 | 452 | if ($route->getRouteOptionsIdent()) { |
| 453 | 453 | $loader->addFilter('route_options_ident', $route->getRouteOptionsIdent()); |
| 454 | 454 | } else { |
| 455 | - $loader->addFilter('route_options_ident', '', [ 'operator' => 'IS NULL' ]); |
|
| 455 | + $loader->addFilter('route_options_ident', '', ['operator' => 'IS NULL']); |
|
| 456 | 456 | } |
| 457 | 457 | |
| 458 | 458 | return $loader->load()->first(); |
@@ -523,7 +523,7 @@ discard block |
||
| 523 | 523 | if (isset($available[$code])) { |
| 524 | 524 | $locale = $available[$code]; |
| 525 | 525 | if (isset($locale['locales'])) { |
| 526 | - $choices = (array)$locale['locales']; |
|
| 526 | + $choices = (array) $locale['locales']; |
|
| 527 | 527 | array_push($locales, ...$choices); |
| 528 | 528 | } elseif (isset($locale['locale'])) { |
| 529 | 529 | array_push($locales, $locale['locale']); |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | { |
| 32 | 32 | parent::__construct($data); |
| 33 | 33 | |
| 34 | - if (is_callable([ $this, 'defaultData' ])) { |
|
| 34 | + if (is_callable([$this, 'defaultData'])) { |
|
| 35 | 35 | $this->setData($this->defaultData()); |
| 36 | 36 | } |
| 37 | 37 | } |
@@ -82,9 +82,9 @@ discard block |
||
| 82 | 82 | parent::validate($v); |
| 83 | 83 | |
| 84 | 84 | foreach ($this->translator()->locales() as $locale => $value) { |
| 85 | - if (!isset($this['name']) || !(string)$this['name'][$locale]) { |
|
| 85 | + if (!isset($this['name']) || !(string) $this['name'][$locale]) { |
|
| 86 | 86 | $this->validator()->error( |
| 87 | - (string)$this->translator()->translation([ |
|
| 87 | + (string) $this->translator()->translation([ |
|
| 88 | 88 | 'fr' => 'Le NOM doit être rempli dans toutes les langues.', |
| 89 | 89 | 'en' => 'The NAME must be filled in all languages.', |
| 90 | 90 | ]) |
@@ -90,8 +90,8 @@ |
||
| 90 | 90 | return $response->withStatus(404); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - $templateIdent = (string)$event['templateIdent']; |
|
| 94 | - $templateController = (string)$event['templateIdent']; |
|
| 93 | + $templateIdent = (string) $event['templateIdent']; |
|
| 94 | + $templateController = (string) $event['templateIdent']; |
|
| 95 | 95 | |
| 96 | 96 | if (!$templateController) { |
| 97 | 97 | $container['logger']->warning(sprintf( |
@@ -91,8 +91,8 @@ |
||
| 91 | 91 | return $response->withStatus(404); |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - $templateIdent = (string)$section['templateIdent']; |
|
| 95 | - $templateController = (string)$section['templateIdent']; |
|
| 94 | + $templateIdent = (string) $section['templateIdent']; |
|
| 95 | + $templateController = (string) $section['templateIdent']; |
|
| 96 | 96 | |
| 97 | 97 | if (!$templateController) { |
| 98 | 98 | $container['logger']->warning(sprintf( |
@@ -90,8 +90,8 @@ |
||
| 90 | 90 | return $response->withStatus(404); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | - $templateIdent = (string)$news['templateIdent']; |
|
| 94 | - $templateController = (string)$news['templateIdent']; |
|
| 93 | + $templateIdent = (string) $news['templateIdent']; |
|
| 94 | + $templateController = (string) $news['templateIdent']; |
|
| 95 | 95 | |
| 96 | 96 | if (!$templateController) { |
| 97 | 97 | $container['logger']->warning(sprintf( |