Completed
Pull Request — master (#10)
by lee
02:47
created
examples/primer.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 
6 6
 session_start();
7 7
 
8
-require_once __DIR__ . '/../vendor/autoload.php';
8
+require_once __DIR__.'/../vendor/autoload.php';
9 9
 
10 10
 flash()->error(['Invalid email!', 'Invalid username!'])
11 11
     ->warning('Warning message.')
Please login to merge, or discard this patch.
examples/uikit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 
6 6
 session_start();
7 7
 
8
-require_once __DIR__ . '/../vendor/autoload.php';
8
+require_once __DIR__.'/../vendor/autoload.php';
9 9
 
10 10
 flash()->error(['Invalid email!', 'Invalid username!'])
11 11
     ->warning('Warning message.')
Please login to merge, or discard this patch.
examples/bootstrap.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 
6 6
 session_start();
7 7
 
8
-require_once __DIR__ . '/../vendor/autoload.php';
8
+require_once __DIR__.'/../vendor/autoload.php';
9 9
 
10 10
 flash()->error(['Invalid email!', 'Invalid username!'])
11 11
     ->warning('Warning message.')
Please login to merge, or discard this patch.
src/Flash.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Engine.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/function.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.