Passed
Pull Request — main (#18)
by
unknown
07:12 queued 03:32
created
src/Cli/Commands/Cache/Clear.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $config  = config('cache');
55 55
         $handler = $this->argument('driver', $params[0] ?? $config['handler']);
56 56
 
57
-        if (! array_key_exists($handler, $config['valid_handlers'])) {
57
+        if (!array_key_exists($handler, $config['valid_handlers'])) {
58 58
             $this->fail($handler . ' n\'est pas un gestionnaire de cache valide.');
59 59
 
60 60
             return;
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $config['handler'] = $handler;
64 64
         $cache             = Services::cache($config);
65 65
 
66
-        if (! $cache->clear()) {
66
+        if (!$cache->clear()) {
67 67
             // @codeCoverageIgnoreStart
68 68
             $this->fail('Erreur lors de l\'effacement du cache.');
69 69
 
Please login to merge, or discard this patch.
src/Event/EventManager.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public function __construct(array $events = [])
48 48
     {
49 49
         $this->events = $events;
50
-        if (! array_key_exists(self::WILDCARD, $this->events)) {
50
+        if (!array_key_exists(self::WILDCARD, $this->events)) {
51 51
             $this->events[self::WILDCARD] = [];
52 52
         }
53 53
     }
@@ -65,14 +65,14 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function on(string $event, callable $callback, int $priority = 0): bool
67 67
     {
68
-        if (! array_key_exists($event, $this->events)) {
68
+        if (!array_key_exists($event, $this->events)) {
69 69
             $this->events[$event] = [];
70 70
         }
71
-        if (! array_key_exists($priority, $this->events[$event])) {
71
+        if (!array_key_exists($priority, $this->events[$event])) {
72 72
             $this->events[$event][$priority] = [];
73 73
         }
74 74
 
75
-        if (! in_array($callback, $this->events[$event][$priority], true)) {
75
+        if (!in_array($callback, $this->events[$event][$priority], true)) {
76 76
             $this->events[$event][$priority][] = $callback;
77 77
 
78 78
             return true;
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function off(string $event, callable $callback): bool
96 96
     {
97
-        if (! array_key_exists($event, $this->events) || ! $this->events[$event]) {
97
+        if (!array_key_exists($event, $this->events) || !$this->events[$event]) {
98 98
             return false;
99 99
         }
100 100
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     public function emit($event, $target = null, $argv = [])
125 125
     {
126
-        if (! ($event instanceof EventInterface)) {
126
+        if (!($event instanceof EventInterface)) {
127 127
             $event = new Event($event, $target, $argv);
128 128
         } else {
129 129
             if ($target) {
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         }
136 136
 
137 137
         $eventName = $event->getName();
138
-        if (! array_key_exists($eventName, $this->events)) {
138
+        if (!array_key_exists($eventName, $this->events)) {
139 139
             $this->events[$eventName] = [];
140 140
         }
141 141
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         $result = null;
144 144
 
145 145
         foreach ($events as $priority) {
146
-            if (! is_array($priority)) {
146
+            if (!is_array($priority)) {
147 147
                 continue;
148 148
             }
149 149
 
Please login to merge, or discard this patch.