Skip to content

Commit 269cfd5

Browse files
authored
Enhancement: Enable elseif fixer (#859)
1 parent d713252 commit 269cfd5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.php-cs-fixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
'spacing' => 'one',
2929
],
3030
'constant_case' => true,
31+
'elseif' => true,
3132
'increment_style' => [
3233
'style' => 'post',
3334
],

include/layout.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ function sect_to_file($string) {
212212
$feat = "features.$string.php";
213213
$struct = "control-structures.$string.php";
214214
if (@is_file($func)) return $func;
215-
else if (@is_file($chap)) return $chap;
216-
else if (@is_file($feat)) return $feat;
217-
else if (@is_file($struct)) return $struct;
215+
elseif (@is_file($chap)) return $chap;
216+
elseif (@is_file($feat)) return $feat;
217+
elseif (@is_file($struct)) return $struct;
218218
else return "$string.php";
219219
}
220220

0 commit comments

Comments
 (0)