Skip to content
Permalink
Browse files

Remove usage of prefix increment operator.

This operator is less frequently used and can be harder to understand
than the more common suffix operator.

Refs #12019
  • Loading branch information...
markstory committed Apr 28, 2018
1 parent ad32913 commit 1cca695360a522deb93bbfd1eef3820c43ff540a
Showing with 6 additions and 5 deletions.
  1. +1 −1 src/Core/PluginCollection.php
  2. +1 −1 src/Filesystem/Folder.php
  3. +1 −1 src/Utility/Text.php
  4. +3 −2 src/View/Helper/HtmlHelper.php
@@ -131,7 +131,7 @@ public function get($name)
*/
public function next()
{
++$this->position;
$this->position++;
}
/**
@@ -662,7 +662,7 @@ public function dirsize()
$directory = Folder::slashTerm($this->path);
$stack = [$directory];
$count = count($stack);
for ($i = 0, $j = $count; $i < $j; ++$i) {
for ($i = 0, $j = $count; $i < $j; $i++) {
if (is_file($stack[$i])) {
$size += filesize($stack[$i]);
} elseif (is_dir($stack[$i])) {
@@ -138,7 +138,7 @@ public static function tokenize($data, $separator = ',', $leftBound = '(', $righ
}
}
}
$offset = ++$tmpOffset;
$offset = $tmpOffset++;
} else {
$results[] = $buffer . mb_substr($data, $offset);
$offset = $length + 1;
@@ -982,10 +982,11 @@ protected function _renderCells($line, $useCount = false)
}
if ($useCount) {
$i += 1;
if (isset($cellOptions['class'])) {
$cellOptions['class'] .= ' column-' . ++$i;
$cellOptions['class'] .= ' column-' . $i;
} else {
$cellOptions['class'] = 'column-' . ++$i;
$cellOptions['class'] = 'column-' . $i;
}
}

0 comments on commit 1cca695

Please sign in to comment.
You can’t perform that action at this time.