| @@ -49,7 +49,7 @@ | ||
| 49 | 49 | $template = TemplateFactory::create(); | 
| 50 | 50 | } | 
| 51 | 51 | |
| 52 | -        if (!$assigned || !isset(self::$engine)) { | |
| 52 | +        if ( ! $assigned || ! isset(self::$engine)) { | |
| 53 | 53 | self::$engine = new Engine($template); | 
| 54 | 54 | } | 
| 55 | 55 | } | 
| @@ -30,7 +30,7 @@ discard block | ||
| 30 | 30 |      { | 
| 31 | 31 | $this->template = $template; | 
| 32 | 32 | |
| 33 | -        if (!array_key_exists($this->key, $_SESSION)) { | |
| 33 | +        if ( ! array_key_exists($this->key, $_SESSION)) { | |
| 34 | 34 | $_SESSION[$this->key] = []; | 
| 35 | 35 | } | 
| 36 | 36 | } | 
| @@ -68,11 +68,11 @@ discard block | ||
| 68 | 68 |      { | 
| 69 | 69 | $type = strip_tags($type); | 
| 70 | 70 | |
| 71 | -        if (empty($message) || !in_array($type, $this->types)) { | |
| 71 | +        if (empty($message) || ! in_array($type, $this->types)) { | |
| 72 | 72 | return $this; | 
| 73 | 73 | } | 
| 74 | 74 | |
| 75 | -        if (!array_key_exists($type, $_SESSION[$this->key])) { | |
| 75 | +        if ( ! array_key_exists($type, $_SESSION[$this->key])) { | |
| 76 | 76 | $_SESSION[$this->key][$type] = []; | 
| 77 | 77 | } | 
| 78 | 78 | |
| @@ -92,7 +92,7 @@ discard block | ||
| 92 | 92 |      { | 
| 93 | 93 | $result = ''; | 
| 94 | 94 | |
| 95 | -        if (!is_null($type) && !in_array($type, $this->types)) { | |
| 95 | +        if ( ! is_null($type) && ! in_array($type, $this->types)) { | |
| 96 | 96 | return $result; | 
| 97 | 97 | } | 
| 98 | 98 | |
| @@ -118,12 +118,12 @@ discard block | ||
| 118 | 118 | */ | 
| 119 | 119 | public function hasMessages($type = null) | 
| 120 | 120 |      { | 
| 121 | -        if (!is_null($type)) { | |
| 122 | - return !empty($_SESSION[$this->key][$type]); | |
| 121 | +        if ( ! is_null($type)) { | |
| 122 | + return ! empty($_SESSION[$this->key][$type]); | |
| 123 | 123 | } | 
| 124 | 124 | |
| 125 | 125 |          foreach ($this->types as $type) { | 
| 126 | -            if (!empty($_SESSION[$this->key][$type])) { | |
| 126 | +            if ( ! empty($_SESSION[$this->key][$type])) { | |
| 127 | 127 | return true; | 
| 128 | 128 | } | 
| 129 | 129 | } | 
| @@ -5,7 +5,7 @@ discard block | ||
| 5 | 5 | use Tamtamchik\SimpleFlash\TemplateInterface; | 
| 6 | 6 | use Tamtamchik\SimpleFlash\Exceptions\FlashTemplateNotFoundException; | 
| 7 | 7 | |
| 8 | -if (!function_exists('flash')) { | |
| 8 | +if ( ! function_exists('flash')) { | |
| 9 | 9 | |
| 10 | 10 | /** | 
| 11 | 11 | * Wrapper for flash object to be used as global function. | 
| @@ -21,7 +21,7 @@ discard block | ||
| 21 | 21 |      { | 
| 22 | 22 | $flash = new Flash($template); | 
| 23 | 23 | |
| 24 | -        if (!empty($message)) { | |
| 24 | +        if ( ! empty($message)) { | |
| 25 | 25 | return $flash->message($message, $type); | 
| 26 | 26 | } | 
| 27 | 27 | |