Passed
Push — master ( 42b575...2cff8f )
by Dmytro
02:57
created
framework/db/DBObject.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -414,11 +414,11 @@  discard block
 block discarded – undo
414 414
          */
415 415
         if ($this->isNewRecord()) {
416 416
             if (!empty($this->dbQuery->conditions)) {
417
-                $this->dbQuery->query.= " WHERE ";
417
+                $this->dbQuery->query .= " WHERE ";
418 418
                 $this->dbQuery->sqlPushValues($this->dbQuery->conditions, " AND ");
419 419
             }
420 420
         } else {
421
-            $this->dbQuery->query.= " WHERE ";
421
+            $this->dbQuery->query .= " WHERE ";
422 422
             $this->dbQuery->sqlPushValues([static::ID_FIELD_NAME => $this->id]);
423 423
         }
424 424
 
@@ -427,14 +427,14 @@  discard block
 block discarded – undo
427 427
          */
428 428
         if ($this->isNewRecord()) {
429 429
             if (!empty($this->dbQuery->order)) {
430
-                $this->dbQuery->query.= " ORDER BY";
430
+                $this->dbQuery->query .= " ORDER BY";
431 431
                 if (is_array($this->dbQuery->order)) {
432 432
                     foreach ($this->dbQuery->order as $fieldName => $ord) {
433
-                        $this->dbQuery->query.= " " . $fieldName . " " . $ord . ",";
433
+                        $this->dbQuery->query .= " " . $fieldName . " " . $ord . ",";
434 434
                     }
435 435
                     $this->dbQuery->query = substr($this->dbQuery->query, 0, strlen($this->dbQuery->query) - 1);
436 436
                 } elseif (is_string($this->dbQuery->order)) {
437
-                    $this->dbQuery->query.= " " . $this->dbQuery->order;
437
+                    $this->dbQuery->query .= " " . $this->dbQuery->order;
438 438
                 }
439 439
             }
440 440
         }
@@ -446,13 +446,13 @@  discard block
 block discarded – undo
446 446
         if ($this->isNewRecord()) {
447 447
             if (!is_null($this->dbQuery->limit)) {
448 448
                 if (Tools::isInteger($this->dbQuery->limit)) {
449
-                    $this->dbQuery->query.= " LIMIT " . $this->dbQuery->limit;
449
+                    $this->dbQuery->query .= " LIMIT " . $this->dbQuery->limit;
450 450
                     $count = $this->dbQuery->limit;
451 451
                 } elseif (is_array($this->dbQuery->limit) && count($this->dbQuery->limit) == 2) {
452 452
                     $offset = $this->dbQuery->limit[0];
453 453
                     $count = $this->dbQuery->limit[1];
454 454
                     if (Tools::isInteger($offset) && Tools::isInteger($count)) {
455
-                        $this->dbQuery->query.= " LIMIT " . $offset . ", " . $count;
455
+                        $this->dbQuery->query .= " LIMIT " . $offset . ", " . $count;
456 456
                     } else {
457 457
                         throw new DBCoreException("Invalid LIMIT param in select() method.");
458 458
                     }
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
                 }
462 462
             }
463 463
         } else {
464
-            $this->dbQuery->query.= " LIMIT 1";
464
+            $this->dbQuery->query .= " LIMIT 1";
465 465
             $count = 1;
466 466
         }
467 467
 
Please login to merge, or discard this patch.
framework/db/DBQueryCondition.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                     break;
107 107
                 case ("IN"):
108 108
                 case ("NOT IN"):
109
-                    if (is_array($value) &&  !empty($value)) {
109
+                    if (is_array($value) && !empty($value)) {
110 110
                         $dataList = [];
111 111
                         foreach ($value as $dataItem) {
112 112
                             $dataList[] = DBField::sqlValue($this->field->type, $dataItem);
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                         if ($count > 0) {
117 117
                             $qmStr = "?";
118 118
                             $tStr = $this->field->type;
119
-                            for ($i = 1; $i < $count; $i ++) {
119
+                            for ($i = 1; $i < $count; $i++) {
120 120
                                 $qmStr .= ", ?";
121 121
                                 $tStr .= $this->field->type;
122 122
                             }
Please login to merge, or discard this patch.
framework/helpers/Naming.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
                             break;
150 150
                         }
151 151
                         $array = &$array[$key];
152
-                    } elseif(isset($array[$key])) { // last element
152
+                    } elseif (isset($array[$key])) { // last element
153 153
                         unset($array[$key]);
154 154
                     }
155 155
                 }
Please login to merge, or discard this patch.
framework/mail/Email.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -89,11 +89,11 @@
 block discarded – undo
89 89
      */
90 90
     protected function sendMail($email, $subject, $message, $format = self::FORMAT_TEXT, $replyTo = "") {
91 91
         $headers = "From: " . $this->fromName . " <" . $this->fromEmail . ">\r\n";
92
-        $headers.= "Reply-To: " . $replyTo . "\r\n";
92
+        $headers .= "Reply-To: " . $replyTo . "\r\n";
93 93
 
94 94
         if ($format == self::FORMAT_HTML) {
95
-            $headers.= "MIME-Version: 1.0\r\n";
96
-            $headers.= "Content-type: text/html; charset=utf-8\r\n";
95
+            $headers .= "MIME-Version: 1.0\r\n";
96
+            $headers .= "Content-type: text/html; charset=utf-8\r\n";
97 97
         }
98 98
 
99 99
         /**
Please login to merge, or discard this patch.
framework/mail/POP.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -131,10 +131,10 @@  discard block
 block discarded – undo
131 131
         fputs($this->connection, "TOP $messageNumber 0\r\n");
132 132
         $buffer = "";
133 133
         $headerReceived = 0;
134
-        while( $headerReceived == 0 ) {
135
-            $temp = fgets( $this->connection, 1024 );
134
+        while ($headerReceived == 0) {
135
+            $temp = fgets($this->connection, 1024);
136 136
             $buffer .= $temp;
137
-            if( $temp == ".\r\n" ) {
137
+            if ($temp == ".\r\n") {
138 138
                 $headerReceived = 1;
139 139
             }
140 140
         }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
     public function getMessages() {
187 187
         $messages = [];
188 188
 
189
-        for ($i=1; ; $i++) {
189
+        for ($i = 1; ; $i++) {
190 190
             $message = $this->getMessage($i);
191 191
             if ($message === false) {
192 192
                 break;
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
     public function getBouncedEmails($delete = true, $number = null) {
206 206
         $emails = [];
207 207
 
208
-        for ($i = 1; (is_null($number) ? true : $i <= $number) ; $i++) {
208
+        for ($i = 1; (is_null($number) ? true : $i <= $number); $i++) {
209 209
             $message = $this->getMessage($i);
210 210
             if ($message !== false) {
211 211
                 $markers = [
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
     public function getEmails($delete = true, $number = null) {
266 266
         $emails = [];
267 267
 
268
-        for ($i = 1; (is_null($number) ? true : $i <= $number) ; $i++) {
268
+        for ($i = 1; (is_null($number) ? true : $i <= $number); $i++) {
269 269
             $message = $this->getMessage($i);
270 270
             if ($message !== false) {
271 271
                 $failSignaturePos = 0;
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
         $len = count($avar);
351 351
         $ret = $L2 = $L3 = null;
352 352
         for ($i = 0; $i < $len; $i++) {
353
-            if( isset( $avar[$i] ) && isset( $avar[$i][0] ) && isset( $avar[$i][1] ) && isset( $avar[$i][2] ) ){
353
+            if (isset($avar[$i]) && isset($avar[$i][0]) && isset($avar[$i][1]) && isset($avar[$i][2])) {
354 354
                 $L2 = $avar[$i][0] . $avar[$i][1];
355 355
                 $L3 = $avar[$i][0] . $avar[$i][1] . $avar[$i][2];
356 356
                 if ($L2 != "  " && $L3 != "Rec" && $L2 != "") {
Please login to merge, or discard this patch.
framework/core/Route.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -98,15 +98,15 @@  discard block
 block discarded – undo
98 98
     public function getUrl($action, $id = null, $getParams = array()) {
99 99
         $url = $this->controller . "/";
100 100
         if (!is_null($id)) {
101
-            $url.= $action . "/" . $id;
101
+            $url .= $action . "/" . $id;
102 102
         } else {
103
-            $url.= $action;
103
+            $url .= $action;
104 104
         }
105 105
 
106 106
         if (!empty($getParams)) {
107
-            $url.= "?";
107
+            $url .= "?";
108 108
             foreach ($getParams as $key => $value) {
109
-                $url.= $key . "=" . $value;
109
+                $url .= $key . "=" . $value;
110 110
             }
111 111
         }
112 112
         return $url;
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
     public function tplPath() {
121 121
         $path = $this->controller . "/" . $this->controller;
122 122
         if (!empty($this->action)) {
123
-            $path.= "_" . $this->action;
123
+            $path .= "_" . $this->action;
124 124
         }
125 125
 
126 126
         return $path;
Please login to merge, or discard this patch.
framework/core/Object.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
                     } else {
47 47
                         $fieldValue = $newValue;
48 48
                     }
49
-                    $count ++;
49
+                    $count++;
50 50
                 } elseif (!empty($this->fieldsAliases)) { // look up for the field aliases
51 51
                     $fieldAliases = array_keys($this->fieldsAliases, $fieldName);
52 52
                     if (!empty($fieldAliases)) {
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                                 } else {
59 59
                                     $fieldValue = $newValue;
60 60
                                 }
61
-                                $count ++;
61
+                                $count++;
62 62
 
63 63
                                 break;
64 64
                             }
Please login to merge, or discard this patch.
modules/autoload.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,10 +13,10 @@
 block discarded – undo
13 13
 
14 14
 $deepness = substr_count($_SERVER['SCRIPT_NAME'], "/") - 1;
15 15
 
16
-$_PATH = $deepness>0 ? implode("", array_fill(0, $deepness, "../")) : "./";
16
+$_PATH = $deepness > 0 ? implode("", array_fill(0, $deepness, "../")) : "./";
17 17
 
18 18
 require_once($_PATH . "vendor/autoload.php");
19
-spl_autoload_register(function ($className) {
19
+spl_autoload_register(function($className) {
20 20
     global $_PATH;
21 21
 
22 22
     $path = explode("\\", $className);
Please login to merge, or discard this patch.
classes/db/tools/ErrorLog.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         if ($type === 0) {
38 38
             $errorTypes[] = "E_LOG_INFO";
39 39
         } else {
40
-            for ($i = 0; $i < 15;  $i++) {
40
+            for ($i = 0; $i < 15; $i++) {
41 41
                 $errorType = self::friendlyErrorType($type & pow(2, $i));
42 42
                 if (!empty($errorType)) {
43 43
                     $errorTypes[] = $errorType;
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     }
58 58
 
59 59
     private static function friendlyErrorType($type) {
60
-        switch($type) {
60
+        switch ($type) {
61 61
             case E_ERROR: // 1
62 62
                 return 'E_ERROR';
63 63
             case E_WARNING: // 2
Please login to merge, or discard this patch.