@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | if ($this->category()) { |
| 219 | - $loader->addFilter('category', $this->category(), [ 'operator' => 'in' ]); |
|
| 219 | + $loader->addFilter('category', $this->category(), ['operator' => 'in']); |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | if ($this->numPerPage()) { |
@@ -321,8 +321,8 @@ discard block |
||
| 321 | 321 | |
| 322 | 322 | $ids = explode(',', $ids); |
| 323 | 323 | |
| 324 | - $loader->addFilter('id', $ids, [ 'operator' => 'in' ]) |
|
| 325 | - ->addOrder('id', 'values', [ 'values' => $ids ]); |
|
| 324 | + $loader->addFilter('id', $ids, ['operator' => 'in']) |
|
| 325 | + ->addOrder('id', 'values', ['values' => $ids]); |
|
| 326 | 326 | |
| 327 | 327 | if (count($options) > 0) { |
| 328 | 328 | foreach ($options as $key => $option) { |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | $loader = $this->loader()->archive(); |
| 370 | 370 | |
| 371 | 371 | if ($this->category()) { |
| 372 | - $loader->addFilter('category', $this->category(), [ 'operator' => 'in' ]); |
|
| 372 | + $loader->addFilter('category', $this->category(), ['operator' => 'in']); |
|
| 373 | 373 | } |
| 374 | 374 | if ($this->numPerPage()) { |
| 375 | 375 | $loader->setPage($this->page()); |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | $loader->addOrder('news_date', 'desc'); |
| 123 | 123 | |
| 124 | 124 | if ($this->category()) { |
| 125 | - $loader->addFilter('category', $this->category(), [ 'operator' => 'in' ]); |
|
| 125 | + $loader->addFilter('category', $this->category(), ['operator' => 'in']); |
|
| 126 | 126 | } |
| 127 | 127 | if ($this->numPerPage()) { |
| 128 | 128 | $loader->setPage($this->page()); |
@@ -223,8 +223,8 @@ discard block |
||
| 223 | 223 | |
| 224 | 224 | $ids = explode(',', $ids); |
| 225 | 225 | |
| 226 | - $loader->addFilter('id', $ids, [ 'operator' => 'in' ]) |
|
| 227 | - ->addOrder('id', 'values', [ 'values' => $ids ]); |
|
| 226 | + $loader->addFilter('id', $ids, ['operator' => 'in']) |
|
| 227 | + ->addOrder('id', 'values', ['values' => $ids]); |
|
| 228 | 228 | |
| 229 | 229 | if (count($options) > 0) { |
| 230 | 230 | foreach ($options as $key => $option) { |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | $loader->addOrder('news_date', 'desc'); |
| 273 | 273 | |
| 274 | 274 | if ($this->category()) { |
| 275 | - $loader->addFilter('category', $this->category(), [ 'operator' => 'in' ]); |
|
| 275 | + $loader->addFilter('category', $this->category(), ['operator' => 'in']); |
|
| 276 | 276 | } |
| 277 | 277 | if ($this->numPerPage()) { |
| 278 | 278 | $loader->setPage($this->page()); |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | public function routes() |
| 77 | 77 | { |
| 78 | - return function ($arg) { |
|
| 78 | + return function($arg) { |
|
| 79 | 79 | return $this->sectionLoader()->resolveRoute($arg); |
| 80 | 80 | }; |
| 81 | 81 | } |
@@ -177,10 +177,10 @@ discard block |
||
| 177 | 177 | $documents = $section->attachments('document'); |
| 178 | 178 | |
| 179 | 179 | return [ |
| 180 | - 'title' => (string)$section->title(), |
|
| 181 | - 'summary' => (string)$section->summary(), |
|
| 182 | - 'image' => (string)$section->image(), |
|
| 183 | - 'content' => (string)$section->content(), |
|
| 180 | + 'title' => (string) $section->title(), |
|
| 181 | + 'summary' => (string) $section->summary(), |
|
| 182 | + 'image' => (string) $section->image(), |
|
| 183 | + 'content' => (string) $section->content(), |
|
| 184 | 184 | 'contentBlocks' => $contentBlocks, |
| 185 | 185 | 'gallery' => $gallery, |
| 186 | 186 | 'documents' => $documents |
@@ -73,7 +73,7 @@ |
||
| 73 | 73 | $loader = $this->all(); |
| 74 | 74 | $operator = []; |
| 75 | 75 | if (!$this->baseSection()) { |
| 76 | - $operator = [ 'operator' => 'IS NULL' ]; |
|
| 76 | + $operator = ['operator' => 'IS NULL']; |
|
| 77 | 77 | } |
| 78 | 78 | $loader->addFilter('master', $this->baseSection(), $operator); |
| 79 | 79 | |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | public function addStructureInterface($interface) |
| 35 | 35 | { |
| 36 | 36 | if ($interface instanceof TemplateProperty) { |
| 37 | - $interface = (string)$interface; |
|
| 37 | + $interface = (string) $interface; |
|
| 38 | 38 | if (empty($interface)) { |
| 39 | 39 | throw new InvalidArgumentException( |
| 40 | 40 | 'Invalid template structure interface' |
@@ -118,7 +118,7 @@ |
||
| 118 | 118 | protected function loadNewsFromPath(Container $container) |
| 119 | 119 | { |
| 120 | 120 | if (!$this->news) { |
| 121 | - $config = $this->config(); |
|
| 121 | + $config = $this->config(); |
|
| 122 | 122 | $type = (isset($config['obj_type']) ? $config['obj_type'] : $this->objType); |
| 123 | 123 | $model = $container['model/factory']->create($type); |
| 124 | 124 | |
@@ -118,7 +118,7 @@ |
||
| 118 | 118 | protected function loadEventFromPath(Container $container) |
| 119 | 119 | { |
| 120 | 120 | if (!$this->event) { |
| 121 | - $config = $this->config(); |
|
| 121 | + $config = $this->config(); |
|
| 122 | 122 | $type = (isset($config['obj_type']) ? $config['obj_type'] : $this->objType); |
| 123 | 123 | $model = $container['model/factory']->create($type); |
| 124 | 124 | |
@@ -88,8 +88,8 @@ |
||
| 88 | 88 | return $response->withStatus(404); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | - $templateIdent = (string)$section->templateIdent(); |
|
| 92 | - $templateController = (string)$section->templateIdent(); |
|
| 91 | + $templateIdent = (string) $section->templateIdent(); |
|
| 92 | + $templateController = (string) $section->templateIdent(); |
|
| 93 | 93 | |
| 94 | 94 | if (!$templateController) { |
| 95 | 95 | return $response->withStatus(404); |
@@ -199,18 +199,18 @@ discard block |
||
| 199 | 199 | ? $this->translator()->translation($case['formats']['to']) |
| 200 | 200 | : null; |
| 201 | 201 | |
| 202 | - $formats['from'] = $this->crossPlatformFormat((string)$formats['from']); |
|
| 203 | - $formats['to'] = $this->crossPlatformFormat((string)$formats['to']); |
|
| 202 | + $formats['from'] = $this->crossPlatformFormat((string) $formats['from']); |
|
| 203 | + $formats['to'] = $this->crossPlatformFormat((string) $formats['to']); |
|
| 204 | 204 | |
| 205 | 205 | if (!$this->to || !$formats['to']) { |
| 206 | 206 | return sprintf( |
| 207 | - (string)$content, |
|
| 207 | + (string) $content, |
|
| 208 | 208 | strftime($formats['from'], $this->from->getTimestamp()) |
| 209 | 209 | ); |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | 212 | return sprintf( |
| 213 | - (string)$content, |
|
| 213 | + (string) $content, |
|
| 214 | 214 | strftime($formats['from'], $this->from->getTimestamp()), |
| 215 | 215 | strftime($formats['to'], $this->to->getTimestamp()) |
| 216 | 216 | ); |
@@ -235,13 +235,13 @@ discard block |
||
| 235 | 235 | |
| 236 | 236 | if (!$this->to || !$formats['to']) { |
| 237 | 237 | return sprintf( |
| 238 | - (string)$content, |
|
| 238 | + (string) $content, |
|
| 239 | 239 | strftime($formats['from'], $this->from->getTimestamp()) |
| 240 | 240 | ); |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | return sprintf( |
| 244 | - (string)$content, |
|
| 244 | + (string) $content, |
|
| 245 | 245 | strftime($formats['from'], $this->from->getTimestamp()), |
| 246 | 246 | strftime($formats['to'], $this->to->getTimestamp()) |
| 247 | 247 | ); |