@@ -16,10 +16,8 @@ |
||
16 | 16 | |
17 | 17 | use Nette; |
18 | 18 | use Nette\Localization; |
19 | - |
|
20 | 19 | use Kdyby; |
21 | 20 | use Kdyby\Translation; |
22 | - |
|
23 | 21 | use IPub; |
24 | 22 | use IPub\FlashMessages\Adapters; |
25 | 23 | use IPub\FlashMessages\Entities; |
@@ -284,8 +284,8 @@ |
||
284 | 284 | */ |
285 | 285 | private function checkForAttribute(array $attributes, string $type, $default) |
286 | 286 | { |
287 | - foreach($attributes as $attribute) { |
|
288 | - switch($type) |
|
287 | + foreach ($attributes as $attribute) { |
|
288 | + switch ($type) |
|
289 | 289 | { |
290 | 290 | case 'title': |
291 | 291 | if (is_string($attribute) === TRUE || $attribute instanceof Translation\Phrase || $attribute instanceof Adapters\IPhraseAdapter) { |
@@ -267,7 +267,7 @@ |
||
267 | 267 | */ |
268 | 268 | public function __toString() |
269 | 269 | { |
270 | - return $this->level . ' ' . ($this->title ? $this->title . ' ' : '') . $this->getMessage(); |
|
270 | + return $this->level.' '.($this->title ? $this->title.' ' : '').$this->getMessage(); |
|
271 | 271 | } |
272 | 272 | |
273 | 273 | /** |
@@ -73,9 +73,9 @@ discard block |
||
73 | 73 | |
74 | 74 | foreach (['useTitle' => ['enableTitle', 'disableTitle'], 'useOverlay' => ['enableOverlay', 'disableOverlay']] as $parameter => $commands) { |
75 | 75 | if ($config[$parameter] === TRUE) { |
76 | - $control->addSetup('$service->' . $commands[0] . '(?)', [$config[$parameter]]); |
|
76 | + $control->addSetup('$service->'.$commands[0].'(?)', [$config[$parameter]]); |
|
77 | 77 | } else { |
78 | - $control->addSetup('$service->' . $commands[1] . '(?)', [$config[$parameter]]); |
|
78 | + $control->addSetup('$service->'.$commands[1].'(?)', [$config[$parameter]]); |
|
79 | 79 | } |
80 | 80 | } |
81 | 81 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | ->setClass(Events\OnResponseHandler::class); |
89 | 89 | |
90 | 90 | $application = $builder->getDefinition('application'); |
91 | - $application->addSetup('$service->onResponse[] = ?', ['@' . $this->prefix('onResponseHandler')]); |
|
91 | + $application->addSetup('$service->onResponse[] = ?', ['@'.$this->prefix('onResponseHandler')]); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | /** |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | // If template was not defined before... |
158 | 158 | if ($this->template->getFile() === NULL) { |
159 | 159 | // ...try to get base component template file |
160 | - $templateFile = !empty($this->templateFile) ? $this->templateFile : __DIR__ . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'default' . DIRECTORY_SEPARATOR . 'default.latte'; |
|
160 | + $templateFile = !empty($this->templateFile) ? $this->templateFile : __DIR__.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.'default'.DIRECTORY_SEPARATOR.'default.latte'; |
|
161 | 161 | $this->template->setFile($templateFile); |
162 | 162 | } |
163 | 163 | } |
@@ -199,8 +199,8 @@ discard block |
||
199 | 199 | $templateName = preg_replace('/.latte/', '', $templateFile); |
200 | 200 | |
201 | 201 | // ...check if extension template is used |
202 | - if (is_file($dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateName . DIRECTORY_SEPARATOR . 'default.latte')) { |
|
203 | - $templateFile = $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateName . DIRECTORY_SEPARATOR . 'default.latte'; |
|
202 | + if (is_file($dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateName.DIRECTORY_SEPARATOR.'default.latte')) { |
|
203 | + $templateFile = $dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateName.DIRECTORY_SEPARATOR.'default.latte'; |
|
204 | 204 | |
205 | 205 | } else { |
206 | 206 | // ...if not throw exception |
@@ -19,8 +19,6 @@ |
||
19 | 19 | use Nette; |
20 | 20 | use Nette\Application; |
21 | 21 | use Nette\Localization; |
22 | -use Nette\Utils; |
|
23 | - |
|
24 | 22 | use IPub; |
25 | 23 | use IPub\FlashMessages; |
26 | 24 | use IPub\FlashMessages\Entities; |
@@ -18,7 +18,6 @@ |
||
18 | 18 | |
19 | 19 | use Nette; |
20 | 20 | use Nette\Localization; |
21 | - |
|
22 | 21 | use Kdyby; |
23 | 22 | use Kdyby\Translation; |
24 | 23 |