Short syntax for applied operation.

This commit is contained in:
Yuriy Pikhtarev 2017-05-05 01:07:16 +03:00
parent a4965bfe3e
commit a391e21f13
No known key found for this signature in database
GPG key ID: 3A9B5A757B48ECC6
5 changed files with 8 additions and 8 deletions

View file

@ -964,7 +964,7 @@ function get_prev_root_forum_id($forums, $curr_forum_order)
if (isset($forums[$i]) && !$forums[$i]['forum_parent']) { if (isset($forums[$i]) && !$forums[$i]['forum_parent']) {
return $forums[$i]['forum_id']; return $forums[$i]['forum_id'];
} }
$i = $i - 10; $i -= 10;
} }
return false; return false;
@ -979,7 +979,7 @@ function get_next_root_forum_id($forums, $curr_forum_order)
if (isset($forums[$i]) && !$forums[$i]['forum_parent']) { if (isset($forums[$i]) && !$forums[$i]['forum_parent']) {
return $forums[$i]['forum_id']; return $forums[$i]['forum_id'];
} }
$i = $i + 10; $i += 10;
} }
return false; return false;

View file

@ -3175,7 +3175,7 @@ class Text_LangCorrect
$ss = ' ' . $ss; $ss = ' ' . $ss;
} #beginning of word } #beginning of word
elseif ($pos === $limit - 1) { elseif ($pos === $limit - 1) {
$ss = $ss . ' '; $ss .= ' ';
} #ending of word } #ending of word
if (array_key_exists($ss, $this->bigrams)) { if (array_key_exists($ss, $this->bigrams)) {
return true; return true;

View file

@ -170,7 +170,7 @@ class ReflectionTypeHint
// Dummy frame before call_user_func*() frames. // Dummy frame before call_user_func*() frames.
if (!isset($t['file']) && $next) { if (!isset($t['file']) && $next) {
$t['over_function'] = $trace[$i + 1]['function']; $t['over_function'] = $trace[$i + 1]['function'];
$t = $t + $trace[$i + 1]; $t += $trace[$i + 1];
$trace[$i + 1] = null; // skip call_user_func on next iteration $trace[$i + 1] = null; // skip call_user_func on next iteration
} }

View file

@ -124,7 +124,7 @@ class sitemap
if ($page) { if ($page) {
--$page; --$page;
$page = $page * 40000; $page *= 40000;
$this->limit = " LIMIT {$page},40000"; $this->limit = " LIMIT {$page},40000";
} else { } else {
if ($this->limit < 1) { if ($this->limit < 1) {

View file

@ -855,7 +855,7 @@ function declension($int, $expressions, $format = '%1$s %2$s')
if ($count >= 5 && $count <= 20) { if ($count >= 5 && $count <= 20) {
$result = $expressions['2']; $result = $expressions['2'];
} else { } else {
$count = $count % 10; $count %= 10;
if ($count == 1) { if ($count == 1) {
$result = $expressions['0']; $result = $expressions['0'];
} elseif ($count >= 2 && $count <= 4) { } elseif ($count >= 2 && $count <= 4) {
@ -920,12 +920,12 @@ function humn_size($size, $rounder = null, $min = null, $space = '&nbsp;')
$rnd = $rounders[0]; $rnd = $rounders[0];
if ($min == 'KB' && $size < 1024) { if ($min == 'KB' && $size < 1024) {
$size = $size / 1024; $size /= 1024;
$ext = 'KB'; $ext = 'KB';
$rounder = 1; $rounder = 1;
} else { } else {
for ($i = 1, $cnt = count($sizes); ($i < $cnt && $size >= 1024); $i++) { for ($i = 1, $cnt = count($sizes); ($i < $cnt && $size >= 1024); $i++) {
$size = $size / 1024; $size /= 1024;
$ext = $sizes[$i]; $ext = $sizes[$i];
$rnd = $rounders[$i]; $rnd = $rounders[$i];
} }