Passed
Push — master ( 63d972...7b5afd )
by Yuri
14:44 queued 01:20
created
issues/14/msg.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-if (!session_id()) @session_start();
2
+if ( ! session_id()) @session_start();
3 3
 require_once('../../vendor/autoload.php');
4 4
 
5 5
 use Tamtamchik\SimpleFlash\Exceptions\FlashTemplateNotFoundException;
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,7 @@
 block discarded – undo
1 1
 <?php
2
-if (!session_id()) @session_start();
2
+if (!session_id()) {
3
+  @session_start();
4
+}
3 5
 require_once('../../vendor/autoload.php');
4 6
 
5 7
 use Tamtamchik\SimpleFlash\Exceptions\FlashTemplateNotFoundException;
Please login to merge, or discard this patch.
issues/14/create_msg.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,7 @@
 block discarded – undo
2 2
 
3 3
 use Tamtamchik\SimpleFlash\Exceptions\FlashTemplateNotFoundException;
4 4
 
5
-if (!session_id()) @session_start();
5
+if ( ! session_id()) @session_start();
6 6
 require_once('../../vendor/autoload.php');
7 7
 
8 8
 try {
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,9 @@
 block discarded – undo
2 2
 
3 3
 use Tamtamchik\SimpleFlash\Exceptions\FlashTemplateNotFoundException;
4 4
 
5
-if (!session_id()) @session_start();
5
+if (!session_id()) {
6
+  @session_start();
7
+}
6 8
 require_once('../../vendor/autoload.php');
7 9
 
8 10
 try {
Please login to merge, or discard this patch.
src/Engine.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     {
33 33
         $this->template = $template;
34 34
 
35
-        if (!array_key_exists($this->key, $_SESSION)) {
35
+        if ( ! array_key_exists($this->key, $_SESSION)) {
36 36
             $_SESSION[$this->key] = [];
37 37
         }
38 38
     }
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
     {
71 71
         $type = strip_tags($type);
72 72
 
73
-        if (empty($message) || !in_array($type, $this->types)) {
73
+        if (empty($message) || ! in_array($type, $this->types)) {
74 74
             return $this;
75 75
         }
76 76
 
77
-        if (!array_key_exists($type, $_SESSION[$this->key])) {
77
+        if ( ! array_key_exists($type, $_SESSION[$this->key])) {
78 78
             $_SESSION[$this->key][$type] = [];
79 79
         }
80 80
 
@@ -98,17 +98,17 @@  discard block
 block discarded – undo
98 98
         $result = '';
99 99
 
100 100
         if (
101
-            !array_key_exists($this->key, $_SESSION) ||
102
-            (!is_null($type) && !array_key_exists($type, $_SESSION[$this->key]))
101
+            ! array_key_exists($this->key, $_SESSION) ||
102
+            ( ! is_null($type) && ! array_key_exists($type, $_SESSION[$this->key]))
103 103
         ) {
104 104
             return $result;
105 105
         }
106 106
 
107
-        if (!is_null($template)) {
107
+        if ( ! is_null($template)) {
108 108
             $this->setTemplate(TemplateFactory::create($template));
109 109
         }
110 110
 
111
-        if (!is_null($type) && !in_array($type, $this->types)) {
111
+        if ( ! is_null($type) && ! in_array($type, $this->types)) {
112 112
             return $result;
113 113
         }
114 114
 
@@ -134,12 +134,12 @@  discard block
 block discarded – undo
134 134
      */
135 135
     public function hasMessages(string $type = null): bool
136 136
     {
137
-        if (!is_null($type)) {
138
-            return !empty($_SESSION[$this->key][$type]);
137
+        if ( ! is_null($type)) {
138
+            return ! empty($_SESSION[$this->key][$type]);
139 139
         }
140 140
 
141 141
         foreach ($this->types as $type) {
142
-            if (!empty($_SESSION[$this->key][$type])) {
142
+            if ( ! empty($_SESSION[$this->key][$type])) {
143 143
                 return true;
144 144
             }
145 145
         }
Please login to merge, or discard this patch.