diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 42c7e609c4..22a9275ef8 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -27,6 +27,9 @@ 'spacing' => 'one', ], 'constant_case' => true, + 'increment_style' => [ + 'style' => 'post', + ], 'indentation_type' => true, 'line_ending' => true, 'no_extra_blank_lines' => true, diff --git a/include/layout.inc b/include/layout.inc index acf9f27f22..27e2aa8fa3 100644 --- a/include/layout.inc +++ b/include/layout.inc @@ -404,7 +404,7 @@ function print_news($news, $dog, $max = 5, $onlyyear = null, $return = false) { foreach ($item["category"] as $category) { if (is_null($dog) || in_array($category["term"], (array)$dog, true)) { $ok = true; - ++$count; + $count++; break; } } diff --git a/src/News/Entry.php b/src/News/Entry.php index e2923a6709..838a56a2bd 100755 --- a/src/News/Entry.php +++ b/src/News/Entry.php @@ -183,7 +183,7 @@ private static function selectNextId(): string { $filename = date("Y-m-d", $_SERVER["REQUEST_TIME"]); $count = 0; do { - ++$count; + $count++; $id = $filename . "-" . $count; $basename = "{$id}.xml"; } while (file_exists(self::ARCHIVE_ENTRIES_ABS . $basename));