@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | return; |
161 | 161 | } |
162 | 162 | |
163 | - array_walk($this->serviceProviders, function ($p) { |
|
163 | + array_walk($this->serviceProviders, function($p) { |
|
164 | 164 | $this->bootProvider($p); |
165 | 165 | }); |
166 | 166 | |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | { |
248 | 248 | $name = is_string($provider) ? $provider : get_class($provider); |
249 | 249 | |
250 | - return array_first($this->serviceProviders, function ($key, $value) use ($name) { |
|
250 | + return array_first($this->serviceProviders, function($key, $value) use ($name) { |
|
251 | 251 | return $value instanceof $name; |
252 | 252 | }); |
253 | 253 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | */ |
29 | 29 | protected function registerGuzzle() |
30 | 30 | { |
31 | - $this->app->singleton('http', function ($app) { |
|
31 | + $this->app->singleton('http', function($app) { |
|
32 | 32 | $client = new Client(['base_url' => "https://{$app['school']}.magister.net/api/"]); |
33 | 33 | |
34 | 34 | $client->setDefaultOption('exceptions', false); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | public function check() |
67 | 67 | { |
68 | - return !is_null($this->user()); |
|
68 | + return ! is_null($this->user()); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | public function guest() |
77 | 77 | { |
78 | - return !$this->check(); |
|
78 | + return ! $this->check(); |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | // If we have already retrieved the user for the current request we can just |
93 | 93 | // return it back immediately. We do not want to pull the user data every |
94 | 94 | // request into the method because that would tremendously slow an app. |
95 | - if (!is_null($this->user)) { |
|
95 | + if ( ! is_null($this->user)) { |
|
96 | 96 | return $this->user; |
97 | 97 | } |
98 | 98 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | $user = null; |
102 | 102 | |
103 | - if (!is_null($id)) { |
|
103 | + if ( ! is_null($id)) { |
|
104 | 104 | $user = $this->provider->retrieveByToken(); |
105 | 105 | } |
106 | 106 | |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | */ |
160 | 160 | protected function hasValidCredentials($user) |
161 | 161 | { |
162 | - return !is_null($user); |
|
162 | + return ! is_null($user); |
|
163 | 163 | } |
164 | 164 | |
165 | 165 | /** |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | */ |
315 | 315 | public function getCookieJar() |
316 | 316 | { |
317 | - if (!isset($this->cookie)) { |
|
317 | + if ( ! isset($this->cookie)) { |
|
318 | 318 | throw new \RuntimeException('Cookie jar has not been set.'); |
319 | 319 | } |
320 | 320 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | protected function registerAuthenticator() |
28 | 28 | { |
29 | - $this->app->singleton('auth', function ($app) { |
|
29 | + $this->app->singleton('auth', function($app) { |
|
30 | 30 | return new AuthManager($app); |
31 | 31 | }); |
32 | 32 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | if ($this->app->bound('credentials')) { |
42 | 42 | $auth = $this->app->auth; |
43 | 43 | |
44 | - if (!$auth->check()) { |
|
44 | + if ( ! $auth->check()) { |
|
45 | 45 | $auth->attempt($this->app['credentials']); |
46 | 46 | } |
47 | 47 | } |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public function register() |
18 | 18 | { |
19 | - $this->app->singleton('encrypter', function ($app) { |
|
19 | + $this->app->singleton('encrypter', function($app) { |
|
20 | 20 | return new Encrypter($app['config']['app.key']); |
21 | 21 | }); |
22 | 22 | } |
@@ -125,11 +125,11 @@ discard block |
||
125 | 125 | { |
126 | 126 | $payload = json_decode(base64_decode($payload), true); |
127 | 127 | |
128 | - if (!$payload || $this->invalidPayload($payload)) { |
|
128 | + if ( ! $payload || $this->invalidPayload($payload)) { |
|
129 | 129 | throw new DecryptException('Invalid data.'); |
130 | 130 | } |
131 | 131 | |
132 | - if (!$this->validMac($payload)) { |
|
132 | + if ( ! $this->validMac($payload)) { |
|
133 | 133 | throw new DecryptException('MAC is invalid.'); |
134 | 134 | } |
135 | 135 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | */ |
214 | 214 | protected function invalidPayload($data) |
215 | 215 | { |
216 | - return !is_array($data) || !isset($data['iv']) || !isset($data['value']) || !isset($data['mac']); |
|
216 | + return ! is_array($data) || ! isset($data['iv']) || ! isset($data['value']) || ! isset($data['mac']); |
|
217 | 217 | } |
218 | 218 | |
219 | 219 | /** |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | { |
80 | 80 | $responses = []; |
81 | 81 | |
82 | - if (!is_array($payload)) { |
|
82 | + if ( ! is_array($payload)) { |
|
83 | 83 | $payload = [$payload]; |
84 | 84 | } |
85 | 85 | |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | foreach ($this->getListeners($event) as $listener) { |
89 | 89 | $response = call_user_func_array($listener, $payload); |
90 | 90 | |
91 | - if (!is_null($response) && $halt) { |
|
91 | + if ( ! is_null($response) && $halt) { |
|
92 | 92 | return $response; |
93 | 93 | } |
94 | 94 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | */ |
112 | 112 | public function getListeners($eventName) |
113 | 113 | { |
114 | - if (!isset($this->sorted[$eventName])) { |
|
114 | + if ( ! isset($this->sorted[$eventName])) { |
|
115 | 115 | $this->sortListeners($eventName); |
116 | 116 | } |
117 | 117 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | { |
164 | 164 | $container = $this->container; |
165 | 165 | |
166 | - return function () use ($listener, $container) { |
|
166 | + return function() use ($listener, $container) { |
|
167 | 167 | $segments = explode('@', $listener); |
168 | 168 | |
169 | 169 | $method = count($segments) == 2 ? $segments[1] : 'handle'; |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public function register() |
18 | 18 | { |
19 | - $this->app->singleton('events', function ($app) { |
|
19 | + $this->app->singleton('events', function($app) { |
|
20 | 20 | return new Dispatcher($app); |
21 | 21 | }); |
22 | 22 | } |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public function register() |
16 | 16 | { |
17 | - $this->app->bind('translator', function ($app) { |
|
17 | + $this->app->bind('translator', function($app) { |
|
18 | 18 | $dictionary = $app['config']['dictionary']; |
19 | 19 | |
20 | 20 | return new Translator($dictionary); |