@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | return ''; |
129 | 129 | } |
130 | 130 | } elseif ($val instanceof Translation) { |
131 | - $propertyValue = (string)$val; |
|
131 | + $propertyValue = (string) $val; |
|
132 | 132 | } else { |
133 | 133 | $propertyValue = $val; |
134 | 134 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | $val = $this->val(); |
177 | 177 | if ($this->hasChoice($val)) { |
178 | 178 | $choice = $this->choice($val); |
179 | - $keys = [ 'controller', 'template', 'class' ]; |
|
179 | + $keys = ['controller', 'template', 'class']; |
|
180 | 180 | foreach ($keys as $key) { |
181 | 181 | if (isset($choice[$key])) { |
182 | 182 | return $choice[$key]; |
@@ -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 | ); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * @param Container $container |
52 | 52 | * @return CmsConfig Website configurations (from cms.json). |
53 | 53 | */ |
54 | - $container['cms/config'] = function (Container $container) { |
|
54 | + $container['cms/config'] = function(Container $container) { |
|
55 | 55 | $appConfig = $container['config']; |
56 | 56 | $cms = $appConfig->get('cms'); |
57 | 57 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | * @param Container $container Pimple DI Container. |
85 | 85 | * @return DateHelper |
86 | 86 | */ |
87 | - $container['cms/date/helper'] = function (Container $container) { |
|
87 | + $container['cms/date/helper'] = function(Container $container) { |
|
88 | 88 | return new DateHelper([ |
89 | 89 | 'date_formats' => $container['cms/config']->get('date_formats'), |
90 | 90 | 'time_formats' => $container['cms/config']->get('time_formats'), |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | * @param Container $container Pimple DI Container. |
97 | 97 | * @return DateHelper |
98 | 98 | */ |
99 | - $container['date/helper'] = function (Container $container) { |
|
99 | + $container['date/helper'] = function(Container $container) { |
|
100 | 100 | trigger_error(sprintf( |
101 | 101 | '%s is deprecated, use %s instead', |
102 | 102 | '$container[\'date/helper\']', |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | * @param Container $container Pimple DI Container. |
122 | 122 | * @return GenericFactory |
123 | 123 | */ |
124 | - $container['cms/section/factory'] = function (Container $container) { |
|
124 | + $container['cms/section/factory'] = function(Container $container) { |
|
125 | 125 | return new GenericFactory([ |
126 | 126 | 'base_class' => SectionInterface::class, |
127 | 127 | 'arguments' => $container['model/factory']->arguments(), |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | * @param Container $container Pimple DI Container. |
136 | 136 | * @return SectionLoader |
137 | 137 | */ |
138 | - $container['cms/section/loader'] = function (Container $container) { |
|
138 | + $container['cms/section/loader'] = function(Container $container) { |
|
139 | 139 | $sectionLoader = new SectionLoader([ |
140 | 140 | 'loader' => $container['model/collection/loader'], |
141 | 141 | 'factory' => $container['model/factory'], |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | * @param Container $container Pimple DI Container. |
165 | 165 | * @return NewsLoader |
166 | 166 | */ |
167 | - $container['cms/news/loader'] = function (Container $container) { |
|
167 | + $container['cms/news/loader'] = function(Container $container) { |
|
168 | 168 | $newsLoader = new NewsLoader([ |
169 | 169 | 'loader' => $container['model/collection/loader'], |
170 | 170 | 'factory' => $container['model/factory'], |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | * @param Container $container |
186 | 186 | * @return NewsManager |
187 | 187 | */ |
188 | - $container['cms/news/manager'] = function (Container $container) { |
|
188 | + $container['cms/news/manager'] = function(Container $container) { |
|
189 | 189 | |
190 | 190 | $newsManager = new NewsManager([ |
191 | 191 | 'loader' => $container['model/collection/loader'], |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | * @param Container $container Pimple DI Container. |
211 | 211 | * @return EventLoader |
212 | 212 | */ |
213 | - $container['cms/event/loader'] = function (Container $container) { |
|
213 | + $container['cms/event/loader'] = function(Container $container) { |
|
214 | 214 | $eventLoader = new EventLoader([ |
215 | 215 | 'loader' => $container['model/collection/loader'], |
216 | 216 | 'factory' => $container['model/factory'], |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | * @param Container $container |
235 | 235 | * @return EventManager |
236 | 236 | */ |
237 | - $container['cms/event/manager'] = function (Container $container) { |
|
237 | + $container['cms/event/manager'] = function(Container $container) { |
|
238 | 238 | |
239 | 239 | $eventManager = new EventManager([ |
240 | 240 | 'loader' => $container['model/collection/loader'], |
@@ -31,7 +31,7 @@ |
||
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 | } |
@@ -31,7 +31,7 @@ |
||
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 | } |