@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | { |
| 113 | 113 | $this->user = $request->user(); |
| 114 | 114 | $access = $this->config->get('user') |
| 115 | - ->get('access', null); |
|
| 115 | + ->get('access', null); |
|
| 116 | 116 | |
| 117 | 117 | if (! is_null($access) && ! $this->parseUserValue($access)) { |
| 118 | 118 | abort(403); //Forbidden |
@@ -125,9 +125,9 @@ discard block |
||
| 125 | 125 | $query = $this->sso->getSignInString( |
| 126 | 126 | $this->sso->getNonce($payload), |
| 127 | 127 | $this->parseUserValue($this->config->get('user') |
| 128 | - ->get('external_id')), |
|
| 128 | + ->get('external_id')), |
|
| 129 | 129 | $this->parseUserValue($this->config->get('user') |
| 130 | - ->get('email')), |
|
| 130 | + ->get('email')), |
|
| 131 | 131 | $this->buildExtraParameters() |
| 132 | 132 | ); |
| 133 | 133 | |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | */ |
| 82 | 82 | public function castBooleansToString($property) |
| 83 | 83 | { |
| 84 | - if (! is_bool($property)) { |
|
| 84 | + if (!is_bool($property)) { |
|
| 85 | 85 | return $property; |
| 86 | 86 | } |
| 87 | 87 | |
@@ -114,11 +114,11 @@ discard block |
||
| 114 | 114 | $access = $this->config->get('user') |
| 115 | 115 | ->get('access', null); |
| 116 | 116 | |
| 117 | - if (! is_null($access) && ! $this->parseUserValue($access)) { |
|
| 117 | + if (!is_null($access) && !$this->parseUserValue($access)) { |
|
| 118 | 118 | abort(403); //Forbidden |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | - if (! ($this->sso->validatePayload($payload = $request->get('sso'), $request->get('sig')))) { |
|
| 121 | + if (!($this->sso->validatePayload($payload = $request->get('sso'), $request->get('sig')))) { |
|
| 122 | 122 | abort(403); //Forbidden |
| 123 | 123 | } |
| 124 | 124 | |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | */ |
| 156 | 156 | public function parseUserValue($property) |
| 157 | 157 | { |
| 158 | - if (! is_string($property)) { |
|
| 158 | + if (!is_string($property)) { |
|
| 159 | 159 | return $property; |
| 160 | 160 | } |
| 161 | 161 | |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | { |
| 22 | 22 | $this->app['router']->group( |
| 23 | 23 | ['middleware' => $this->app['config']->get('services.discourse.middleware', ['web', 'auth'])], |
| 24 | - function (Router $router) { |
|
| 24 | + function(Router $router) { |
|
| 25 | 25 | $router->get( |
| 26 | 26 | $this->app['config']->get('services.discourse.route'), |
| 27 | 27 | [ |
@@ -73,8 +73,7 @@ |
||
| 73 | 73 | try { |
| 74 | 74 | // Get Discourse user to match this one, and send a Logout request to Discourse and get the response |
| 75 | 75 | $response = $this->client->get("users/by-external/{$event->user->id}.json", $configs); |
| 76 | - } |
|
| 77 | - catch (BadResponseException $e) { |
|
| 76 | + } catch (BadResponseException $e) { |
|
| 78 | 77 | $response = $e->getResponse(); |
| 79 | 78 | } |
| 80 | 79 | |