Completed
Push — master ( 417a50...a61c99 )
by Dmytro
07:12
created
framework/helpers/StringHelper.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,11 +29,11 @@  discard block
 block discarded – undo
29 29
         if ($encoding) {
30 30
             $firstLetter = mb_substr(mb_strtoupper($str, $encoding), 0, 1, $encoding);
31 31
 
32
-            return ($firstLetter . mb_substr($str, 1, null, $encoding));
32
+            return ($firstLetter.mb_substr($str, 1, null, $encoding));
33 33
         } else {
34 34
             $firstLetter = mb_substr(mb_strtoupper($str), 0, 1);
35 35
 
36
-            return ($firstLetter . mb_substr($str, 1));
36
+            return ($firstLetter.mb_substr($str, 1));
37 37
         }
38 38
     }
39 39
 
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
         if ($encoding) {
53 53
             $firstLetter = mb_substr(mb_strtoupper($str, $encoding), 0, 1, $encoding);
54 54
 
55
-            return ($firstLetter . mb_substr($str, 1, null, $encoding));
55
+            return ($firstLetter.mb_substr($str, 1, null, $encoding));
56 56
         } else {
57 57
             $firstLetter = mb_substr(mb_strtoupper($str), 0, 1);
58 58
 
59
-            return ($firstLetter . mb_substr($str, 1));
59
+            return ($firstLetter.mb_substr($str, 1));
60 60
         }
61 61
     }
62 62
 
Please login to merge, or discard this patch.
framework/localization/Language.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
         if (isset($this->titles[$code])) {
65 65
             return $this->titles[$code];
66 66
         } else {
67
-            throw new Exception("Invalid language code '" . $code . "'");
67
+            throw new Exception("Invalid language code '".$code."'");
68 68
         }
69 69
     }
70 70
 
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 session_start();
4
-header('X-Powered-By: Asymptix PHP Framework, PHP/' . phpversion());
4
+header('X-Powered-By: Asymptix PHP Framework, PHP/'.phpversion());
5 5
 
6 6
 require_once("modules/autoload.php");
7 7
 
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 }
69 69
 
70 70
 if ($_ROUTE->isBackend) {
71
-    require_once("controllers/backend/" . $_ROUTE->controller . ".php");
71
+    require_once("controllers/backend/".$_ROUTE->controller.".php");
72 72
     require_once("templates/backend/master.tpl.php");
73 73
 } else {
74
-    require_once("controllers/frontend/" . $_ROUTE->controller . ".php");
74
+    require_once("controllers/frontend/".$_ROUTE->controller.".php");
75 75
     require_once("templates/frontend/master.tpl.php");
76 76
 }
77 77
\ No newline at end of file
Please login to merge, or discard this patch.
generators/beans_generator.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
 OutputStream::start();
16 16
 
17 17
 if (!file_exists(RESULTS_PATH) || is_file(RESULTS_PATH)) {
18
-    OutputStream::msg(OutputStream::MSG_ERROR, "Destination directory '" . RESULTS_PATH . "' doesn't exists.");
18
+    OutputStream::msg(OutputStream::MSG_ERROR, "Destination directory '".RESULTS_PATH."' doesn't exists.");
19 19
     OutputStream::close();
20 20
     exit();
21 21
 }
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
 if ($stmt !== false) {
27 27
     $tpl = file_get_contents(CLASS_TPL);
28 28
     while ($resultSet = DBCore::bindResults($stmt)) {
29
-        $tableName = $resultSet['TABLE_NAMES']['Tables_in_' . conf\Config::getDBConfigParam('DBNAME')];
29
+        $tableName = $resultSet['TABLE_NAMES']['Tables_in_'.conf\Config::getDBConfigParam('DBNAME')];
30 30
 
31
-        OutputStream::msg(OutputStream::MSG_INFO, "Reading structure for table '" . $tableName . "'...");
31
+        OutputStream::msg(OutputStream::MSG_INFO, "Reading structure for table '".$tableName."'...");
32 32
 
33 33
         $idFieldName = 'id';
34 34
         $fieldsListStr = "";
@@ -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
 
@@ -52,11 +52,11 @@  discard block
 block discarded – undo
52 52
                 date("Y"), AUTHOR, EMAIL
53 53
             ), $tpl);
54 54
 
55
-            file_put_contents(RESULTS_PATH . $className . ".php", $content);
55
+            file_put_contents(RESULTS_PATH.$className.".php", $content);
56 56
 
57
-            OutputStream::msg(OutputStream::MSG_SUCCESS, "Class '" . RESULTS_PATH . $className . ".php' generated.");
57
+            OutputStream::msg(OutputStream::MSG_SUCCESS, "Class '".RESULTS_PATH.$className.".php' generated.");
58 58
         } else {
59
-            OutputStream::msg(OutputStream::MSG_ERROR, "Can't read structure for table '" . $tableName . "'.");
59
+            OutputStream::msg(OutputStream::MSG_ERROR, "Can't read structure for table '".$tableName."'.");
60 60
         }
61 61
     }
62 62
 
@@ -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.
modules/dbconnection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@
 block discarded – undo
19 19
         Config::getDBConfigParam('USER'), Config::getDBConfigParam('PASSWORD'),
20 20
         Config::getDBConfigParam('DBNAME'));
21 21
 if ($mysqli->connect_error) {
22
-    die('Connect Error (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error);
22
+    die('Connect Error ('.$mysqli->connect_errno.') '.$mysqli->connect_error);
23 23
 } else {
24 24
     if (!$mysqli->set_charset(Config::getDBConfigParam('DB_CHARSET'))) {
25
-        printf("Error loading character set " . Config::getDBConfigParam('DB_CHARSET') . ": %s\n", $mysqli->error);
25
+        printf("Error loading character set ".Config::getDBConfigParam('DB_CHARSET').": %s\n", $mysqli->error);
26 26
     }
27 27
 
28 28
     $manager = DBCore::getInstance();
Please login to merge, or discard this patch.
modules/http.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,16 +22,16 @@  discard block
 block discarded – undo
22 22
     function http_redirect($url, $params = array(), $session = false) {
23 23
         $paramsString = "";
24 24
         foreach ($params as $key => $value) {
25
-            $paramsString .= "&" . $key . "=" . $value;
25
+            $paramsString .= "&".$key."=".$value;
26 26
         }
27 27
         if ($session) {
28
-            $paramsString .= "&" . session_name() . "=" . session_id();
28
+            $paramsString .= "&".session_name()."=".session_id();
29 29
         }
30 30
         $paramsString = substr($paramsString, 1);
31 31
         if ($paramsString) {
32
-            $paramsString = "?" . $paramsString;
32
+            $paramsString = "?".$paramsString;
33 33
         }
34
-        header("Location: " . $url . $paramsString);
34
+        header("Location: ".$url.$paramsString);
35 35
         exit();
36 36
     }
37 37
 
@@ -122,13 +122,13 @@  discard block
 block discarded – undo
122 122
                 case 505: $text = 'HTTP Version not supported';
123 123
                     break;
124 124
                 default:
125
-                    exit('Unknown http status code "' . htmlentities($code) . '"');
125
+                    exit('Unknown http status code "'.htmlentities($code).'"');
126 126
                     break;
127 127
             }
128 128
 
129 129
             $protocol = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0');
130 130
 
131
-            header($protocol . ' ' . $code . ' ' . $text);
131
+            header($protocol.' '.$code.' '.$text);
132 132
 
133 133
             $GLOBALS['http_response_code'] = $code;
134 134
         } else {
Please login to merge, or discard this patch.
modules/autoload.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,19 +13,19 @@
 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
-require_once($_PATH . "vendor/autoload.php");
19
-spl_autoload_register(function ($className) {
18
+require_once($_PATH."vendor/autoload.php");
19
+spl_autoload_register(function($className) {
20 20
     global $_PATH;
21 21
 
22 22
     $path = explode("\\", $className);
23 23
     if (in_array($path[0], array("conf"))) {
24
-        $includePath = $_PATH . str_replace("\\", "/", $className . ".php");
24
+        $includePath = $_PATH.str_replace("\\", "/", $className.".php");
25 25
     } else {
26
-        $includePath = $_PATH . "classes/" . str_replace("\\", "/", $className . ".php");
26
+        $includePath = $_PATH."classes/".str_replace("\\", "/", $className.".php");
27 27
     }
28 28
     require_once($includePath);
29 29
 });
30 30
 
31
-require_once($_PATH . "modules/error_log.php");
32 31
\ No newline at end of file
32
+require_once($_PATH."modules/error_log.php");
33 33
\ No newline at end of file
Please login to merge, or discard this patch.
modules/localization.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,4 +22,4 @@
 block discarded – undo
22 22
 $_LANG = Languages::getLanguage($_SESSION['lang']);
23 23
 $_SESSION['lang'] = $_LANG->code;
24 24
 
25
-require_once(realpath(dirname(__FILE__)) . "/../conf/langs/" . $_LANG->code . ".php");
26 25
\ No newline at end of file
26
+require_once(realpath(dirname(__FILE__))."/../conf/langs/".$_LANG->code.".php");
27 27
\ No newline at end of file
Please login to merge, or discard this patch.
framework/db/DBObject.php 2 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -88,9 +88,9 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function saveActivationFlag() {
90 90
         return DBCore::doUpdateQuery(
91
-            "UPDATE " . static::TABLE_NAME . "
91
+            "UPDATE ".static::TABLE_NAME."
92 92
                 SET activation = ?
93
-             WHERE " . static::ID_FIELD_NAME . " = ?
93
+             WHERE " . static::ID_FIELD_NAME." = ?
94 94
              LIMIT 1",
95 95
             "ii",
96 96
             [$this->activation, $this->id]
@@ -154,9 +154,9 @@  discard block
 block discarded – undo
154 154
      */
155 155
     public function saveRemovementFlag() {
156 156
         return DBCore::doUpdateQuery(
157
-            "UPDATE " . static::TABLE_NAME . "
157
+            "UPDATE ".static::TABLE_NAME."
158 158
                 SET removed = ?
159
-             WHERE " . static::ID_FIELD_NAME . " = ?
159
+             WHERE " . static::ID_FIELD_NAME." = ?
160 160
              LIMIT 1",
161 161
             "ii",
162 162
             [$this->removed, $this->id]
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
      */
358 358
     public static function _count($conditions = [], $debug = false) {
359 359
         $dbQuery = (new DBPreparedQuery())->prepare(
360
-            "SELECT COUNT(*) as 'val' FROM " . static::TABLE_NAME,
360
+            "SELECT COUNT(*) as 'val' FROM ".static::TABLE_NAME,
361 361
             $conditions
362 362
         );
363 363
 
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
      */
379 379
     public static function _max($field, $conditions = [], $debug = false) {
380 380
         $dbQuery = (new DBPreparedQuery())->prepare(
381
-            "SELECT MAX(`" . $field . "`) as 'val' FROM " . static::TABLE_NAME,
381
+            "SELECT MAX(`".$field."`) as 'val' FROM ".static::TABLE_NAME,
382 382
             $conditions
383 383
         );
384 384
 
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
      */
400 400
     public static function _min($field, $conditions = [], $debug = false) {
401 401
         $dbQuery = (new DBPreparedQuery())->prepare(
402
-            "SELECT MIN(`" . $field . "`) as 'val' FROM " . static::TABLE_NAME,
402
+            "SELECT MIN(`".$field."`) as 'val' FROM ".static::TABLE_NAME,
403 403
             $conditions
404 404
         );
405 405
 
@@ -485,14 +485,14 @@  discard block
 block discarded – undo
485 485
     public function go($debug = false) {
486 486
         switch ($this->dbQuery->getType()) {
487 487
             case (DBQueryType::SELECT):
488
-                $this->dbQuery->query = "SELECT * FROM " . static::TABLE_NAME;
488
+                $this->dbQuery->query = "SELECT * FROM ".static::TABLE_NAME;
489 489
                 break;
490 490
             case (DBQueryType::UPDATE):
491
-                $this->dbQuery->query = "UPDATE " . static::TABLE_NAME . " SET ";
491
+                $this->dbQuery->query = "UPDATE ".static::TABLE_NAME." SET ";
492 492
                 $this->dbQuery->sqlPushValues($this->dbQuery->fields);
493 493
                 break;
494 494
             case (DBQueryType::DELETE):
495
-                $this->dbQuery->query = "DELETE FROM " . static::TABLE_NAME;
495
+                $this->dbQuery->query = "DELETE FROM ".static::TABLE_NAME;
496 496
                 break;
497 497
         }
498 498
 
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
         if ($this->isNewRecord()) {
503 503
             $this->dbQuery->prepareConditions();
504 504
         } else {
505
-            $this->dbQuery->query.= " WHERE ";
505
+            $this->dbQuery->query .= " WHERE ";
506 506
             $this->dbQuery->sqlPushValues([static::ID_FIELD_NAME => $this->id]);
507 507
         }
508 508
 
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
         if ($this->isNewRecord()) {
521 521
             $count = $this->dbQuery->prepareLimit();
522 522
         } else {
523
-            $this->dbQuery->query.= " LIMIT 1";
523
+            $this->dbQuery->query .= " LIMIT 1";
524 524
             $count = 1;
525 525
         }
526 526
 
Please login to merge, or discard this patch.
Doc Comments   +3 added lines, -3 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) {
Please login to merge, or discard this patch.