@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | if (DBQueryType::isValidQueryType($type)) { |
73 | 73 | $this->type = $type; |
74 | 74 | } else { |
75 | - throw new DBCoreException("Invalid SQL query type '" . $type . "'"); |
|
75 | + throw new DBCoreException("Invalid SQL query type '".$type."'"); |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | OutputStream::start(); |
125 | 125 | if (!empty($query)) { |
126 | 126 | if (empty($types) && empty($params)) { |
127 | - OutputStream::message(OutputStream::MSG_INFO, "Q: " . $query); |
|
127 | + OutputStream::message(OutputStream::MSG_INFO, "Q: ".$query); |
|
128 | 128 | } else { |
129 | 129 | if (strlen($types) === count($params)) { |
130 | 130 | $query = preg_replace('/\s+/', ' ', $query); |
@@ -134,17 +134,17 @@ discard block |
||
134 | 134 | for ($i = 0; $i < strlen($types); $i++) { |
135 | 135 | $query = preg_replace("/\?/", DBField::sqlValue($types[$i], $params[$i]), $query, 1); |
136 | 136 | |
137 | - $paramsStr[] = $types[$i] . ": " . DBField::sqlValue($types[$i], $params[$i]); |
|
137 | + $paramsStr[] = $types[$i].": ".DBField::sqlValue($types[$i], $params[$i]); |
|
138 | 138 | } |
139 | 139 | |
140 | - OutputStream::message(OutputStream::MSG_INFO, "Q: " . $query); |
|
141 | - OutputStream::message(OutputStream::MSG_INFO, "P: " . $preparedQuery); |
|
140 | + OutputStream::message(OutputStream::MSG_INFO, "Q: ".$query); |
|
141 | + OutputStream::message(OutputStream::MSG_INFO, "P: ".$preparedQuery); |
|
142 | 142 | |
143 | - OutputStream::message(OutputStream::MSG_INFO, "A: [" . implode(", ", $paramsStr) . "]"); |
|
143 | + OutputStream::message(OutputStream::MSG_INFO, "A: [".implode(", ", $paramsStr)."]"); |
|
144 | 144 | } else { |
145 | 145 | OutputStream::message(OutputStream::MSG_ERROR, "Number of types is not equal parameters number."); |
146 | - OutputStream::message(OutputStream::MSG_INFO, "T: " . $types); |
|
147 | - OutputStream::message(OutputStream::MSG_INFO, "A: [" . implode(", ", $params) . "]"); |
|
146 | + OutputStream::message(OutputStream::MSG_INFO, "T: ".$types); |
|
147 | + OutputStream::message(OutputStream::MSG_INFO, "A: [".implode(", ", $params)."]"); |
|
148 | 148 | } |
149 | 149 | } |
150 | 150 | } else { |
@@ -31,9 +31,9 @@ |
||
31 | 31 | */ |
32 | 32 | public static function displayError($errorMessage, $fieldName = null) { |
33 | 33 | if (!is_null($fieldName)) { |
34 | - return ('<label for="' . $fieldName . '" class="form-error">' . $errorMessage . '</label>'); |
|
34 | + return ('<label for="'.$fieldName.'" class="form-error">'.$errorMessage.'</label>'); |
|
35 | 35 | } else { |
36 | - return ('<span class="label label-danger pull-right form-error">' . $errorMessage . '</span>'); |
|
36 | + return ('<span class="label label-danger pull-right form-error">'.$errorMessage.'</span>'); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | * @param string $str String to output. |
55 | 55 | */ |
56 | 56 | public static function line($str = "") { |
57 | - self::output($str . "\n"); |
|
57 | + self::output($str."\n"); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 | /** |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $str = str_replace("{{time}}", date($format, $time), $str); |
76 | 76 | self::line($str); |
77 | 77 | } else { |
78 | - self::line(date($format, $time) . " " . $str); |
|
78 | + self::line(date($format, $time)." ".$str); |
|
79 | 79 | } |
80 | 80 | } |
81 | 81 | |
@@ -91,11 +91,11 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public static function message($msgType, $str, $format = "\[Y-m-d H:i:s\]", $time = null) { |
93 | 93 | if (strpos($str, "{{time}}") === false) { |
94 | - $str = "{{time}} " . $str; |
|
94 | + $str = "{{time}} ".$str; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | self::log( |
98 | - '<b><font color="' . $msgType . '">' . $str . '</font></b>', |
|
98 | + '<b><font color="'.$msgType.'">'.$str.'</font></b>', |
|
99 | 99 | $format, |
100 | 100 | $time |
101 | 101 | ); |
@@ -96,17 +96,17 @@ discard block |
||
96 | 96 | * @return string URL. |
97 | 97 | */ |
98 | 98 | public function getUrl($action, $id = null, $getParams = []) { |
99 | - $url = $this->controller . "/"; |
|
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 | |
@@ -119,9 +119,9 @@ discard block |
||
119 | 119 | * @return string |
120 | 120 | */ |
121 | 121 | public function tplPath() { |
122 | - $path = $this->controller . "/" . $this->controller; |
|
122 | + $path = $this->controller."/".$this->controller; |
|
123 | 123 | if (!empty($this->action)) { |
124 | - $path.= "_" . $this->action; |
|
124 | + $path .= "_".$this->action; |
|
125 | 125 | } |
126 | 126 | |
127 | 127 | return $path; |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | if (isset($this->$attributeName)) { |
113 | 113 | $this->$attributeName = $attributeValue; |
114 | 114 | } else { |
115 | - throw new \Exception("Wrong attribute '" . $attributeName . "' for " . get_class($this) . " component"); |
|
115 | + throw new \Exception("Wrong attribute '".$attributeName."' for ".get_class($this)." component"); |
|
116 | 116 | } |
117 | 117 | } |
118 | 118 | } |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | public function getStyle() { |
163 | 163 | $style = ""; |
164 | 164 | foreach ($this->style as $propertyName => $propertyValue) { |
165 | - $style .= $propertyName . ":" . $propertyValue . ";"; |
|
165 | + $style .= $propertyName.":".$propertyValue.";"; |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | return $style; |
@@ -135,7 +135,7 @@ |
||
135 | 135 | * css($propertyName, $propertyValue) Set the value of a CSS property. |
136 | 136 | * |
137 | 137 | * @param string $propertyName Name of a CSS property. |
138 | - * @param mixed $propertyValue Value of a CSS property. |
|
138 | + * @param string $propertyValue Value of a CSS property. |
|
139 | 139 | * |
140 | 140 | * @return Value of the CSS property or NULL if property is not exists. |
141 | 141 | */ |
@@ -34,7 +34,7 @@ |
||
34 | 34 | $this->buttons = $buttons; |
35 | 35 | |
36 | 36 | if (empty($template)) { |
37 | - $template = __DIR__ . self::DEFAULT_TEMPLATE; |
|
37 | + $template = __DIR__.self::DEFAULT_TEMPLATE; |
|
38 | 38 | } |
39 | 39 | parent::__construct($attributesList, $template); |
40 | 40 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | public function __construct($attribs = [], $template = null, $show = false) { |
28 | 28 | if (empty($template)) { |
29 | - $template = __DIR__ . self::DEFAULT_TEMPLATE; |
|
29 | + $template = __DIR__.self::DEFAULT_TEMPLATE; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | if ($show) { |
@@ -29,11 +29,11 @@ discard block |
||
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 |
||
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 |
@@ -64,7 +64,7 @@ |
||
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 |