@@ -84,6 +84,10 @@ |
||
84 | 84 | } |
85 | 85 | } |
86 | 86 | |
87 | + /** |
|
88 | + * @param string $buffer |
|
89 | + * @param FixedTextDefinition[] $fieldDefinition |
|
90 | + */ |
|
87 | 91 | protected function processBuffer($buffer, $fieldDefinition) |
88 | 92 | { |
89 | 93 | $cntDef = count($fieldDefinition); |
@@ -92,7 +92,9 @@ |
||
92 | 92 | foreach ($array as $key => $value) { |
93 | 93 | $stmt->bindValue(":" . SQLBind::keyAdj($key), $value); |
94 | 94 | } |
95 | - } else $stmt = $this->_db->prepare($sql); |
|
95 | + } else { |
|
96 | + $stmt = $this->_db->prepare($sql); |
|
97 | + } |
|
96 | 98 | |
97 | 99 | return $stmt; |
98 | 100 | } |
@@ -68,12 +68,16 @@ |
||
68 | 68 | */ |
69 | 69 | function sqlDate($fmt, $col = false) |
70 | 70 | { |
71 | - if (!$col) $col = "getdate()"; |
|
71 | + if (!$col) { |
|
72 | + $col = "getdate()"; |
|
73 | + } |
|
72 | 74 | $s = ''; |
73 | 75 | |
74 | 76 | $len = strlen($fmt); |
75 | 77 | for ($i = 0; $i < $len; $i++) { |
76 | - if ($s) $s .= '+'; |
|
78 | + if ($s) { |
|
79 | + $s .= '+'; |
|
80 | + } |
|
77 | 81 | $ch = $fmt[$i]; |
78 | 82 | switch ($ch) { |
79 | 83 | case 'Y': |
@@ -69,7 +69,9 @@ |
||
69 | 69 | */ |
70 | 70 | function sqlDate($fmt, $col = false) |
71 | 71 | { |
72 | - if (!$col) $col = $this->sysTimeStamp; |
|
72 | + if (!$col) { |
|
73 | + $col = $this->sysTimeStamp; |
|
74 | + } |
|
73 | 75 | $s = 'TO_CHAR(' . $col . ",'"; |
74 | 76 | |
75 | 77 | $len = strlen($fmt); |
@@ -75,7 +75,9 @@ discard block |
||
75 | 75 | */ |
76 | 76 | function sqlDate($fmt, $col = false) |
77 | 77 | { |
78 | - if (!$col) $col = $this->sysTimeStamp; |
|
78 | + if (!$col) { |
|
79 | + $col = $this->sysTimeStamp; |
|
80 | + } |
|
79 | 81 | $s = 'DATE_FORMAT(' . $col . ",'"; |
80 | 82 | $concat = false; |
81 | 83 | $len = strlen($fmt); |
@@ -90,8 +92,11 @@ discard block |
||
90 | 92 | case 'q': |
91 | 93 | $s .= "'),Quarter($col)"; |
92 | 94 | |
93 | - if ($len > $i + 1) $s .= ",DATE_FORMAT($col,'"; |
|
94 | - else $s .= ",('"; |
|
95 | + if ($len > $i + 1) { |
|
96 | + $s .= ",DATE_FORMAT($col,'"; |
|
97 | + } else { |
|
98 | + $s .= ",('"; |
|
99 | + } |
|
95 | 100 | $concat = true; |
96 | 101 | break; |
97 | 102 | case 'M': |
@@ -138,7 +143,9 @@ discard block |
||
138 | 143 | } |
139 | 144 | } |
140 | 145 | $s.="')"; |
141 | - if ($concat) $s = "CONCAT($s)"; |
|
146 | + if ($concat) { |
|
147 | + $s = "CONCAT($s)"; |
|
148 | + } |
|
142 | 149 | return $s; |
143 | 150 | } |
144 | 151 |
@@ -27,7 +27,9 @@ discard block |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | if ($path != "") { |
30 | - if ($path[0] == "/") $path = substr($path, 1); |
|
30 | + if ($path[0] == "/") { |
|
31 | + $path = substr($path, 1); |
|
32 | + } |
|
31 | 33 | |
32 | 34 | $pathAr = explode("/", $path); |
33 | 35 | |
@@ -44,7 +46,9 @@ discard block |
||
44 | 46 | } |
45 | 47 | } |
46 | 48 | $this->_jsonObject = $newjsonObject; |
47 | - } else $this->_jsonObject = $jsonObject; |
|
49 | + } else { |
|
50 | + $this->_jsonObject = $jsonObject; |
|
51 | + } |
|
48 | 52 | |
49 | 53 | $this->_current = 0; |
50 | 54 | } |
@@ -26,7 +26,9 @@ |
||
26 | 26 | |
27 | 27 | $this->_array = array(); |
28 | 28 | |
29 | - if (!$array) return; |
|
29 | + if (!$array) { |
|
30 | + return; |
|
31 | + } |
|
30 | 32 | |
31 | 33 | if (is_array($array)) { |
32 | 34 | foreach ($array as $key => $value) { |
@@ -264,7 +264,9 @@ |
||
264 | 264 | |
265 | 265 | $field = $array->getField($name); |
266 | 266 | |
267 | - if (!is_array($field)) $field = array($field); |
|
267 | + if (!is_array($field)) { |
|
268 | + $field = array($field); |
|
269 | + } |
|
268 | 270 | |
269 | 271 | foreach ($field as $valueparam) { |
270 | 272 | switch ($relation) { |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | |
72 | 72 | /** |
73 | 73 | * |
74 | - * @param $array |
|
74 | + * @param SingleRow[] $array |
|
75 | 75 | * @return SingleRow[] |
76 | 76 | */ |
77 | 77 | public function match($array) |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | /** |
242 | 242 | * |
243 | 243 | * @param string[] $array |
244 | - * @return string |
|
244 | + * @return boolean |
|
245 | 245 | */ |
246 | 246 | private function evalString($array) |
247 | 247 | { |
@@ -310,7 +310,9 @@ |
||
310 | 310 | |
311 | 311 | protected function quickSortExec($seq, $field) |
312 | 312 | { |
313 | - if (!count($seq)) return $seq; |
|
313 | + if (!count($seq)) { |
|
314 | + return $seq; |
|
315 | + } |
|
314 | 316 | |
315 | 317 | $k = $seq [0]; |
316 | 318 | $x = $y = array(); |
@@ -308,6 +308,10 @@ discard block |
||
308 | 308 | return; |
309 | 309 | } |
310 | 310 | |
311 | + /** |
|
312 | + * @param SingleRow[] $seq |
|
313 | + * @param string $field |
|
314 | + */ |
|
311 | 315 | protected function quickSortExec($seq, $field) |
312 | 316 | { |
313 | 317 | if (!count($seq)) return $seq; |
@@ -329,7 +333,7 @@ discard block |
||
329 | 333 | |
330 | 334 | /** |
331 | 335 | * @param $document |
332 | - * @return array|string |
|
336 | + * @return string |
|
333 | 337 | */ |
334 | 338 | public static function fixUTF8($document) |
335 | 339 | { |