Test Setup Failed
Push — master ( 7e4f66...c742e7 )
by Php Easy Api
03:35
created
src/resta/Authenticate/Resource/ResourceManager.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     {
26 26
         // if the auth value does not carry
27 27
         // the authenticateProvider instance value, an exception is thrown.
28
-        if(!$auth instanceof AuthenticateProvider){
28
+        if (!$auth instanceof AuthenticateProvider) {
29 29
             exception()->runtime('AuthenticateProvider instance is not valid');
30 30
         }
31 31
 
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         // the imported builder object.
41 41
         $this->driverBuilderInstance = new $driverBuilder($auth);
42 42
 
43
-        if(!$this->driverBuilderInstance instanceof BuilderContract){
43
+        if (!$this->driverBuilderInstance instanceof BuilderContract) {
44 44
             exception()->runtime($driverBuilder.' is not instance of '.BuilderContract::class);
45 45
         }
46 46
     }
Please login to merge, or discard this patch.
src/resta/Authenticate/Driver/BuilderParamGenerator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
      */
13 13
     protected function paramValues(...$params)
14 14
     {
15
-        [$type,$query] = $params;
15
+        [$type, $query] = $params;
16 16
 
17 17
         // with query we bind the returned values to the params property of the auth object.
18 18
         // and so the auth object will make a final return with these values.
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
         // if status is true,
24 24
         // we add values ​​for some user benefits to params global access.
25
-        if($this->auth->params['status']){
25
+        if ($this->auth->params['status']) {
26 26
 
27 27
             $this->auth->params['auth']        = $query->get();
28 28
             $this->auth->params['data']        = $query->first();
Please login to merge, or discard this patch.
src/resta/Authenticate/Resource/AuthLoginManager.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,16 +19,16 @@  discard block
 block discarded – undo
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
-        if($this->auth->getModel()=="Default"){
31
+        if ($this->auth->getModel()=="Default") {
32 32
             $this->loginProcess();
33 33
         }
34 34
     }
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         // if the user is not going to use the config setting,
44 44
         // then in this case it can attempt to login by sending parameters
45 45
         // as an array to the login method.
46
-        if(is_array($credentials) && count($credentials)){
46
+        if (is_array($credentials) && count($credentials)) {
47 47
 
48 48
             $this->using = true;
49 49
             return $credentials;
Please login to merge, or discard this patch.
src/resta/Authenticate/AuthenticateRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         $this->credentials = $credentials;
45 45
 
46 46
         //credentials loop for expected property
47
-        foreach ($this->credentials->get() as $credential){
47
+        foreach ($this->credentials->get() as $credential) {
48 48
             $this->expected[] = $credential;
49 49
         }
50 50
 
Please login to merge, or discard this patch.
src/resta/Authenticate/AuthenticateResponse.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     {
25 25
         // if the status value is true,
26 26
         // we send output generated from the token value.
27
-        if($this->checkStatus()){
27
+        if ($this->checkStatus()) {
28 28
             return true;
29 29
         }
30 30
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     {
40 40
         // if the status value is true,
41 41
         // we send output generated from the token value.
42
-        if($this->checkStatus()){
42
+        if ($this->checkStatus()) {
43 43
             return true;
44 44
         }
45 45
 
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
      */
53 53
     protected function getResult()
54 54
     {
55
-        $result= [];
55
+        $result = [];
56 56
 
57 57
         // if the status value is true,
58 58
         // we send output generated from the token value.
59
-        if($this->checkStatus()){
59
+        if ($this->checkStatus()) {
60 60
             $result['message']                  = 'token success';
61 61
             $result['token']                    = $this->params['token'];
62 62
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         }
45 45
 
46 46
         //logout exception
47
-       $this->{$this->params['exception']}();
47
+        $this->{$this->params['exception']}();
48 48
     }
49 49
 
50 50
     /**
Please login to merge, or discard this patch.
src/resta/Authenticate/Driver/Eloquent/DeviceToken.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,5 +13,5 @@
 block discarded – undo
13 13
     /**
14 14
      * @var array 
15 15
      */
16
-    protected $fillable = ['user_id','token','token_integer','device_agent','device_agent_integer','expire'];
16
+    protected $fillable = ['user_id', 'token', 'token_integer', 'device_agent', 'device_agent_integer', 'expire'];
17 17
 }
Please login to merge, or discard this patch.
src/resta/Authenticate/Resource/AuthCheckManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
src/resta/Authenticate/Resource/AuthUserManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
      * @param $deviceTokenId
12 12
      * @param AuthenticateProvider $auth
13 13
      */
14
-    public function __construct($deviceTokenId,$auth)
14
+    public function __construct($deviceTokenId, $auth)
15 15
     {
16 16
         parent::__construct($auth);
17 17
         
Please login to merge, or discard this patch.
src/resta/Authenticate/AuthenticateBasic.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -9,21 +9,21 @@  discard block
 block discarded – undo
9 9
      * @param callable|null $callback
10 10
      * @return mixed|null
11 11
      */
12
-    protected function checkParamsViaAvailability($data,callable $callback=null)
12
+    protected function checkParamsViaAvailability($data, callable $callback = null)
13 13
     {
14
-        if(is_callable($data) && is_null($callback)){
14
+        if (is_callable($data) && is_null($callback)) {
15 15
             
16 16
             // if an authenticate is provided via the existing check method,
17 17
             // then we return the value of the data that we are checking for with callback help.
18
-            if($this->check()){
18
+            if ($this->check()) {
19 19
                 return call_user_func($data);
20 20
             } 
21 21
         }
22 22
         
23 23
         // if an authenticate is provided via the existing check method,
24 24
         // then we return the value of the data that we are checking for with callback help.
25
-        if($this->check() && isset($this->params[$data])){
26
-            return call_user_func_array($callback,[$this->params[$data]]);
25
+        if ($this->check() && isset($this->params[$data])) {
26
+            return call_user_func_array($callback, [$this->params[$data]]);
27 27
         }
28 28
 
29 29
         return null;
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
         // we will determine whether
40 40
         // the http path is correct for this method.
41
-        if(isset($getHttp[$type]) and $getHttp[$type]!==httpMethod()){
41
+        if (isset($getHttp[$type]) and $getHttp[$type]!==httpMethod()) {
42 42
             $this->getExceptionForHttp($getHttp[$type]);
43 43
         }
44 44
     }
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
     {
51 51
         // if there is a token in the headers,
52 52
         // we return the callback.
53
-        if(!is_null($this->getTokenSentByUser())){
54
-            return call_user_func_array($callback,[$this->getTokenSentByUser()]);
53
+        if (!is_null($this->getTokenSentByUser())) {
54
+            return call_user_func_array($callback, [$this->getTokenSentByUser()]);
55 55
         }
56 56
 
57 57
         //token false
Please login to merge, or discard this patch.