Passed
Push — master ( 1955b9...c5754d )
by Darío
06:42
created
public/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 date_default_timezone_set("America/Bogota");
7 7
 
8 8
 // Memory limit
9
-ini_set("memory_limit","256M");
9
+ini_set("memory_limit", "256M");
10 10
 
11 11
 // Run application
12 12
 require_once("vendor/autoload.php");
Please login to merge, or discard this patch.
module/Auth/source/Controller/LogIn.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             $http = new Http();
87 87
             $http->writeStatus($http::HTTP_METHOD_NOT_ALLOWED);
88 88
 
89
-            die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED .' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!');
89
+            die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED . ' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!');
90 90
         }
91 91
 
92 92
         $this->checkSession();
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                 $http = new Http();
117 117
                 $http->writeStatus($http::HTTP_METHOD_NOT_ALLOWED);
118 118
 
119
-                die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED .' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!');
119
+                die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED . ' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!');
120 120
             }
121 121
 
122 122
             # STANDARD VALIDATIONS [check needed arguments]
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
                     $http = new Http();
129 129
                     $http->writeStatus($http::HTTP_BAD_REQUEST);
130 130
 
131
-                    die('Error ' . $http::HTTP_BAD_REQUEST .' (' . $http->getStatusText($http::HTTP_BAD_REQUEST) . ')!!');
131
+                    die('Error ' . $http::HTTP_BAD_REQUEST . ' (' . $http->getStatusText($http::HTTP_BAD_REQUEST) . ')!!');
132 132
                 }
133 133
             });
134 134
 
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
             foreach ($errors as $errno => $error)
269 269
             {
270 270
                 $errorInformation .=
271
-                    "<strong style='color: #a94442'>".
271
+                    "<strong style='color: #a94442'>" .
272 272
                         $method
273 273
                             . "</strong>: <span style='color: #e24f4c'>{$error}</span> \n<br />";
274 274
             }
Please login to merge, or discard this patch.
module/Auth/source/Controller/LogOut.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
             $http = new Http();
21 21
             $http->writeStatus($http::HTTP_METHOD_NOT_ALLOWED);
22 22
 
23
-            die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED .' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!');
23
+            die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED . ' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!');
24 24
         }
25 25
 
26 26
         $config = include 'module/Auth/config/user.config.php';
Please login to merge, or discard this patch.
module/Catcher/source/Controller/Index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         {
82 82
             $new = array();
83 83
 
84
-            foreach($obj as $key => $val)
84
+            foreach ($obj as $key => $val)
85 85
             {
86 86
                 $new[$key] = $this->object_to_array($val);
87 87
             }
Please login to merge, or discard this patch.
config/application.config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
     ],
25 25
     'environment' => [
26 26
         'base_path' => (dirname(dirname($_SERVER['PHP_SELF'])) == "/") ? "" : dirname(dirname($_SERVER['PHP_SELF'])),
27
-        'dev_mode'  => true,                       // set this to FALSE for production environments
27
+        'dev_mode'  => true, // set this to FALSE for production environments
28 28
         'locale' => 'en'
29 29
     ],
30 30
 ];
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
module/Auth/config/user.config.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 {
5 5
 	function ifdef($value, Array $array)
6 6
 	{
7
-		$global = __DIR__  . '/../../../config/global.config.php';
7
+		$global = __DIR__ . '/../../../config/global.config.php';
8 8
 
9 9
 		if (file_exists($global))
10 10
 		{
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 				if (!$key)
29 29
 					return $in;
30 30
 
31
-			} while($key);
31
+			} while ($key);
32 32
 		}
33 33
 		else
34 34
 			return $value;
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
 return [
39 39
 	'project' => [
40
-		'name' => ifdef('PROJECT NAME', ["project", "name"]),			# The name of your project
40
+		'name' => ifdef('PROJECT NAME', ["project", "name"]), # The name of your project
41 41
 	],
42 42
 	'mail' => [
43 43
         /** CHECKING:
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
 		"host" => ifdef('localhost', ["mail", "host"])
52 52
 	],
53 53
 	"authentication" => [
54
-		"method"  => ifdef('_COOKIE', ["authentication", "method"]),		# the method to store credentials (_COOKIE, _SESSION)
55
-		"key"     => ifdef('session_id', ["authentication", "key"]),		# the key in the array to store credentials
54
+		"method"  => ifdef('_COOKIE', ["authentication", "method"]), # the method to store credentials (_COOKIE, _SESSION)
55
+		"key"     => ifdef('session_id', ["authentication", "key"]), # the key in the array to store credentials
56 56
         /** AUTH TYPE:
57 57
          * db_table: get credentials from a table in a database
58 58
          * db_user:  get credentials from database users (database authentication)
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
          * a database and checks the specified credentials. Theses will checked only if the AUTH TYPE is db_table.
64 64
          */
65 65
 		"gateway" => [
66
-			"entity" => "USER",			# Table name (without prefix if exists)
66
+			"entity" => "USER", # Table name (without prefix if exists)
67 67
 	        /** CREDENTIALS:
68 68
 	         * The field names of credentials in the table.
69 69
 	         */
@@ -81,14 +81,14 @@  discard block
 block discarded – undo
81 81
 	         */
82 82
 			"table_info" => [
83 83
 				"columns" => [
84
-					"id_field"    => "USER_ID",				# often the primary key
85
-					"state_field" => "USER_STATE_ID",		# required if mail_checking is enabled
84
+					"id_field"    => "USER_ID", # often the primary key
85
+					"state_field" => "USER_STATE_ID", # required if mail_checking is enabled
86 86
 					"email_field" => "EMAIL"				# required registration process
87 87
 				],
88 88
 				"column_values" => [
89 89
 					"state_field" => [
90
-						"pending_email" => 1,				# required if mail_checking is enabled
91
-						"user_active"   => 2,				# required if mail_checking is enabled
90
+						"pending_email" => 1, # required if mail_checking is enabled
91
+						"user_active"   => 2, # required if mail_checking is enabled
92 92
 					]
93 93
 				]
94 94
 			]
Please login to merge, or discard this patch.
module/Auth/source/Model/UserTbl.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
         $table = $this->getEntity()->getTableName();
17 17
 
18 18
         $config = include 'module/Auth/config/user.config.php';
19
-        $id_field  = $config["authentication"]["gateway"]["table_info"]["columns"]["id_field"];
19
+        $id_field = $config["authentication"]["gateway"]["table_info"]["columns"]["id_field"];
20 20
 
21 21
         $sql = "SELECT CASE WHEN MAX($id_field) IS NULL THEN 1 ELSE MAX($id_field) + 1 END AS USER_ID FROM $table";
22 22
 
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     public function getUserById($id)
38 38
     {
39 39
         $config = include 'module/Auth/config/user.config.php';
40
-        $id_field  = $config["authentication"]["gateway"]["table_info"]["columns"]["id_field"];
40
+        $id_field = $config["authentication"]["gateway"]["table_info"]["columns"]["id_field"];
41 41
 
42 42
         $rowset = $this->select([
43 43
             $id_field => $id
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     public function getUserByUsernameCredential($username)
70 70
     {
71 71
         $config = include 'module/Auth/config/user.config.php';
72
-        $username_credential  = $config["authentication"]["gateway"]["credentials"]["username"];
72
+        $username_credential = $config["authentication"]["gateway"]["credentials"]["username"];
73 73
 
74 74
         $rowset = $this->select([
75 75
             $username_credential => $username
Please login to merge, or discard this patch.
module/Auth/source/Controller/SingUp.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
             $http = new Http();
94 94
             $http->writeStatus($http::HTTP_METHOD_NOT_ALLOWED);
95 95
 
96
-            die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED .' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!');
96
+            die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED . ' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!');
97 97
         }
98 98
 
99 99
         $this->checkSession();
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
         $data = [];
113 113
 
114 114
         # environment settings
115
-        $post = $this->getPost();           # catch $_POST
116
-        $this->setTerminal(true);           # set terminal
115
+        $post = $this->getPost(); # catch $_POST
116
+        $this->setTerminal(true); # set terminal
117 117
 
118 118
         # TRY-CATCH-BLOCK
119 119
         try {
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                 $http = new Http();
125 125
                 $http->writeStatus($http::HTTP_METHOD_NOT_ALLOWED);
126 126
 
127
-                die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED .' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!');
127
+                die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED . ' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!');
128 128
             }
129 129
 
130 130
             # STANDARD VALIDATIONS [check needed arguments]
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                     $http = new Http();
137 137
                     $http->writeStatus($http::HTTP_BAD_REQUEST);
138 138
 
139
-                    die('Error ' . $http::HTTP_BAD_REQUEST .' (' . $http->getStatusText($http::HTTP_BAD_REQUEST) . ')!!');
139
+                    die('Error ' . $http::HTTP_BAD_REQUEST . ' (' . $http->getStatusText($http::HTTP_BAD_REQUEST) . ')!!');
140 140
                 }
141 141
             });
142 142
 
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 
248 248
             $this->getUserAdapter()->insert($user);
249 249
 
250
-            $link = $_SERVER["REQUEST_SCHEME"] .'://'. $_SERVER["HTTP_HOST"] . $this->getBasePath() . "/public/Auth/SingUp/verifyEmail/user/" . $post["username"] . "/token/" . $token;
250
+            $link = $_SERVER["REQUEST_SCHEME"] . '://' . $_SERVER["HTTP_HOST"] . $this->getBasePath() . "/public/Auth/SingUp/verifyEmail/user/" . $post["username"] . "/token/" . $token;
251 251
 
252 252
             if ($data["mail"])
253 253
             {
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
                 $http = new Http();
339 339
                 $http->writeStatus($http::HTTP_METHOD_NOT_ALLOWED);
340 340
 
341
-                die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED .' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!');
341
+                die('Error ' . $http::HTTP_METHOD_NOT_ALLOWED . ' (' . $http->getStatusText($http::HTTP_METHOD_NOT_ALLOWED) . ')!!');
342 342
             }
343 343
 
344 344
             # STANDARD VALIDATIONS [check needed arguments]
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
                     $http = new Http();
351 351
                     $http->writeStatus($http::HTTP_BAD_REQUEST);
352 352
 
353
-                    die('Error ' . $http::HTTP_BAD_REQUEST .' (' . $http->getStatusText($http::HTTP_BAD_REQUEST) . ')!!');
353
+                    die('Error ' . $http::HTTP_BAD_REQUEST . ' (' . $http->getStatusText($http::HTTP_BAD_REQUEST) . ')!!');
354 354
                 }
355 355
             });
356 356
 
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
             foreach ($errors as $errno => $error)
438 438
             {
439 439
                 $errorInformation .=
440
-                    "<strong style='color: #a94442'>".
440
+                    "<strong style='color: #a94442'>" .
441 441
                         $method
442 442
                             . "</strong>: <span style='color: #e24f4c'>{$error}</span> \n<br />";
443 443
             }
Please login to merge, or discard this patch.
module/Catcher/config/user.config.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
 {
5 5
 	function ifdef($value, Array $array)
6 6
 	{
7
-		$global = __DIR__  . '/../../../config/global.config.php';
7
+		$global = __DIR__ . '/../../../config/global.config.php';
8 8
 
9 9
 		if (file_exists($global))
10 10
 		{
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 				if (!$key)
29 29
 					return $in;
30 30
 
31
-			} while($key);
31
+			} while ($key);
32 32
 		}
33 33
 		else
34 34
 			return $value;
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
 return [
39 39
 	'project' => [
40
-		'name' => ifdef('PROJECT NAME', ["project", "name"]),			# The name of your project
40
+		'name' => ifdef('PROJECT NAME', ["project", "name"]), # The name of your project
41 41
 	],
42 42
     'output' => [
43 43
         'cache'
Please login to merge, or discard this patch.