Completed
Push — master ( 9b4748...69d137 )
by Dmytro
03:24
created
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.
generators/beans_generator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
                 if ($attributes['key'] === 'PRI') {
39 39
                     $idFieldName = $field;
40 40
                 }
41
-                $fieldsListStr.= "        " . DBCore::getPrintableFieldString($field, $attributes);
41
+                $fieldsListStr .= "        " . DBCore::getPrintableFieldString($field, $attributes);
42 42
             }
43 43
             $fieldsListStr = substr($fieldsListStr, 0, strlen($fieldsListStr) - 1);
44 44
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 function getClassName($tableName) {
70 70
     $underlinesReplaced = preg_replace_callback(
71 71
         "/_([a-zA-Z]{1})/",
72
-        function ($matches) {
72
+        function($matches) {
73 73
             return strtoupper($matches[1]);
74 74
         },
75 75
         $tableName
Please login to merge, or discard this patch.
framework/core/Messages.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@
 block discarded – undo
132 132
      */
133 133
     public static function reorderMessages()
134 134
     {
135
-        uasort(self::$messages, function ($a, $b) {
135
+        uasort(self::$messages, function($a, $b) {
136 136
             return $a->type <= $b->type;
137 137
         });
138 138
     }
Please login to merge, or discard this patch.
framework/app/Controller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         $action = 'action' . ucfirst(
34 34
             preg_replace_callback(
35 35
                 "#_([a-z])#",
36
-                function ($matches) {
36
+                function($matches) {
37 37
                     return strtoupper($matches[1]);
38 38
                 },
39 39
                 $this->route->action
Please login to merge, or discard this patch.
framework/web/Http.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -29,10 +29,10 @@  discard block
 block discarded – undo
29 29
     public static function http_redirect($url, $params = [], $session = false) {
30 30
         $paramsString = "";
31 31
         foreach ($params as $key => $value) {
32
-            $paramsString.= "&" . $key . "=" . $value;
32
+            $paramsString .= "&" . $key . "=" . $value;
33 33
         }
34 34
         if ($session) {
35
-            $paramsString.= "&" . session_name() . "=" . session_id();
35
+            $paramsString .= "&" . session_name() . "=" . session_id();
36 36
         }
37 37
         $paramsString = substr($paramsString, 1);
38 38
         if ($paramsString) {
@@ -132,18 +132,18 @@  discard block
 block discarded – undo
132 132
             $urlParts['path'] = '/';
133 133
         }
134 134
 
135
-        $sock = fsockopen($urlParts['host'], (isset($urlParts['port']) ? (int) $urlParts['port'] : 80), $errno, $errstr, 30);
135
+        $sock = fsockopen($urlParts['host'], (isset($urlParts['port']) ? (int)$urlParts['port'] : 80), $errno, $errstr, 30);
136 136
         if (!$sock) {
137 137
             throw new HttpException("$errstr ($errno)");
138 138
         }
139 139
 
140 140
         $request = "HEAD " . $urlParts['path'] . (isset($urlParts['query']) ? '?' . $urlParts['query'] : '') . " HTTP/1.1\r\n";
141
-        $request.= 'Host: ' . $urlParts['host'] . "\r\n";
142
-        $request.= "Connection: Close\r\n\r\n";
141
+        $request .= 'Host: ' . $urlParts['host'] . "\r\n";
142
+        $request .= "Connection: Close\r\n\r\n";
143 143
         fwrite($sock, $request);
144 144
         $response = '';
145 145
         while (!feof($sock)) {
146
-            $response.= fread($sock, 8192);
146
+            $response .= fread($sock, 8192);
147 147
         }
148 148
         fclose($sock);
149 149
 
@@ -218,29 +218,29 @@  discard block
 block discarded – undo
218 218
 
219 219
         // Data goes in the path for a GET request
220 220
         if ($type == self::GET) {
221
-            $parts['path'].= '?' . $postString;
221
+            $parts['path'] .= '?' . $postString;
222 222
         }
223 223
 
224 224
         $request = "$type " . $parts['path'] . " HTTP/1.1\r\n";
225
-        $request.= "Host: " . $parts['host'] . "\r\n";
225
+        $request .= "Host: " . $parts['host'] . "\r\n";
226 226
 
227 227
         if ($type == self::POST) {
228
-            $request.= "Content-Type: application/x-www-form-urlencoded\r\n";
229
-            $request.= "Content-Length: " . strlen($postString) . "\r\n";
228
+            $request .= "Content-Type: application/x-www-form-urlencoded\r\n";
229
+            $request .= "Content-Length: " . strlen($postString) . "\r\n";
230 230
         }
231
-        $request.= "Connection: Close\r\n";
232
-        $request.= "\r\n";
231
+        $request .= "Connection: Close\r\n";
232
+        $request .= "\r\n";
233 233
 
234 234
         // Data goes in the request body for a POST request
235 235
         if ($type == self::POST && isset($postString)) {
236
-            $request.= $postString;
236
+            $request .= $postString;
237 237
         }
238 238
 
239 239
         fwrite($sock, $request);
240 240
 
241 241
         $response = "";
242 242
         while (!feof($sock) && $result = fgets($sock)) {
243
-            $response.= $result;
243
+            $response .= $result;
244 244
         }
245 245
 
246 246
         fclose($sock);
Please login to merge, or discard this patch.
framework/mail/POP.php 1 patch
Doc Comments   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -98,7 +98,8 @@  discard block
 block discarded – undo
98 98
     /**
99 99
      * Delete message from POP server.
100 100
      *
101
-     * @return int $messageId Id of the message.
101
+     * @param integer $messageId
102
+     * @return string $messageId Id of the message.
102 103
      *
103 104
      * @return string Response string.
104 105
      */
@@ -111,7 +112,7 @@  discard block
 block discarded – undo
111 112
     /**
112 113
      * Count messages in POP server.
113 114
      *
114
-     * @return type
115
+     * @return integer
115 116
      */
116 117
     public function countMessages() {
117 118
         fwrite($this->connection, "STAT\r\n");
@@ -124,7 +125,7 @@  discard block
 block discarded – undo
124 125
     /**
125 126
      * Return message header.
126 127
      *
127
-     * @return int $messageNumber Number of the message.
128
+     * @return string $messageNumber Number of the message.
128 129
      *
129 130
      * @return string
130 131
      */
@@ -159,9 +160,10 @@  discard block
 block discarded – undo
159 160
     /**
160 161
      * Return message by number.
161 162
      *
162
-     * @return int $messageNumber Number of the message
163
+     * @param integer $messageNumber
164
+     * @return false|string $messageNumber Number of the message
163 165
      *
164
-     * @return string
166
+     * @return false|string
165 167
      */
166 168
     public function getMessage($messageNumber) {
167 169
         fwrite($this->connection, "RETR $messageNumber\r\n");
Please login to merge, or discard this patch.
framework/db/DBObject.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
     /**
54 54
      * Sets primary key value.
55 55
      *
56
-     * @param mixed $recordId Key vaue.
56
+     * @param integer $recordId Key vaue.
57 57
      *
58
-     * @return bool Success flag.
58
+     * @return DBObject Success flag.
59 59
      * @throws DBCoreException If object has no field with such name.
60 60
      */
61 61
     public function setId($recordId) {
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
      * @param bool $ignore Ignore unique indexes or not.
256 256
      * @param bool Debug mode flag.
257 257
      *
258
-     * @return mixed Primary key value.
258
+     * @return integer Primary key value.
259 259
      * @throws DBCoreException If some database error occurred.
260 260
      */
261 261
     public function insert($ignore = false,  $debug = false) {
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
     /**
515 515
      * Deletes DB record for current DBObject.
516 516
      *
517
-     * @return mixed Number of affected rows (1 if some record was deleted,
517
+     * @return integer Number of affected rows (1 if some record was deleted,
518 518
      *            0 - if no) or FALSE if some error occurred.
519 519
      */
520 520
     public function delete() {
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
      * @return mixed Primary key value.
259 259
      * @throws DBCoreException If some database error occurred.
260 260
      */
261
-    public function insert($ignore = false,  $debug = false) {
261
+    public function insert($ignore = false, $debug = false) {
262 262
         return DBCore::insertDBObject($this, $ignore, $debug);
263 263
     }
264 264
 
@@ -430,11 +430,11 @@  discard block
 block discarded – undo
430 430
          */
431 431
         if ($this->isNewRecord()) {
432 432
             if (!empty($this->dbQuery->conditions)) {
433
-                $this->dbQuery->query.= " WHERE ";
433
+                $this->dbQuery->query .= " WHERE ";
434 434
                 $this->dbQuery->sqlPushValues($this->dbQuery->conditions, " AND ");
435 435
             }
436 436
         } else {
437
-            $this->dbQuery->query.= " WHERE ";
437
+            $this->dbQuery->query .= " WHERE ";
438 438
             $this->dbQuery->sqlPushValues([static::ID_FIELD_NAME => $this->id]);
439 439
         }
440 440
 
@@ -443,14 +443,14 @@  discard block
 block discarded – undo
443 443
          */
444 444
         if ($this->isNewRecord()) {
445 445
             if (!empty($this->dbQuery->order)) {
446
-                $this->dbQuery->query.= " ORDER BY";
446
+                $this->dbQuery->query .= " ORDER BY";
447 447
                 if (is_array($this->dbQuery->order)) {
448 448
                     foreach ($this->dbQuery->order as $fieldName => $ord) {
449
-                        $this->dbQuery->query.= " " . $fieldName . " " . $ord . ",";
449
+                        $this->dbQuery->query .= " " . $fieldName . " " . $ord . ",";
450 450
                     }
451 451
                     $this->dbQuery->query = substr($this->dbQuery->query, 0, strlen($this->dbQuery->query) - 1);
452 452
                 } elseif (is_string($this->dbQuery->order)) {
453
-                    $this->dbQuery->query.= " " . $this->dbQuery->order;
453
+                    $this->dbQuery->query .= " " . $this->dbQuery->order;
454 454
                 }
455 455
             }
456 456
         }
@@ -462,13 +462,13 @@  discard block
 block discarded – undo
462 462
         if ($this->isNewRecord()) {
463 463
             if (!is_null($this->dbQuery->limit)) {
464 464
                 if (Tools::isInteger($this->dbQuery->limit)) {
465
-                    $this->dbQuery->query.= " LIMIT " . $this->dbQuery->limit;
465
+                    $this->dbQuery->query .= " LIMIT " . $this->dbQuery->limit;
466 466
                     $count = $this->dbQuery->limit;
467 467
                 } elseif (is_array($this->dbQuery->limit) && count($this->dbQuery->limit) == 2) {
468 468
                     $offset = $this->dbQuery->limit[0];
469 469
                     $count = $this->dbQuery->limit[1];
470 470
                     if (Tools::isInteger($offset) && Tools::isInteger($count)) {
471
-                        $this->dbQuery->query.= " LIMIT " . $offset . ", " . $count;
471
+                        $this->dbQuery->query .= " LIMIT " . $offset . ", " . $count;
472 472
                     } else {
473 473
                         throw new DBCoreException("Invalid LIMIT param in select() method.");
474 474
                     }
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
                 }
478 478
             }
479 479
         } else {
480
-            $this->dbQuery->query.= " LIMIT 1";
480
+            $this->dbQuery->query .= " LIMIT 1";
481 481
             $count = 1;
482 482
         }
483 483
 
Please login to merge, or discard this patch.