@@ -14,7 +14,7 @@ |
||
| 14 | 14 | * @param $auth |
| 15 | 15 | * @param $token |
| 16 | 16 | */ |
| 17 | - public function __construct($auth,$token) |
|
| 17 | + public function __construct($auth, $token) |
|
| 18 | 18 | {
|
| 19 | 19 | parent::__construct($auth); |
| 20 | 20 | |
@@ -7,12 +7,12 @@ discard block |
||
| 7 | 7 | /** |
| 8 | 8 | * @param callable $callback |
| 9 | 9 | */ |
| 10 | - protected function checkParamsViaAvailability($data,callable $callback) |
|
| 10 | + protected function checkParamsViaAvailability($data, callable $callback) |
|
| 11 | 11 | {
|
| 12 | 12 | // if an authenticate is provided via the existing check method, |
| 13 | 13 | // then we return the value of the data that we are checking for with callback help. |
| 14 | - if($this->check() && isset($this->params[$data])){
|
|
| 15 | - return call_user_func_array($callback,[$this->params[$data]]); |
|
| 14 | + if ($this->check() && isset($this->params[$data])) {
|
|
| 15 | + return call_user_func_array($callback, [$this->params[$data]]); |
|
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | return null; |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | // we will determine whether |
| 29 | 29 | // the http path is correct for this method. |
| 30 | - if(isset($getHttp[$type]) and $getHttp[$type]!==httpMethod()){
|
|
| 30 | + if (isset($getHttp[$type]) and $getHttp[$type]!==httpMethod()) {
|
|
| 31 | 31 | $this->getExceptionForHttp($getHttp[$type]); |
| 32 | 32 | } |
| 33 | 33 | } |
@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | {
|
| 40 | 40 | // if there is a token in the headers, |
| 41 | 41 | // we return the callback. |
| 42 | - if(!is_null($this->getTokenSentByUser())){
|
|
| 43 | - return call_user_func_array($callback,[$this->getTokenSentByUser()]); |
|
| 42 | + if (!is_null($this->getTokenSentByUser())) {
|
|
| 43 | + return call_user_func_array($callback, [$this->getTokenSentByUser()]); |
|
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | //token false |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | // with query we bind the returned values to the params property of the auth object. |
| 43 | 43 | // and so the auth object will make a final return with these values. |
| 44 | - $this->paramValues('check',$query);
|
|
| 44 | + $this->paramValues('check', $query);
|
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | |
| 59 | 59 | // with query we bind the returned values to the params property of the auth object. |
| 60 | 60 | // and so the auth object will make a final return with these values. |
| 61 | - $this->paramValues('login',$query);
|
|
| 61 | + $this->paramValues('login', $query);
|
|
| 62 | 62 | |
| 63 | 63 | // we assign the credential hash value |
| 64 | 64 | // to the global of the authenticate object. |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | // we update the token value. |
| 69 | 69 | $this->updateToken(); |
| 70 | 70 | |
| 71 | - if(isset($this->auth->params['authToken'])){
|
|
| 71 | + if (isset($this->auth->params['authToken'])) {
|
|
| 72 | 72 | $this->saveDeviceToken(); |
| 73 | 73 | } |
| 74 | 74 | } |
@@ -86,10 +86,10 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | // with query we bind the returned values to the params property of the auth object. |
| 88 | 88 | // and so the auth object will make a final return with these values. |
| 89 | - $this->paramValues('logout',$query);
|
|
| 89 | + $this->paramValues('logout', $query);
|
|
| 90 | 90 | |
| 91 | 91 | //token updating as null |
| 92 | - if(isset($this->auth->params['authToken'])){
|
|
| 92 | + if (isset($this->auth->params['authToken'])) {
|
|
| 93 | 93 | $this->deleteDeviceToken(); |
| 94 | 94 | } |
| 95 | 95 | } |