@@ -68,11 +68,11 @@ |
||
68 | 68 | */ |
69 | 69 | public function execute(array $params) |
70 | 70 | { |
71 | - $this->component = 'Controller'; |
|
72 | - $this->directory = 'Controllers'; |
|
73 | - $this->template = 'controller.tpl.php'; |
|
74 | - $this->classNameLang = 'CLI.generator.className.controller'; |
|
75 | - $params = array_merge($params, ['suffix' => null]); |
|
71 | + $this->component = 'Controller'; |
|
72 | + $this->directory = 'Controllers'; |
|
73 | + $this->template = 'controller.tpl.php'; |
|
74 | + $this->classNameLang = 'CLI.generator.className.controller'; |
|
75 | + $params = array_merge($params, ['suffix' => null]); |
|
76 | 76 | |
77 | 77 | $this->task('Creation du controleur')->eol(); |
78 | 78 |
@@ -54,7 +54,7 @@ discard block |
||
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 |
||
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 |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | return true; |
111 | 111 | } |
112 | 112 | |
113 | - /** |
|
113 | + /** |
|
114 | 114 | * @deprecated use off() instead |
115 | 115 | */ |
116 | 116 | public function detach(string $event, callable $callback, int $priority = 0): bool |
@@ -167,10 +167,10 @@ discard block |
||
167 | 167 | return $result; |
168 | 168 | } |
169 | 169 | |
170 | - /** |
|
171 | - * @deprecated use emit() instead |
|
172 | - */ |
|
173 | - public function trigger($event, $target = null, $argv = []) |
|
170 | + /** |
|
171 | + * @deprecated use emit() instead |
|
172 | + */ |
|
173 | + public function trigger($event, $target = null, $argv = []) |
|
174 | 174 | { |
175 | 175 | return $this->emit($event, $target, $argv); |
176 | 176 | } |
@@ -47,7 +47,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -31,9 +31,9 @@ |
||
31 | 31 | public function discove() |
32 | 32 | { |
33 | 33 | $files = array_merge( |
34 | - $this->locator->listFiles('Events/'), // @deprecated just use for compatibility |
|
35 | - $this->locator->listFiles('Listeners/') |
|
36 | - ); |
|
34 | + $this->locator->listFiles('Events/'), // @deprecated just use for compatibility |
|
35 | + $this->locator->listFiles('Listeners/') |
|
36 | + ); |
|
37 | 37 | |
38 | 38 | foreach ($files as $file) { |
39 | 39 | $className = $this->locator->getClassname($file); |