diff --git a/tests/apps.php b/tests/apps.php index f8bb86ff57c7b..cd173fff5d5e9 100644 --- a/tests/apps.php +++ b/tests/apps.php @@ -6,34 +6,34 @@ * See the COPYING-README file. */ -function loadDirectory($path) { +function loadDirectory($path): void { if (strpos($path, 'integration')) { return; } - + if (strpos($path, 'Integration')) { return; } - + if (! $dh = opendir($path)) { return; } - + while ($name = readdir($dh)) { if ($name[0] === '.') { continue; } - + $file = $path . '/' . $name; if (is_dir($file)) { loadDirectory($file); - } elseif (substr($name, -4, 4) === '.php') { + } elseif (str_ends_with($name, '.php')) { require_once $file; } } } -function getSubclasses($parentClassName) { +function getSubclasses($parentClassName): array { $classes = []; foreach (get_declared_classes() as $className) { if (is_subclass_of($className, $parentClassName)) {