@@ -17,8 +17,6 @@ |
||
| 17 | 17 | use Nette; |
| 18 | 18 | use Nette\Application; |
| 19 | 19 | use Nette\Localization; |
| 20 | -use Nette\Utils; |
|
| 21 | - |
|
| 22 | 20 | use IPub; |
| 23 | 21 | use IPub\FlashMessages; |
| 24 | 22 | use IPub\FlashMessages\Exceptions; |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | // If template was not defined before... |
| 156 | 156 | if ($this->template->getFile() === NULL) { |
| 157 | 157 | // ...try to get base component template file |
| 158 | - $templateFile = !empty($this->templateFile) ? $this->templateFile : __DIR__ . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'default' . DIRECTORY_SEPARATOR . 'default.latte'; |
|
| 158 | + $templateFile = !empty($this->templateFile) ? $this->templateFile : __DIR__.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.'default'.DIRECTORY_SEPARATOR.'default.latte'; |
|
| 159 | 159 | $this->template->setFile($templateFile); |
| 160 | 160 | } |
| 161 | 161 | } |
@@ -196,8 +196,8 @@ discard block |
||
| 196 | 196 | $templateName = preg_replace('/.latte/', '', $templateFile); |
| 197 | 197 | |
| 198 | 198 | // ...check if extension template is used |
| 199 | - if (is_file($dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateName . '.latte')) { |
|
| 200 | - $templateFile = $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateName . '.latte'; |
|
| 199 | + if (is_file($dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateName.'.latte')) { |
|
| 200 | + $templateFile = $dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateName.'.latte'; |
|
| 201 | 201 | |
| 202 | 202 | } else { |
| 203 | 203 | // ...if not throw exception |
@@ -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; |
@@ -229,8 +229,8 @@ |
||
| 229 | 229 | */ |
| 230 | 230 | private function checkForAttribute(array $attributes, $type) |
| 231 | 231 | { |
| 232 | - foreach($attributes as $attribute) { |
|
| 233 | - switch($type) |
|
| 232 | + foreach ($attributes as $attribute) { |
|
| 233 | + switch ($type) |
|
| 234 | 234 | { |
| 235 | 235 | case 'title': |
| 236 | 236 | 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 | /** |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | ->setClass(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 | /** |