@@ -295,7 +295,7 @@ |
||
295 | 295 | */ |
296 | 296 | public function getValidationPropertyValue() |
297 | 297 | { |
298 | - return implode(',', array_map(function ($file) { |
|
298 | + return implode(',', array_map(function($file) { |
|
299 | 299 | return $file->getFileName(); |
300 | 300 | }, $this->_files)); |
301 | 301 | } |
@@ -226,7 +226,7 @@ |
||
226 | 226 | */ |
227 | 227 | public function clear() |
228 | 228 | { |
229 | - for ($i = $this->_c - 1;$i >= 0;--$i) { |
|
229 | + for ($i = $this->_c - 1; $i >= 0; --$i) { |
|
230 | 230 | $this->removeAt($i); |
231 | 231 | } |
232 | 232 | } |
@@ -127,7 +127,7 @@ |
||
127 | 127 | public static function poFile2moFile($pofile, $mofile) |
128 | 128 | { |
129 | 129 | if (!is_file($pofile)) { |
130 | - throw new Exception("File $pofile doesn't exist."); |
|
130 | + throw new Exception("file $pofile doesn't exist."); |
|
131 | 131 | } |
132 | 132 | |
133 | 133 | include_once __DIR__ . '/PO.php'; |
@@ -481,7 +481,7 @@ |
||
481 | 481 | } |
482 | 482 | |
483 | 483 | foreach ($this->_d as $priority => $items) { |
484 | - for ($index = count($items) - 1;$index >= 0;$index--) { |
|
484 | + for ($index = count($items) - 1; $index >= 0; $index--) { |
|
485 | 485 | $this->removeAtIndexInPriority($index, $priority); |
486 | 486 | } |
487 | 487 | unset($this->_d[$priority]); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $hexLength = strlen($hex); |
63 | 63 | $base = strlen($alphabet); |
64 | 64 | $result = ''; |
65 | - for ($i = 0;$i < $hexLength;$i += 6) { |
|
65 | + for ($i = 0; $i < $hexLength; $i += 6) { |
|
66 | 66 | $number = hexdec(substr($hex, $i, 6)); |
67 | 67 | while ($number) { |
68 | 68 | $result .= $alphabet[$number % $base]; |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | } |
107 | 107 | |
108 | 108 | $hasShadow = ($theme & THEME_SHADOWED_TEXT); |
109 | - for ($i = 0;$i < $length;$i++) { |
|
109 | + for ($i = 0; $i < $length; $i++) { |
|
110 | 110 | $color = imagecolorallocate($image, rand(150, 220), rand(150, 220), rand(150, 220)); |
111 | 111 | $size = rand($fontWidth - 10, $fontWidth); |
112 | 112 | $angle = rand(-30, 30); |
@@ -159,8 +159,8 @@ discard block |
||
159 | 159 | |
160 | 160 | function addNoise($image, $width, $height) |
161 | 161 | { |
162 | - for ($x = 0;$x < $width;++$x) { |
|
163 | - for ($y = 0;$y < $height;++$y) { |
|
162 | + for ($x = 0; $x < $width; ++$x) { |
|
163 | + for ($y = 0; $y < $height; ++$y) { |
|
164 | 164 | if (rand(0, 100) < 25) { |
165 | 165 | $color = imagecolorallocate($image, rand(150, 220), rand(150, 220), rand(150, 220)); |
166 | 166 | imagesetpixel($image, $x, $y, $color); |
@@ -172,13 +172,13 @@ discard block |
||
172 | 172 | |
173 | 173 | function addGrid($image, $width, $height) |
174 | 174 | { |
175 | - for ($i = 0;$i < $width;$i += rand(15, 25)) { |
|
175 | + for ($i = 0; $i < $width; $i += rand(15, 25)) { |
|
176 | 176 | imagesetthickness($image, rand(2, 6)); |
177 | 177 | $color = imagecolorallocate($image, rand(100, 180), rand(100, 180), rand(100, 180)); |
178 | 178 | imageline($image, $i + rand(-10, 20), 0, $i + rand(-10, 20), $height, $color); |
179 | 179 | imagecolordeallocate($image, $color); |
180 | 180 | } |
181 | - for ($i = 0;$i < $height;$i += rand(15, 25)) { |
|
181 | + for ($i = 0; $i < $height; $i += rand(15, 25)) { |
|
182 | 182 | imagesetthickness($image, rand(2, 6)); |
183 | 183 | $color = imagecolorallocate($image, rand(100, 180), rand(100, 180), rand(100, 180)); |
184 | 184 | imageline($image, 0, $i + rand(-10, 20), $width, $i + rand(-10, 20), $color); |
@@ -188,10 +188,10 @@ discard block |
||
188 | 188 | |
189 | 189 | function addScribble($image, $width, $height) |
190 | 190 | { |
191 | - for ($i = 0;$i < 8;$i++) { |
|
191 | + for ($i = 0; $i < 8; $i++) { |
|
192 | 192 | $color = imagecolorallocate($image, rand(100, 180), rand(100, 180), rand(100, 180)); |
193 | 193 | $points = []; |
194 | - for ($j = 1;$j < rand(5, 10);$j++) { |
|
194 | + for ($j = 1; $j < rand(5, 10); $j++) { |
|
195 | 195 | $points[] = rand(2 * (20 * ($i + 1)), 2 * (50 * ($i + 1))); |
196 | 196 | $points[] = rand(30, $height + 30); |
197 | 197 | } |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | { |
206 | 206 | $tempImage = imagecreatetruecolor($width, $height); |
207 | 207 | $chunk = rand(1, 5); |
208 | - for ($x = $y = 0;$x < $width;$x += $chunk) { |
|
208 | + for ($x = $y = 0; $x < $width; $x += $chunk) { |
|
209 | 209 | $chunk = rand(1, 5); |
210 | 210 | $y += rand(-1, 1); |
211 | 211 | if ($y >= $height) { |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | } |
217 | 217 | imagecopy($tempImage, $image, $x, 0, $x, $y, $chunk, $height); |
218 | 218 | } |
219 | - for ($x = $y = 0;$y < $height;$y += $chunk) { |
|
219 | + for ($x = $y = 0; $y < $height; $y += $chunk) { |
|
220 | 220 | $chunk = rand(1, 5); |
221 | 221 | $x += rand(-1, 1); |
222 | 222 | if ($x >= $width) { |
@@ -193,8 +193,7 @@ discard block |
||
193 | 193 | public function runQueryForList($connection, $parameter, $sql, $result, $delegate = null) |
194 | 194 | { |
195 | 195 | $registry = $this->getManager()->getTypeHandlers(); |
196 | - $list = $result instanceof \ArrayAccess ? $result : |
|
197 | - $this->_statement->createInstanceOfListClass($registry); |
|
196 | + $list = $result instanceof \ArrayAccess ? $result : $this->_statement->createInstanceOfListClass($registry); |
|
198 | 197 | $connection->setActive(true); |
199 | 198 | $reader = $sql->query(); |
200 | 199 | if ($delegate !== null) { |
@@ -267,8 +266,7 @@ discard block |
||
267 | 266 | foreach ($reader as $row) { |
268 | 267 | $obj = $this->applyResultMap($row); |
269 | 268 | $key = TPropertyAccess::get($obj, $keyProperty); |
270 | - $value = ($valueProperty === null) ? $obj : |
|
271 | - TPropertyAccess::get($obj, $valueProperty); |
|
269 | + $value = ($valueProperty === null) ? $obj : TPropertyAccess::get($obj, $valueProperty); |
|
272 | 270 | $param = new TResultSetMapItemParameter($key, $value, $parameter, $map); |
273 | 271 | $this->raiseRowDelegate($delegate, $param); |
274 | 272 | } |
@@ -276,8 +274,7 @@ discard block |
||
276 | 274 | foreach ($reader as $row) { |
277 | 275 | $obj = $this->applyResultMap($row); |
278 | 276 | $key = TPropertyAccess::get($obj, $keyProperty); |
279 | - $map[$key] = ($valueProperty === null) ? $obj : |
|
280 | - TPropertyAccess::get($obj, $valueProperty); |
|
277 | + $map[$key] = ($valueProperty === null) ? $obj : TPropertyAccess::get($obj, $valueProperty); |
|
281 | 278 | } |
282 | 279 | } |
283 | 280 | $this->onExecuteQuery($command); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | INFORMATION_SCHEMA.COLUMNS c |
84 | 84 | WHERE t.table_name = c.table_name |
85 | 85 | AND t.table_name = :table |
86 | -EOD; |
|
86 | +eod; |
|
87 | 87 | if ($schemaName !== null) { |
88 | 88 | $sql .= ' AND t.table_schema = :schema'; |
89 | 89 | } |
@@ -207,7 +207,7 @@ discard block |
||
207 | 207 | AND |
208 | 208 | c.constraint_type ='PRIMARY KEY' |
209 | 209 | AND k.table_name = :table |
210 | -EOD; |
|
210 | +eod; |
|
211 | 211 | $command = $this->getDbConnection()->createCommand($sql); |
212 | 212 | $command->bindValue(':table', $col['TABLE_NAME']); |
213 | 213 | $primary = []; |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | RC.UNIQUE_CONSTRAINT_NAME |
251 | 251 | AND KCU2.ORDINAL_POSITION = KCU1.ORDINAL_POSITION |
252 | 252 | WHERE KCU1.TABLE_NAME = :table |
253 | -EOD; |
|
253 | +eod; |
|
254 | 254 | $command = $this->getDbConnection()->createCommand($sql); |
255 | 255 | $command->bindValue(':table', $col['TABLE_NAME']); |
256 | 256 | $fkeys = []; |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | $sql = <<<EOD |
290 | 290 | SELECT TABLE_NAME, TABLE_SCHEMA FROM [INFORMATION_SCHEMA].[TABLES] |
291 | 291 | WHERE TABLE_SCHEMA=:schema AND $condition |
292 | -EOD; |
|
292 | +eod; |
|
293 | 293 | $command = $this->getDbConnection()->createCommand($sql); |
294 | 294 | $command->bindParameter(":schema", $schema); |
295 | 295 | $rows = $command->query(); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | nspname = :schema)) |
137 | 137 | AND a.attnum > 0 AND NOT a.attisdropped |
138 | 138 | ORDER BY a.attnum |
139 | -EOD; |
|
139 | +eod; |
|
140 | 140 | $this->getDbConnection()->setActive(true); |
141 | 141 | $command = $this->getDbConnection()->createCommand($sql); |
142 | 142 | $command->bindValue(':table', $tableName); |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | SELECT count(c.relname) FROM pg_catalog.pg_class c |
197 | 197 | LEFT JOIN pg_catalog.pg_namespace n ON (n.oid = c.relnamespace) |
198 | 198 | WHERE (n.nspname=:schema) AND (c.relkind = 'v'::"char") AND c.relname = :table |
199 | -EOD; |
|
199 | +eod; |
|
200 | 200 | $this->getDbConnection()->setActive(true); |
201 | 201 | $command = $this->getDbConnection()->createCommand($sql); |
202 | 202 | $command->bindValue(':schema', $schemaName); |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | WHERE nspname=:schema)) |
334 | 334 | ORDER BY |
335 | 335 | 1 |
336 | -EOD; |
|
336 | +eod; |
|
337 | 337 | $this->getDbConnection()->setActive(true); |
338 | 338 | $command = $this->getDbConnection()->createCommand($sql); |
339 | 339 | $command->bindValue(':table', $tableName); |
@@ -374,7 +374,7 @@ discard block |
||
374 | 374 | ) |
375 | 375 | ) |
376 | 376 | AND attnum IN ({$index}) |
377 | -EOD; |
|
377 | +eod; |
|
378 | 378 | $command = $this->getDbConnection()->createCommand($sql); |
379 | 379 | $command->bindValue(':table', $tableName); |
380 | 380 | $command->bindValue(':schema', $schemaName); |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | $sql = <<<EOD |
438 | 438 | SELECT table_name, table_schema FROM information_schema.tables |
439 | 439 | WHERE table_schema=:schema AND table_type='BASE TABLE' |
440 | -EOD; |
|
440 | +eod; |
|
441 | 441 | $command = $this->getDbConnection()->createCommand($sql); |
442 | 442 | $command->bindParameter(':schema', $schema); |
443 | 443 | $rows = $command->query(); |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | TABLE_NAME = '{$tableName}' |
97 | 97 | AND OWNER = '{$schemaName}' |
98 | 98 | ORDER BY a.COLUMN_ID |
99 | -EOD; |
|
99 | +eod; |
|
100 | 100 | $this->getDbConnection()->setActive(true); |
101 | 101 | $this->getDbConnection()->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER); |
102 | 102 | $command = $this->getDbConnection()->createCommand($sql); |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | from ALL_OBJECTS |
161 | 161 | where OBJECT_NAME = '{$tableName}' |
162 | 162 | and OWNER = '{$schemaName}' |
163 | -EOD; |
|
163 | +eod; |
|
164 | 164 | $this->getDbConnection()->setActive(true); |
165 | 165 | $command = $this->getDbConnection()->createCommand($sql); |
166 | 166 | //$command->bindValue(':schema',$schemaName); |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | and a.TABLE_NAME = '{$tableName}' |
273 | 273 | and a.OWNER = '{$schemaName}' |
274 | 274 | and a.CONSTRAINT_TYPE in ('P','R') |
275 | -EOD; |
|
275 | +eod; |
|
276 | 276 | $this->getDbConnection()->setActive(true); |
277 | 277 | $command = $this->getDbConnection()->createCommand($sql); |
278 | 278 | //$command->bindValue(':table', $tableName); |
@@ -363,13 +363,13 @@ discard block |
||
363 | 363 | if ($schema === '') { |
364 | 364 | $sql = <<<EOD |
365 | 365 | SELECT table_name, '{$schema}' as table_schema FROM user_tables |
366 | -EOD; |
|
366 | +eod; |
|
367 | 367 | $command = $this->getDbConnection()->createCommand($sql); |
368 | 368 | } else { |
369 | 369 | $sql = <<<EOD |
370 | 370 | SELECT object_name as table_name, owner as table_schema FROM all_objects |
371 | 371 | WHERE object_type = 'TABLE' AND owner=:schema |
372 | -EOD; |
|
372 | +eod; |
|
373 | 373 | $command = $this->getDbConnection()->createCommand($sql); |
374 | 374 | $command->bindParameter(':schema', $schema); |
375 | 375 | } |