@@ -19,13 +19,13 @@ discard block |
||
| 19 | 19 | * @param $credentials |
| 20 | 20 | * @param $auth |
| 21 | 21 | */ |
| 22 | - public function __construct($credentials,$auth) |
|
| 22 | + public function __construct($credentials, $auth) |
|
| 23 | 23 | {
|
| 24 | 24 | parent::__construct($auth); |
| 25 | 25 | |
| 26 | 26 | // where the control mechanism of the credentials |
| 27 | 27 | // values received from the user-defined yada config setting is made. |
| 28 | - $this->credentials = new AuthLoginCredentialsManager($this->getCredentials($credentials),$this); |
|
| 28 | + $this->credentials = new AuthLoginCredentialsManager($this->getCredentials($credentials), $this); |
|
| 29 | 29 | |
| 30 | 30 | //query login |
| 31 | 31 | $this->loginProcess(); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | // if the user is not going to use the config setting, |
| 42 | 42 | // then in this case it can attempt to login by sending parameters |
| 43 | 43 | // as an array to the login method. |
| 44 | - if(is_array($credentials) && count($credentials)){
|
|
| 44 | + if (is_array($credentials) && count($credentials)) {
|
|
| 45 | 45 | |
| 46 | 46 | $this->using = true; |
| 47 | 47 | return $credentials; |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | class AuthenticateProvider extends ConfigProvider implements AuthenticateContract |
| 11 | 11 | {
|
| 12 | 12 | //get auth response,auth exception,auth token and auth basic |
| 13 | - use AuthenticateResponse,AuthenticateException,AuthenticateToken,AuthenticateBasic; |
|
| 13 | + use AuthenticateResponse, AuthenticateException, AuthenticateToken, AuthenticateBasic; |
|
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * @var string |
@@ -26,8 +26,8 @@ discard block |
||
| 26 | 26 | {
|
| 27 | 27 | // we obtain the data value obtained via |
| 28 | 28 | // authenticate availability with the help of callback object. |
| 29 | - return $this->checkParamsViaAvailability(function(){
|
|
| 30 | - return (new AuthUserManager($this->currentDeviceToken(),$this))->allDeviceTokens(); |
|
| 29 | + return $this->checkParamsViaAvailability(function() {
|
|
| 30 | + return (new AuthUserManager($this->currentDeviceToken(), $this))->allDeviceTokens(); |
|
| 31 | 31 | }); |
| 32 | 32 | } |
| 33 | 33 | |
@@ -40,11 +40,11 @@ discard block |
||
| 40 | 40 | {
|
| 41 | 41 | // header to determine whether |
| 42 | 42 | // the token value is present and return a callback. |
| 43 | - return $this->checkTokenViaHeaders(function($token){
|
|
| 43 | + return $this->checkTokenViaHeaders(function($token) {
|
|
| 44 | 44 | |
| 45 | 45 | // we send the user-supplied token value |
| 46 | 46 | // to the authCheckManager object. |
| 47 | - new AuthCheckManager($this,$token); |
|
| 47 | + new AuthCheckManager($this, $token); |
|
| 48 | 48 | |
| 49 | 49 | // as a result we send output according to |
| 50 | 50 | // the boolean value from the checkResult method. |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | {
|
| 62 | 62 | // we obtain the data value obtained via |
| 63 | 63 | // authenticate availability with the help of callback object. |
| 64 | - return $this->checkParamsViaAvailability('data',function($data){
|
|
| 64 | + return $this->checkParamsViaAvailability('data', function($data) {
|
|
| 65 | 65 | return $data; |
| 66 | 66 | }); |
| 67 | 67 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * @param bool $objectReturn |
| 90 | 90 | * @return $this|mixed |
| 91 | 91 | */ |
| 92 | - public function login($credentials=null,$objectReturn=false) |
|
| 92 | + public function login($credentials = null, $objectReturn = false) |
|
| 93 | 93 | {
|
| 94 | 94 | // we will determine whether |
| 95 | 95 | // the http path is correct for this method. |
@@ -97,11 +97,11 @@ discard block |
||
| 97 | 97 | |
| 98 | 98 | // we invoke the login manager and the properties |
| 99 | 99 | // that this class creates will inform us about user input. |
| 100 | - $loginManager = new AuthLoginManager($credentials,$this); |
|
| 100 | + $loginManager = new AuthLoginManager($credentials, $this); |
|
| 101 | 101 | |
| 102 | 102 | // if you want to see the entire login manager object directly, |
| 103 | 103 | // send true to the objectReturn parameter. |
| 104 | - if($objectReturn) return $loginManager; |
|
| 104 | + if ($objectReturn) return $loginManager; |
|
| 105 | 105 | |
| 106 | 106 | // the login value stored in the params property of the login manager object will return a builder object. |
| 107 | 107 | // we will return the value of the login state as a boolean using the count method of this builder object. |
@@ -122,11 +122,11 @@ discard block |
||
| 122 | 122 | |
| 123 | 123 | // header to determine whether |
| 124 | 124 | // the token value is present and return a callback. |
| 125 | - return $this->checkTokenViaHeaders(function($token){
|
|
| 125 | + return $this->checkTokenViaHeaders(function($token) {
|
|
| 126 | 126 | |
| 127 | 127 | // we send the user-supplied token value |
| 128 | 128 | // to the authCheckManager object. |
| 129 | - new AuthLogoutManager($this,$token); |
|
| 129 | + new AuthLogoutManager($this, $token); |
|
| 130 | 130 | |
| 131 | 131 | // as a result we send output according to |
| 132 | 132 | // the boolean value from the checkResult method. |
@@ -143,8 +143,8 @@ discard block |
||
| 143 | 143 | {
|
| 144 | 144 | // we obtain the user value obtained via |
| 145 | 145 | // authenticate availability with the help of callback object. |
| 146 | - return $this->checkParamsViaAvailability(function(){
|
|
| 147 | - return (new AuthUserManager($this->currentDeviceToken(),$this))->userProcess(); |
|
| 146 | + return $this->checkParamsViaAvailability(function() {
|
|
| 147 | + return (new AuthUserManager($this->currentDeviceToken(), $this))->userProcess(); |
|
| 148 | 148 | }); |
| 149 | 149 | } |
| 150 | 150 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | {
|
| 32 | 32 | $this->config(); |
| 33 | 33 | |
| 34 | - if($this->guard=="default"){
|
|
| 34 | + if ($this->guard=="default") {
|
|
| 35 | 35 | $this->setAuthenticateNeeds(); |
| 36 | 36 | } |
| 37 | 37 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function getAddToWhere() |
| 59 | 59 | {
|
| 60 | - if(isset($this->config['guard'][$this->guard]['addToWhere'])){
|
|
| 60 | + if (isset($this->config['guard'][$this->guard]['addToWhere'])) {
|
|
| 61 | 61 | return $this->config['guard'][$this->guard]['addToWhere']; |
| 62 | 62 | } |
| 63 | 63 | return null; |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public function getConfigToken() |
| 72 | 72 | {
|
| 73 | - if(isset($this->config['guard'][$this->guard]['token'])){
|
|
| 73 | + if (isset($this->config['guard'][$this->guard]['token'])) {
|
|
| 74 | 74 | return $this->config['guard'][$this->guard]['token']; |
| 75 | 75 | } |
| 76 | 76 | return null; |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | */ |
| 165 | 165 | public function provider($key) |
| 166 | 166 | {
|
| 167 | - if(app()->has('authenticate.'.$key) && is_callable($provider = app()->get('authenticate.'.$key))){
|
|
| 167 | + if (app()->has('authenticate.'.$key) && is_callable($provider = app()->get('authenticate.'.$key))) {
|
|
| 168 | 168 | return $provider; |
| 169 | 169 | } |
| 170 | 170 | |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | {
|
| 204 | 204 | $table = $this->config['guard'][$this->guard]['table']; |
| 205 | 205 | |
| 206 | - app()->register('authenticateTable',$table);
|
|
| 206 | + app()->register('authenticateTable', $table);
|
|
| 207 | 207 | } |
| 208 | 208 | |
| 209 | 209 | } |
| 210 | 210 | \ No newline at end of file |