@@ -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; |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * @date 12.03.14 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\FlashMessages\Components; |
18 | 18 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | // If template was not defined before... |
160 | 160 | if ($this->template->getFile() === NULL) { |
161 | 161 | // ...try to get base component template file |
162 | - $templateFile = !empty($this->templateFile) ? $this->templateFile : __DIR__ . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'default' . DIRECTORY_SEPARATOR . 'default.latte'; |
|
162 | + $templateFile = !empty($this->templateFile) ? $this->templateFile : __DIR__.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.'default'.DIRECTORY_SEPARATOR.'default.latte'; |
|
163 | 163 | $this->template->setFile($templateFile); |
164 | 164 | } |
165 | 165 | } |
@@ -203,8 +203,8 @@ discard block |
||
203 | 203 | $templateName = preg_replace('/.latte/', '', $templateFile); |
204 | 204 | |
205 | 205 | // ...check if extension template is used |
206 | - if (is_file($dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateName . DIRECTORY_SEPARATOR . 'default.latte')) { |
|
207 | - $templateFile = $dir . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . $templateName . DIRECTORY_SEPARATOR . 'default.latte'; |
|
206 | + if (is_file($dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateName.DIRECTORY_SEPARATOR.'default.latte')) { |
|
207 | + $templateFile = $dir.DIRECTORY_SEPARATOR.'template'.DIRECTORY_SEPARATOR.$templateName.DIRECTORY_SEPARATOR.'default.latte'; |
|
208 | 208 | |
209 | 209 | } else { |
210 | 210 | // ...if not throw exception |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * @date 06.02.15 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\FlashMessages\Entities; |
18 | 18 | |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | */ |
274 | 274 | public function __toString() |
275 | 275 | { |
276 | - return $this->level . ' ' . ($this->title ? $this->title . ' ' : '') . $this->getMessage(); |
|
276 | + return $this->level.' '.($this->title ? $this->title.' ' : '').$this->getMessage(); |
|
277 | 277 | } |
278 | 278 | |
279 | 279 | /** |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * @date 06.02.15 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\FlashMessages\Entities; |
18 | 18 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * @date 12.03.14 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\FlashMessages\Components; |
18 | 18 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * @date 06.02.15 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\FlashMessages\Adapters; |
18 | 18 |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | * @date 01.02.15 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\FlashMessages; |
18 | 18 | |
@@ -288,8 +288,8 @@ discard block |
||
288 | 288 | */ |
289 | 289 | private function checkForAttribute(array $attributes, string $type, $default) |
290 | 290 | { |
291 | - foreach($attributes as $attribute) { |
|
292 | - switch($type) |
|
291 | + foreach ($attributes as $attribute) { |
|
292 | + switch ($type) |
|
293 | 293 | { |
294 | 294 | case 'title': |
295 | 295 | if (is_string($attribute) === TRUE || $attribute instanceof Translation\Phrase || $attribute instanceof Adapters\IPhraseAdapter) { |
@@ -18,7 +18,6 @@ |
||
18 | 18 | |
19 | 19 | use Nette; |
20 | 20 | use Nette\Localization; |
21 | - |
|
22 | 21 | use IPub\FlashMessages\Adapters; |
23 | 22 | use IPub\FlashMessages\Entities; |
24 | 23 | use IPub\FlashMessages\Storage; |
@@ -59,7 +59,7 @@ |
||
59 | 59 | * |
60 | 60 | * @return \stdClass|Entities\IMessage |
61 | 61 | */ |
62 | - public function flashMessage($message, string $type = 'info', ?string $title = null, bool $overlay = false, ?int $count = null, ?array $parameters = []): \stdClass |
|
62 | + public function flashMessage($message, string $type = 'info', ?string $title = NULL, bool $overlay = FALSE, ?int $count = NULL, ?array $parameters = []): \stdClass |
|
63 | 63 | { |
64 | 64 | return $this->flashNotifier->message($message, $type, $title, $overlay, $count, $parameters); |
65 | 65 | } |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * @date 06.02.15 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\FlashMessages\Events; |
18 | 18 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | * @date 05.02.15 |
13 | 13 | */ |
14 | 14 | |
15 | -declare(strict_types = 1); |
|
15 | +declare(strict_types=1); |
|
16 | 16 | |
17 | 17 | namespace IPub\FlashMessages\Exceptions; |
18 | 18 |