@@ -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 | /** |
@@ -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 |
@@ -20,7 +20,6 @@ |
||
20 | 20 | use Nette\Bridges; |
21 | 21 | use Nette\ComponentModel; |
22 | 22 | use Nette\Localization; |
23 | - |
|
24 | 23 | use IPub\FlashMessages\Entities; |
25 | 24 | use IPub\FlashMessages\Exceptions; |
26 | 25 | use IPub\FlashMessages\Storage; |
@@ -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) { |
@@ -18,9 +18,7 @@ |
||
18 | 18 | |
19 | 19 | use Nette; |
20 | 20 | use Nette\Localization; |
21 | - |
|
22 | 21 | use Kdyby\Translation; |
23 | - |
|
24 | 22 | use IPub\FlashMessages\Adapters; |
25 | 23 | use IPub\FlashMessages\Entities; |
26 | 24 | use IPub\FlashMessages\Storage; |
@@ -18,7 +18,6 @@ |
||
18 | 18 | |
19 | 19 | use Nette; |
20 | 20 | use Nette\Localization; |
21 | - |
|
22 | 21 | use Kdyby\Translation; |
23 | 22 | |
24 | 23 | /** |
@@ -77,9 +77,9 @@ discard block |
||
77 | 77 | |
78 | 78 | foreach (['useTitle' => ['enableTitle', 'disableTitle'], 'useOverlay' => ['enableOverlay', 'disableOverlay']] as $parameter => $commands) { |
79 | 79 | if ($config[$parameter] === TRUE) { |
80 | - $control->addSetup('$service->' . $commands[0] . '(?)', [$config[$parameter]]); |
|
80 | + $control->addSetup('$service->'.$commands[0].'(?)', [$config[$parameter]]); |
|
81 | 81 | } else { |
82 | - $control->addSetup('$service->' . $commands[1] . '(?)', [$config[$parameter]]); |
|
82 | + $control->addSetup('$service->'.$commands[1].'(?)', [$config[$parameter]]); |
|
83 | 83 | } |
84 | 84 | } |
85 | 85 | |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | ->setType(Events\OnResponseHandler::class); |
93 | 93 | |
94 | 94 | $application = $builder->getDefinition('application'); |
95 | - $application->addSetup('$service->onResponse[] = ?', ['@' . $this->prefix('onResponseHandler')]); |
|
95 | + $application->addSetup('$service->onResponse[] = ?', ['@'.$this->prefix('onResponseHandler')]); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | /** |