From 6483442c32bfc20ad972dfcd77da7429fa52fdc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sun, 11 Sep 2022 22:57:38 +0200 Subject: [PATCH 1/2] Enhancement: Enable and configure increment_style fixer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Andreas Möller Co-authored-by: Mathias Reker --- .php-cs-fixer.php | 3 +++ 1 file changed, 3 insertions(+) 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, From 03870a797493fb37b082931ff5d3204dc2c6af71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Mon, 12 Sep 2022 15:06:54 +0200 Subject: [PATCH 2/2] Fix: Run 'make coding-standards' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Andreas Möller Co-authored-by: Mathias Reker --- include/layout.inc | 2 +- src/News/Entry.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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));