Skip to content

Commit 033d63c

Browse files
committed
Use canonical workspace dir
1 parent 1062454 commit 033d63c

File tree

9 files changed

+24
-32
lines changed

9 files changed

+24
-32
lines changed

.php_cs.dist

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->in('lib')
5+
->in('tests')
6+
->exclude([
7+
'Integration/Composer/project'
8+
])
9+
;
10+
11+
return PhpCsFixer\Config::create()
12+
->setRules([
13+
'@PSR2' => true,
14+
'no_unused_imports' => true,
15+
'array_syntax' => ['syntax' => 'short'],
16+
])
17+
->setFinder($finder)
18+
;
19+

lib/Adapter/Simple/ClassScanner.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ public function getClassNameFromFile($file)
2121

2222
if (false === $fp) {
2323
throw new RuntimeException(sprintf(
24-
'Could not open file "%s"', $file
24+
'Could not open file "%s"',
25+
$file
2526
));
2627
}
2728

tests/Integration/IntegrationTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ protected function initWorkspace()
1919

2020
protected function workspacePath()
2121
{
22-
return __DIR__.'/workspace';
22+
return __DIR__.'/../Workspace';
2323
}
2424
}

tests/Integration/Simple/SimpleClassToFileTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public function testClassToFile()
2626
$candidates = $this->classToFile->classToFileCandidates(ClassName::fromString('Acme\\Foobar'));
2727

2828
$this->assertEquals(FilePathCandidates::fromFilePaths([
29-
FilePath::fromString(__DIR__ . '/../workspace/lib/Foobar.php')
29+
FilePath::fromString(__DIR__ . '/../../Workspace/lib/Foobar.php')
3030
]), $candidates);
3131
}
3232

@@ -35,7 +35,7 @@ public function testClassToFileDeeper()
3535
$candidates = $this->classToFile->classToFileCandidates(ClassName::fromString('Acme\\NamespaceHere\\Hallo'));
3636

3737
$this->assertEquals(FilePathCandidates::fromFilePaths([
38-
FilePath::fromString(__DIR__ . '/../workspace/lib/NamespaceHere/Hallo.php')
38+
FilePath::fromString(__DIR__ . '/../../Workspace/lib/NamespaceHere/Hallo.php')
3939
]), $candidates);
4040
}
4141

tests/Integration/workspace/lib/Foobar.php

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/Integration/workspace/lib/FoobarInterface.php

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/Integration/workspace/lib/FoobarTrait.php

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/Integration/workspace/lib/NamespaceHere/Hallo.php

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/Integration/workspace/lib/NoClasses.php

Whitespace-only changes.

0 commit comments

Comments
 (0)