Skip to content

Commit

Permalink
Fix "increment_style" CS (#9296)
Browse files Browse the repository at this point in the history
* Fix "increment_style" CS

* use "post" increment style
  • Loading branch information
mvorisek authored Jan 1, 2024
1 parent f509142 commit 86eda9f
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 14 deletions.
4 changes: 3 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@

// disable too destructive formating for now
'declare_strict_types' => false,
'increment_style' => [
'style' => 'post',
],
'no_useless_else' => false,
'phpdoc_no_empty_return' => false,
'psr_autoloading' => false,
Expand All @@ -94,7 +97,6 @@
'import_symbols' => false,
],
'general_phpdoc_annotation_remove' => false,
'increment_style' => false,
'method_argument_space' => false,
'modernize_types_casting' => false,
'new_with_parentheses' => false,
Expand Down
2 changes: 1 addition & 1 deletion plugins/archive/archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ function move_messages()

// jump back one page (user removed the whole last page)
if ($page > 1 && $remaining == 0) {
--$page;
$page--;
$storage->set_page($page);
$_SESSION['page'] = $page;
$jump_back = true;
Expand Down
2 changes: 1 addition & 1 deletion plugins/managesieve/lib/Roundcube/rcube_sieve_script.php
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ private function _parse_text($script)
if ($endl === false) {
$endl = $length;
} elseif ($script[$endl - 1] === "\r") {
--$endl;
$endl--;
}
$line = substr($script, $position, $endl - $position);

Expand Down
2 changes: 1 addition & 1 deletion plugins/zipdownload/zipdownload.php
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ public function filter($in, $out, &$consumed, $closing)
// messages are read line by line
if (preg_match('/^>*From /', $bucket->data)) {
$bucket->data = '>' . $bucket->data;
++$bucket->datalen;
$bucket->datalen++;
}

$consumed += $bucket->datalen;
Expand Down
2 changes: 1 addition & 1 deletion program/actions/mail/check_recent.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function run($args = [])
if ($all_count && $page > 1) {
$remaining = $all_count - $page_size * ($page - 1);
if ($remaining <= 0) {
--$page;
$page--;
$rcmail->storage->set_page($page);
$_SESSION['page'] = $page;
}
Expand Down
2 changes: 1 addition & 1 deletion program/actions/mail/delete.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function run($args = [])

// jump back one page (user removed the whole last page)
if ($page > 1 && $remaining == 0) {
--$page;
$page--;
$rcmail->storage->set_page($page);
$_SESSION['page'] = $page;
$jump_back = true;
Expand Down
2 changes: 1 addition & 1 deletion program/actions/mail/mark.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function run($args = [])

// jump back one page (user removed the whole last page)
if ($page > 1 && $remaining == 0) {
--$page;
$page--;
$rcmail->storage->set_page($page);
$_SESSION['page'] = $page;
$jump_back = true;
Expand Down
2 changes: 1 addition & 1 deletion program/actions/mail/move.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function run($args = [])

// jump back one page (user removed the whole last page)
if ($page > 1 && $remaining == 0) {
--$page;
$page--;
$rcmail->storage->set_page($page);
$_SESSION['page'] = $page;
$jump_back = true;
Expand Down
4 changes: 2 additions & 2 deletions program/lib/Roundcube/rcube_imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ public function folder_status($folder = null, &$diff = [])

// got new messages
if ($new['maxuid'] > $old['maxuid']) {
++$result;
$result++;
// get new message UIDs range, that can be used for example
// to get the data of these messages
$diff['new'] = ($old['maxuid'] + 1 < $new['maxuid'] ? ($old['maxuid'] + 1) . ':' : '') . $new['maxuid'];
Expand Down Expand Up @@ -2189,7 +2189,7 @@ protected function structure_part($part, $count = 0, $parent = '', $mime_headers
// read part disposition
$di = 8;
if ($struct->ctype_primary == 'text') {
++$di;
$di++;
}
elseif ($struct->mimetype == 'message/rfc822') {
$di += 3;
Expand Down
6 changes: 3 additions & 3 deletions program/lib/Roundcube/rcube_tnef_decoder.php
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ protected function _decompressRTF($data, $size)

for ($cnt = 0; $cnt < $length_preload; $cnt++) {
$uncomp .= $preload[$cnt];
++$out;
$out++;
}

while ($out < ($size + $length_preload)) {
Expand All @@ -559,12 +559,12 @@ protected function _decompressRTF($data, $size)

while ($offset < $end) {
$uncomp .= $uncomp[$offset++];
++$out;
$out++;
}
}
else {
$uncomp .= $data[$in++];
++$out;
$out++;
}
}

Expand Down
2 changes: 1 addition & 1 deletion program/lib/Roundcube/rcube_vcard.php
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ private static function vcard_unquote($str, $sep = ';')
$str = substr_replace($str, '', $pos, 1);
}

++$pos;
$pos++;
}

return $str;
Expand Down

0 comments on commit 86eda9f

Please sign in to comment.