From 269cfd55c0ac549893cca90b4b14df41a4f8bac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 6 Dec 2023 14:45:36 +0100 Subject: [PATCH] Enhancement: Enable `elseif` fixer (#859) --- .php-cs-fixer.php | 1 + include/layout.inc | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 542a8c71b..2d03dc700 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -28,6 +28,7 @@ $config 'spacing' => 'one', ], 'constant_case' => true, + 'elseif' => true, 'increment_style' => [ 'style' => 'post', ], diff --git a/include/layout.inc b/include/layout.inc index 563ed8bad..dcbc72029 100644 --- a/include/layout.inc +++ b/include/layout.inc @@ -212,9 +212,9 @@ function sect_to_file($string) { $feat = "features.$string.php"; $struct = "control-structures.$string.php"; if (@is_file($func)) return $func; - else if (@is_file($chap)) return $chap; - else if (@is_file($feat)) return $feat; - else if (@is_file($struct)) return $struct; + elseif (@is_file($chap)) return $chap; + elseif (@is_file($feat)) return $feat; + elseif (@is_file($struct)) return $struct; else return "$string.php"; }