Test Failed
Push — master ( cbb324...62a694 )
by Nur
12:10
created
src/Classes/Counters.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
         if ($counter) {
62 62
             return $counter->value;
63
-        } elseif (! is_null($default)) {
63
+        } elseif (!is_null($default)) {
64 64
             return $default;
65 65
         }
66 66
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     {
147 147
         $cookieName = $this->getCookieName($key);
148 148
 
149
-        if (! array_key_exists($cookieName, $_COOKIE)) {
149
+        if (!array_key_exists($cookieName, $_COOKIE)) {
150 150
             $this->increment($key, $step);
151 151
             setcookie($cookieName, 1);
152 152
         }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
     {
163 163
         $cookieName = $this->getCookieName($key);
164 164
 
165
-        if (! array_key_exists($cookieName, $_COOKIE)) {
165
+        if (!array_key_exists($cookieName, $_COOKIE)) {
166 166
             $this->decrement($key, $step);
167 167
             setcookie($cookieName, 1);
168 168
         }
Please login to merge, or discard this patch.
src/Traits/HasCounter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         $counter = $this->counters->where('key', $key)->first();
35 35
 
36 36
         //connect the counter to the object if it's not exist
37
-        if (! $counter) {
37
+        if (!$counter) {
38 38
             $this->addCounter($key);
39 39
             $counter = $this->counters->where('key', $key)->first();
40 40
         }
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function hasCounter($key)
51 51
     {
52
-        return ! is_null($this->counters()->where('counters.key', $key)->first());
52
+        return !is_null($this->counters()->where('counters.key', $key)->first());
53 53
     }
54 54
 
55 55
     /**
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
         $counter = Counters::get($key);
80 80
 
81 81
         if ($counter) {
82
-            if (! $this->hasCounter($key)) { // not to add the counter twice
82
+            if (!$this->hasCounter($key)) { // not to add the counter twice
83 83
                 $this->counters()->attach(
84 84
                     $counter->id,
85 85
                     [
86
-                        'value' => ! is_null($initialValue) ? $initialValue : $counter->initial_value,
86
+                        'value' => !is_null($initialValue) ? $initialValue : $counter->initial_value,
87 87
                     ]
88 88
                 );
89 89
             } else {
Please login to merge, or discard this patch.