@@ -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); |
@@ -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 | /** |
@@ -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); |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | */ |
| 27 | 27 | protected function registerNativeFilesystem() |
| 28 | 28 | { |
| 29 | - $this->app->singleton('files', function () { |
|
| 29 | + $this->app->singleton('files', function() { |
|
| 30 | 30 | return new Filesystem(); |
| 31 | 31 | }); |
| 32 | 32 | } |
@@ -127,7 +127,7 @@ |
||
| 127 | 127 | $success = true; |
| 128 | 128 | |
| 129 | 129 | foreach ($paths as $path) { |
| 130 | - if (!@unlink($path)) { |
|
| 130 | + if ( ! @unlink($path)) { |
|
| 131 | 131 | $success = false; |
| 132 | 132 | } |
| 133 | 133 | } |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | */ |
| 73 | 73 | public function select($query, $bindings = []) |
| 74 | 74 | { |
| 75 | - return $this->run($query, $bindings, function ($me, $query, $bindings) { |
|
| 75 | + return $this->run($query, $bindings, function($me, $query, $bindings) { |
|
| 76 | 76 | list($query, $bindings) = $me->prepareBindings($query, $bindings); |
| 77 | 77 | |
| 78 | 78 | // For select statements, we'll simply execute the query and return an array |