| @@ -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 @@ 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 | 
| @@ -18,9 +18,7 @@ | ||
| 18 | 18 | |
| 19 | 19 | use Nette\Application; | 
| 20 | 20 | use Nette\Bridges; | 
| 21 | -use Nette\ComponentModel; | |
| 22 | 21 | use Nette\Localization; | 
| 23 | - | |
| 24 | 22 | use IPub\FlashMessages\Entities; | 
| 25 | 23 | use IPub\FlashMessages\Exceptions; | 
| 26 | 24 | use IPub\FlashMessages\Storage; | 
| @@ -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 | |
| @@ -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 | |
| @@ -12,7 +12,7 @@ discard block | ||
| 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\DI; | 
| 18 | 18 | |
| @@ -80,9 +80,9 @@ discard block | ||
| 80 | 80 | |
| 81 | 81 |  		foreach (['useTitle' => ['enableTitle', 'disableTitle'], 'useOverlay' => ['enableOverlay', 'disableOverlay']] as $parameter => $commands) { | 
| 82 | 82 |  			if ($config->$parameter === TRUE) { | 
| 83 | -				$control->addSetup('$service->' . $commands[0] . '(?)', [$config->$parameter]); | |
| 83 | +				$control->addSetup('$service->'.$commands[0].'(?)', [$config->$parameter]); | |
| 84 | 84 |  			} else { | 
| 85 | -				$control->addSetup('$service->' . $commands[1] . '(?)', [$config->$parameter]); | |
| 85 | +				$control->addSetup('$service->'.$commands[1].'(?)', [$config->$parameter]); | |
| 86 | 86 | } | 
| 87 | 87 | } | 
| 88 | 88 | |
| @@ -95,7 +95,7 @@ discard block | ||
| 95 | 95 | ->setType(Events\OnResponseHandler::class); | 
| 96 | 96 | |
| 97 | 97 |  		$application = $builder->getDefinition('application'); | 
| 98 | -		$application->addSetup('$service->onResponse[] = ?', ['@' . $this->prefix('onResponseHandler')]); | |
| 98 | +		$application->addSetup('$service->onResponse[] = ?', ['@'.$this->prefix('onResponseHandler')]); | |
| 99 | 99 | } | 
| 100 | 100 | |
| 101 | 101 | /** | 
| @@ -40,10 +40,10 @@ | ||
| 40 | 40 | public function getConfigSchema(): Schema | 
| 41 | 41 |  	{ | 
| 42 | 42 | return Expect::structure([ | 
| 43 | - 'useOverlay' => Expect::bool(false), | |
| 43 | + 'useOverlay' => Expect::bool(FALSE), | |
| 44 | 44 | 'templateFile' => Expect::string(), | 
| 45 | - 'useTranslator' => Expect::bool(false), | |
| 46 | - 'useTitle' => Expect::bool(true) | |
| 45 | + 'useTranslator' => Expect::bool(FALSE), | |
| 46 | + 'useTitle' => Expect::bool(TRUE) | |
| 47 | 47 | ]); | 
| 48 | 48 | } | 
| 49 | 49 | |