Passed
Push — 1.0.0-dev ( 29a38b...3f14f3 )
by nguereza
02:39
created
core/classes/database/DatabaseQueryRunner.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
     
31 31
     class DatabaseQueryRunner extends BaseClass {
32 32
 
33
-         /**
34
-         * The DatabaseConnection instance
35
-         * @var object
36
-         */
33
+            /**
34
+             * The DatabaseConnection instance
35
+             * @var object
36
+             */
37 37
         private $connection = null;
38 38
 
39 39
         /**
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                 //by default count() return 1 if the parameter is not an array
187 187
                 //object or object implements Countable.
188 188
                 if (is_array($result) || is_object($result) || $result instanceof Countable) {
189
-                     $numRows = count($result);  
189
+                        $numRows = count($result);  
190 190
                 }
191 191
             } else {
192 192
                 $numRows = $this->pdoStatment->rowCount(); 
Please login to merge, or discard this patch.
core/classes/database/Database.php 1 patch
Indentation   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -387,9 +387,9 @@  discard block
 block discarded – undo
387 387
                 $this->queryCount++;
388 388
                 
389 389
                 $queryResult = $this->queryRunner->setQuery($query)
390
-                                                 ->setReturnType($returnAsList)
391
-                                                 ->setReturnAsArray($returnAsArray)
392
-                                                 ->execute();
390
+                                                    ->setReturnType($returnAsList)
391
+                                                    ->setReturnAsArray($returnAsArray)
392
+                                                    ->execute();
393 393
 
394 394
                 if (is_object($queryResult)) {
395 395
                     $this->result  = $queryResult->getResult();
@@ -405,11 +405,11 @@  discard block
 block discarded – undo
405 405
             return $this->result;
406 406
         }
407 407
 
408
-         /**
409
-         * Set the connection instance using database configuration file
410
-         *
411
-         * @return object|void
412
-         */
408
+            /**
409
+             * Set the connection instance using database configuration file
410
+             *
411
+             * @return object|void
412
+             */
413 413
         protected function setConnectionUsingConfigFile(){
414 414
             $dbConfigFromFile = $this->getDatabaseConfigFromFile();
415 415
             $connection = &class_loader('DatabaseConnection', 'classes/database');
@@ -422,7 +422,6 @@  discard block
 block discarded – undo
422 422
 
423 423
         /**
424 424
          * Get the database configuration using the configuration file
425
-         
426 425
          * @return array the database configuration from file
427 426
          */
428 427
         protected function getDatabaseConfigFromFile() {
Please login to merge, or discard this patch.
core/classes/database/DatabaseConnection.php 1 patch
Indentation   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -42,28 +42,28 @@  discard block
 block discarded – undo
42 42
          */
43 43
         private $driver = null;
44 44
 
45
-         /**
46
-         * The database hostname
47
-         * @var string
48
-         */
45
+            /**
46
+             * The database hostname
47
+             * @var string
48
+             */
49 49
         private $hostname = null;
50 50
 
51
-          /**
52
-         * The database port
53
-         * @var integer
54
-         */
51
+            /**
52
+             * The database port
53
+             * @var integer
54
+             */
55 55
         private $port = null;
56 56
         
57
-         /**
58
-         * The database username
59
-         * @var string
60
-         */
57
+            /**
58
+             * The database username
59
+             * @var string
60
+             */
61 61
         private $username = null;
62 62
 
63
-         /**
64
-         * The database password
65
-         * @var string
66
-         */
63
+            /**
64
+             * The database password
65
+             * @var string
66
+             */
67 67
         private $password = null;
68 68
 
69 69
         /**
@@ -72,10 +72,10 @@  discard block
 block discarded – undo
72 72
          */
73 73
         private $databaseName = null;
74 74
 
75
-         /**
76
-         * The database charset
77
-         * @var string
78
-         */
75
+            /**
76
+             * The database charset
77
+             * @var string
78
+             */
79 79
         private $charset = null;
80 80
 
81 81
         /**
@@ -84,10 +84,10 @@  discard block
 block discarded – undo
84 84
          */
85 85
         private $collation = null;
86 86
 
87
-         /**
88
-         * The database tables prefix
89
-         * @var string
90
-         */
87
+            /**
88
+             * The database tables prefix
89
+             * @var string
90
+             */
91 91
         private $prefix = null;
92 92
 
93 93
         /**
@@ -114,11 +114,11 @@  discard block
 block discarded – undo
114 114
             }
115 115
         }
116 116
 
117
-         /**
118
-         * This is method is used to connect to database
119
-         * 
120
-         * @return boolean true in case of successfully connection false if error
121
-         */
117
+            /**
118
+             * This is method is used to connect to database
119
+             * 
120
+             * @return boolean true in case of successfully connection false if error
121
+             */
122 122
         public function connect() {
123 123
             try {
124 124
                 $this->pdo = new PDO($this->getDsnValue(), $this->getUsername(), $this->getPassword());
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
             $this->populatePropertiesFromConfig();
410 410
 
411 411
             if (!empty($this->config)) {
412
-               //For logging
412
+                //For logging
413 413
                 $configInfo = $this->config;
414 414
                 //Hide password from log
415 415
                 $configInfo['password'] = string_hidden($this->getPassword());
@@ -418,11 +418,11 @@  discard block
 block discarded – undo
418 418
             return $this;
419 419
         }
420 420
 
421
-         /**
422
-         * Update the properties using the current database configuration
423
-         * 
424
-         * @return object the current instance
425
-         */
421
+            /**
422
+             * Update the properties using the current database configuration
423
+             * 
424
+             * @return object the current instance
425
+             */
426 426
         protected function populatePropertiesFromConfig() {
427 427
             foreach ($this->config as $key => $value) {
428 428
                 $setter = 'set' . ucfirst($key);
Please login to merge, or discard this patch.
core/classes/database/DatabaseQueryBuilder.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
     
31 31
     class DatabaseQueryBuilder {
32 32
 
33
-         /**
34
-         * The DatabaseConnection instance
35
-         * @var object
36
-         */
33
+            /**
34
+             * The DatabaseConnection instance
35
+             * @var object
36
+             */
37 37
         private $connection = null;
38 38
 
39 39
         /**
@@ -727,12 +727,12 @@  discard block
 block discarded – undo
727 727
          * 
728 728
          * @return string|null
729 729
          */
730
-         protected function buildQueryPart($property, $command = ''){
730
+            protected function buildQueryPart($property, $command = ''){
731 731
             if (!empty($this->{$property})) {
732 732
                 return $command . $this->{$property};
733 733
             }
734 734
             return null;
735
-         }
735
+            }
736 736
 
737 737
 
738 738
         /**
Please login to merge, or discard this patch.
core/classes/database/DatabaseCache.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@
 block discarded – undo
208 208
             //If is the SELECT query
209 209
             $this->isSelectQuery = stristr($this->query, 'SELECT') !== false;
210 210
 
211
-             //if can use cache feature for this query
211
+                //if can use cache feature for this query
212 212
             $this->dbCacheStatus = get_config('cache_enable', false) && $this->cacheTtl > 0;
213 213
         }
214 214
         
Please login to merge, or discard this patch.