Skip to content

Commit

Permalink
Fix file scanning (thecodingmachine#485)
Browse files Browse the repository at this point in the history
$path in a SplPathInfo object and we expect strings
  • Loading branch information
shish authored Dec 2, 2024
1 parent 92c0443 commit a162aad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions generator/src/Scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,13 @@ public function getMethods(array $paths): ScannerResponse
$ignoredModules = $this->getIgnoredModules();
$ignoredModules = \array_combine($ignoredModules, $ignoredModules);
foreach ($paths as $path) {
$module = \basename(\dirname($path, 2));
$module = \basename(\dirname($path->getPath()));

if (isset($ignoredModules[$module])) {
continue;
}

$docPage = new DocPage($path);
$docPage = new DocPage($path->getPathname());
$isFalsy = $docPage->detectFalsyFunction();
$isNullsy = $docPage->detectNullsyFunction();
$isEmpty = $docPage->detectEmptyFunction();
Expand Down

0 comments on commit a162aad

Please sign in to comment.