Skip to content

Commit

Permalink
Fix #20
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenvanassche committed Mar 13, 2024
1 parent c1ee013 commit 8178c93
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/StructureParsers/ReflectionStructureParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ public function execute(array $filenames): array
/** @return class-string */
protected function fullQualifiedClassNameFromFile(string $filename): string
{
$class = str_replace(
$this->config->reflectionBasePath,
'',
$filename
$class = preg_replace(
pattern: "#".preg_quote($this->config->reflectionBasePath)."#",
replacement: '',
subject: $filename,
limit: 1
);

$class = trim($class, DIRECTORY_SEPARATOR);
Expand Down

0 comments on commit 8178c93

Please sign in to comment.