@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | // render items |
189 | 189 | $hasSeparators = $user->getHasSeparators(); |
190 | 190 | $itemCount = $user->getItemCount(); |
191 | - for ($i = 0;$i < $itemCount;++$i) { |
|
191 | + for ($i = 0; $i < $itemCount; ++$i) { |
|
192 | 192 | $user->renderItem($writer, $this, 'Item', $i); |
193 | 193 | if ($hasSeparators && $i != $itemCount - 1) { |
194 | 194 | $user->renderItem($writer, $this, 'Separator', $i); |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | if ($tableLayout) { |
222 | 222 | $writer->renderBeginTag('tbody'); |
223 | 223 | $column = 0; |
224 | - for ($i = 0;$i < $itemCount;++$i) { |
|
224 | + for ($i = 0; $i < $itemCount; ++$i) { |
|
225 | 225 | if ($column == 0) { |
226 | 226 | $writer->renderBeginTag('tr'); |
227 | 227 | } |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | if ($hasSeparators) { |
248 | 248 | $restColumns = $restColumns ? $restColumns + $restColumns + 1 : 1; |
249 | 249 | } |
250 | - for ($j = 0;$j < $restColumns;++$j) { |
|
250 | + for ($j = 0; $j < $restColumns; ++$j) { |
|
251 | 251 | $writer->write("<td></td>\n"); |
252 | 252 | } |
253 | 253 | } |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | $writer->renderEndTag(); |
261 | 261 | } else { |
262 | 262 | $column = 0; |
263 | - for ($i = 0;$i < $itemCount;++$i) { |
|
263 | + for ($i = 0; $i < $itemCount; ++$i) { |
|
264 | 264 | $user->renderItem($writer, $this, 'Item', $i); |
265 | 265 | if ($hasSeparators && $i != $itemCount - 1) { |
266 | 266 | $user->renderItem($writer, $this, 'Separator', $i); |
@@ -314,10 +314,10 @@ discard block |
||
314 | 314 | if ($tableLayout) { |
315 | 315 | $writer->renderBeginTag('tbody'); |
316 | 316 | $renderedItems = 0; |
317 | - for ($row = 0;$row < $rows;++$row) { |
|
317 | + for ($row = 0; $row < $rows; ++$row) { |
|
318 | 318 | $index = $row; |
319 | 319 | $writer->renderBeginTag('tr'); |
320 | - for ($col = 0;$col < $columns;++$col) { |
|
320 | + for ($col = 0; $col < $columns; ++$col) { |
|
321 | 321 | if ($renderedItems >= $itemCount) { |
322 | 322 | break; |
323 | 323 | } |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | if ($hasSeparators) { |
363 | 363 | $restColumns += $restColumns; |
364 | 364 | } |
365 | - for ($col = 0;$col < $restColumns;++$col) { |
|
365 | + for ($col = 0; $col < $restColumns; ++$col) { |
|
366 | 366 | $writer->write("<td></td>\n"); |
367 | 367 | } |
368 | 368 | } |
@@ -372,9 +372,9 @@ discard block |
||
372 | 372 | $writer->renderEndTag(); |
373 | 373 | } else { |
374 | 374 | $renderedItems = 0; |
375 | - for ($row = 0;$row < $rows;++$row) { |
|
375 | + for ($row = 0; $row < $rows; ++$row) { |
|
376 | 376 | $index = $row; |
377 | - for ($col = 0;$col < $columns;++$col) { |
|
377 | + for ($col = 0; $col < $columns; ++$col) { |
|
378 | 378 | if ($renderedItems >= $itemCount) { |
379 | 379 | break; |
380 | 380 | } |
@@ -591,7 +591,7 @@ |
||
591 | 591 | $controls->add("\n"); |
592 | 592 | } |
593 | 593 | |
594 | - for ($i = $startPageIndex;$i <= $endPageIndex;++$i) { |
|
594 | + for ($i = $startPageIndex; $i <= $endPageIndex; ++$i) { |
|
595 | 595 | if ($i === $pageIndex) { |
596 | 596 | $label = $this->createPagerButton($buttonType, false, "$i", self::CMD_PAGE, ''); |
597 | 597 | $controls->add($label); |
@@ -718,7 +718,7 @@ discard block |
||
718 | 718 | $formatter = new TSimpleDateFormatter($this->getDateFormat()); |
719 | 719 | $days = []; |
720 | 720 | $requiresPadding = $formatter->getDayPattern() === 'dd'; |
721 | - for ($i = 1;$i <= 31;$i++) { |
|
721 | + for ($i = 1; $i <= 31; $i++) { |
|
722 | 722 | $days[$i] = $requiresPadding ? str_pad($i, 2, '0', STR_PAD_LEFT) : $i; |
723 | 723 | } |
724 | 724 | return $days; |
@@ -761,12 +761,12 @@ discard block |
||
761 | 761 | case 'MMM': return $info->getAbbreviatedMonthNames(); |
762 | 762 | case 'MM': |
763 | 763 | $array = []; |
764 | - for ($i = 1;$i <= 12;$i++) { |
|
764 | + for ($i = 1; $i <= 12; $i++) { |
|
765 | 765 | $array[$i - 1] = $i < 10 ? '0' . $i : $i; |
766 | 766 | } |
767 | 767 | return $array; |
768 | 768 | case 'M': |
769 | - $array = []; for ($i = 1;$i <= 12;$i++) { |
|
769 | + $array = []; for ($i = 1; $i <= 12; $i++) { |
|
770 | 770 | $array[$i - 1] = $i; |
771 | 771 | } |
772 | 772 | return $array; |
@@ -388,7 +388,7 @@ |
||
388 | 388 | public function onPreRender($param) |
389 | 389 | { |
390 | 390 | parent::onPreRender($param); |
391 | - $this->getActiveView(); // determine the active view |
|
391 | + $this->getActiveView(); // determine the active view |
|
392 | 392 | $this->registerStyleSheet(); |
393 | 393 | |
394 | 394 | $page = $this->getPage(); |
@@ -483,7 +483,7 @@ |
||
483 | 483 | $step = ($maxValue - $minValue) / self::MAX_STEPS; |
484 | 484 | } |
485 | 485 | $values = []; |
486 | - for ($i = $minValue;$i <= $maxValue;$i += $step) { |
|
486 | + for ($i = $minValue; $i <= $maxValue; $i += $step) { |
|
487 | 487 | $values[] = $i; |
488 | 488 | } |
489 | 489 | // Add max if it's not in the array because of step |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | { |
461 | 461 | if ($this->_items) { |
462 | 462 | $n = $this->_items->getCount(); |
463 | - for ($i = 0;$i < $n;++$i) { |
|
463 | + for ($i = 0; $i < $n; ++$i) { |
|
464 | 464 | if ($this->_items->itemAt($i)->getSelected()) { |
465 | 465 | return $i; |
466 | 466 | } |
@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | $selections = []; |
498 | 498 | if ($this->_items) { |
499 | 499 | $n = $this->_items->getCount(); |
500 | - for ($i = 0;$i < $n;++$i) { |
|
500 | + for ($i = 0; $i < $n; ++$i) { |
|
501 | 501 | if ($this->_items->itemAt($i)->getSelected()) { |
502 | 502 | $selections[] = $i; |
503 | 503 | } |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | */ |
387 | 387 | protected function getTokenImageOptions() |
388 | 388 | { |
389 | - $privateKey = $this->getPrivateKey(); // call this method to ensure private key is generated |
|
389 | + $privateKey = $this->getPrivateKey(); // call this method to ensure private key is generated |
|
390 | 390 | $token = $this->getToken(); |
391 | 391 | $options = []; |
392 | 392 | $options['publicKey'] = $this->getPublicKey(); |
@@ -473,7 +473,7 @@ discard block |
||
473 | 473 | $hexLength = strlen($hex); |
474 | 474 | $base = strlen($alphabet); |
475 | 475 | $result = ''; |
476 | - for ($i = 0;$i < $hexLength;$i += 6) { |
|
476 | + for ($i = 0; $i < $hexLength; $i += 6) { |
|
477 | 477 | $number = hexdec(substr($hex, $i, 6)); |
478 | 478 | while ($number) { |
479 | 479 | $result .= $alphabet[$number % $base]; |
@@ -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) { |
@@ -410,7 +410,7 @@ |
||
410 | 410 | public function onPreRender($param) |
411 | 411 | { |
412 | 412 | parent::onPreRender($param); |
413 | - $this->getActiveView(); // determine the active view |
|
413 | + $this->getActiveView(); // determine the active view |
|
414 | 414 | $this->registerStyleSheet(); |
415 | 415 | } |
416 | 416 |