Test Setup Failed
Push — master ( 3a46ef...5bee96 )
by Php Easy Api
03:40
created
src/resta/Database/Migration/Src/SchemaFacade.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
      * SchemaFacade constructor.
29 29
      * @param array $config
30 30
      */
31
-    public function __construct($config=array())
31
+    public function __construct($config = array())
32 32
     {
33
-        if(count($config)){
33
+        if (count($config)) {
34 34
             $this->schema = new Schema($config);
35 35
         }
36 36
     }
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      * @param array $params
42 42
      * @return SchemaFacade
43 43
      */
44
-    public static function setConfig($params=array())
44
+    public static function setConfig($params = array())
45 45
     {
46 46
         self::$config = $params;
47 47
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      * @param array $tables
55 55
      * @return SchemaFacade
56 56
      */
57
-    public static function tables($tables=array())
57
+    public static function tables($tables = array())
58 58
     {
59 59
         self::$tables = $tables;
60 60
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     public static function getInstance()
70 70
     {
71
-        if(is_null(self::$instance)){
71
+        if (is_null(self::$instance)) {
72 72
             self::$instance = new self(self::$config);
73 73
         }
74 74
 
Please login to merge, or discard this patch.
src/resta/Database/Migration/Src/Resource/BaseManager.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      */
61 61
     protected function getClassName($file)
62 62
     {
63
-        $className = str_replace(".php","",BaseRequestProcess::getFileName($file));
63
+        $className = str_replace(".php", "", BaseRequestProcess::getFileName($file));
64 64
 
65 65
         return $className;
66 66
     }
@@ -100,11 +100,11 @@  discard block
 block discarded – undo
100 100
      * @param null|string $data
101 101
      * @return mixed
102 102
      */
103
-    public function queryBuilder($table=null,$data=null)
103
+    public function queryBuilder($table = null, $data = null)
104 104
     {
105 105
         $queryBuilder = $this->queryBuilder;
106 106
 
107
-        return new $queryBuilder($this->schema,$table,$data);
107
+        return new $queryBuilder($this->schema, $table, $data);
108 108
     }
109 109
 
110 110
     /**
@@ -120,10 +120,10 @@  discard block
 block discarded – undo
120 120
 
121 121
         foreach ($this->getAllFiles() as $table=>$allFile) {
122 122
 
123
-            if(count($tables)){
123
+            if (count($tables)) {
124 124
 
125
-                if(in_array($table,$tables)){
126
-                    $list[$table]=$allFile;
125
+                if (in_array($table, $tables)) {
126
+                    $list[$table] = $allFile;
127 127
                 }
128 128
             }
129 129
         }
@@ -136,15 +136,15 @@  discard block
 block discarded – undo
136 136
      * @param array $params
137 137
      * @return mixed
138 138
      */
139
-    public function getContentFile($path,$params=array())
139
+    public function getContentFile($path, $params = array())
140 140
     {
141 141
         $dt = fopen($path, "r");
142 142
         $content = fread($dt, filesize($path));
143 143
         fclose($dt);
144 144
 
145
-        foreach ($params as $key=>$value){
145
+        foreach ($params as $key=>$value) {
146 146
 
147
-            $content=str_replace("__".$key."__",$value,$content);
147
+            $content = str_replace("__".$key."__", $value, $content);
148 148
         }
149 149
 
150 150
         return $content;
Please login to merge, or discard this patch.
src/resta/Database/Migration/Src/Resource/PushManager/Pushing.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,18 +22,18 @@
 block discarded – undo
22 22
      */
23 23
     public function handle()
24 24
     {
25
-        foreach ($this->tableFilters() as $table=>$files){
25
+        foreach ($this->tableFilters() as $table=>$files) {
26 26
 
27 27
             $table = strtolower($table);
28 28
 
29 29
             foreach ($files as $file) {
30 30
 
31
-                $getClassName = preg_replace('@(\d+)_@is','',$file);
31
+                $getClassName = preg_replace('@(\d+)_@is', '', $file);
32 32
                 $className = $this->getClassName($getClassName);
33 33
 
34 34
                 require_once ($file);
35 35
 
36
-                $capsule = new SchemaCapsule($this->config,$file,$table);
36
+                $capsule = new SchemaCapsule($this->config, $file, $table);
37 37
 
38 38
                 $this->list[$table][] = (new $className)->up($capsule);
39 39
             }
Please login to merge, or discard this patch.
src/resta/Database/Migration/Src/Connector/Mysql.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,14 +29,14 @@
 block discarded – undo
29 29
     {
30 30
         $this->config = $config;
31 31
 
32
-        if(is_null(self::$instance)){
32
+        if (is_null(self::$instance)) {
33 33
 
34 34
             //get pdo dsn
35
-            $dsn=''.$config['driver'].':host='.$config['host'].';dbname='.$config['database'].'';
35
+            $dsn = ''.$config['driver'].':host='.$config['host'].';dbname='.$config['database'].'';
36 36
             $this->connection = new \PDO($dsn, $config['user'], $config['password']);
37 37
             $this->connection->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
38 38
 
39
-            self::$instance=true;
39
+            self::$instance = true;
40 40
         }
41 41
     }
42 42
 
Please login to merge, or discard this patch.
src/resta/Authenticate/Resource/AuthLoginCredentialsManager.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      * @param $credentials
32 32
      * @param null|AuthLoginManager $manager
33 33
      */
34
-    public function __construct($credentials,$manager)
34
+    public function __construct($credentials, $manager)
35 35
     {
36 36
         //get credentials as default
37 37
         $this->credentials = $credentials;
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         //get credential hash
43 43
         $this->setCredentialHash();
44 44
 
45
-        if($this->manager->getUsing()===false){
45
+        if ($this->manager->getUsing()===false) {
46 46
 
47 47
             // the request object will help you process
48 48
             // the credentials and get them correctly.
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     {
95 95
         $request = $this->manager->getAuth()->getRequest();
96 96
 
97
-        if($request=='Default'){
97
+        if ($request=='Default') {
98 98
             return new AuthenticateRequest($this);
99 99
         }
100 100
 
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
     private function setCredentialHash()
123 123
     {
124 124
         //set credential hash
125
-        if(count($this->credentials)){
126
-            $this->credentialHash = md5(sha1(implode("|",$this->credentials)));
125
+        if (count($this->credentials)) {
126
+            $this->credentialHash = md5(sha1(implode("|", $this->credentials)));
127 127
         }
128 128
     }
129 129
 }
130 130
\ No newline at end of file
Please login to merge, or discard this patch.
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.