Skip to content

Commit aa480a1

Browse files
committed
Fix issue with Windows file paths
1 parent 81eceae commit aa480a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NamespaceString.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function getNamespace()
2727
{
2828
$namespace = '';
2929
$relativePath = str_replace($this->root, '', $this->fullFilePath);
30-
$relativePathParts = explode('/', $relativePath);
30+
$relativePathParts = explode(DIRECTORY_SEPARATOR, $relativePath);
3131
for ($i = 1; $i < count($relativePathParts) - 1; ++$i) {
3232
$namespace .= '\\'.$relativePathParts[$i];
3333
}

0 commit comments

Comments
 (0)