Skip to content

Commit

Permalink
Adds further improvements.
Browse files Browse the repository at this point in the history
Signed-off-by: Faraz Samapoor <[email protected]>
Signed-off-by: Faraz Samapoor <[email protected]>
  • Loading branch information
Faraz Samapoor authored and fsamapoor committed Aug 15, 2023
1 parent 4d82b62 commit fde2102
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/apps.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit fde2102

Please sign in to comment.