Skip to content
This repository was archived by the owner on Jul 12, 2020. It is now read-only.

Commit 8b3510c

Browse files
committed
fix PhpClassName::getNamespace() on Windows
1 parent af25ab6 commit 8b3510c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/QafooLabs/Refactoring/Domain/Model/PhpClassName.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace QafooLabs\Refactoring\Domain\Model;
44

55
/**
6-
* Abstraction fo php class names based on a file.
6+
* Abstraction for php class names based on a file.
77
*/
88
class PhpClassName
99
{
@@ -16,7 +16,7 @@ public function __construct(File $file)
1616

1717
public function getNamespace()
1818
{
19-
$parts = explode("/", $this->file->getRelativePath());
19+
$parts = explode(DIRECTORY_SEPARATOR, ltrim($this->file->getRelativePath(), DIRECTORY_SEPARATOR));
2020
$namespace = array();
2121

2222
foreach ($parts as $part) {

0 commit comments

Comments
 (0)