diff --git a/Annotation/Annotation.php b/Annotation/Annotation.php index 608c5d36..7c17999c 100644 --- a/Annotation/Annotation.php +++ b/Annotation/Annotation.php @@ -80,16 +80,11 @@ class Annotation extends Component $this->_annotations[$alias] = []; } foreach ($paths as $path) { + if (!str_contains('.php', $path)) { + continue; + } $explode = explode('/', $path); - $isPhp = strpos('.php', $path); - if ($isPhp === false) { - continue; - } - if (strlen($path) - 4 != $isPhp) { - continue; - } - $explode_pop = array_pop($explode); if (is_file($path)) { $explode_pop = str_replace('.php', '', $explode_pop);