This repository was archived by the owner on Jul 12, 2020. It is now read-only.
File tree 2 files changed +11
-5
lines changed
src/main/QafooLabs/Refactoring
Adapters/Symfony/Commands
2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ protected function configure()
60
60
61
61
protected function execute (InputInterface $ input , OutputInterface $ output )
62
62
{
63
- $ directory = new Directory ($ input ->getArgument ('dir ' ));
63
+ $ directory = new Directory ($ input ->getArgument ('dir ' ), getcwd () );
64
64
65
65
$ codeAnalysis = new StaticCodeAnalysis ();
66
66
$ phpNameScanner = new ParserPhpNameScanner ();
Original file line number Diff line number Diff line change @@ -29,17 +29,23 @@ class Directory
29
29
*/
30
30
private $ path ;
31
31
32
- public function __construct ($ path )
32
+ /**
33
+ * @var string
34
+ */
35
+ private $ workingDirectory ;
36
+
37
+ public function __construct ($ path , $ workingDirectory )
33
38
{
34
39
$ this ->path = $ path ;
40
+ $ this ->workingDirectory = $ workingDirectory ;
35
41
}
36
42
37
43
/**
38
44
* @return File[]
39
45
*/
40
46
public function findAllPhpFilesRecursivly ()
41
47
{
42
- $ workingPath = $ this ->path ;
48
+ $ workingDirectory = $ this ->workingDirectory ;
43
49
44
50
return
45
51
new CallbackTransformIterator (
@@ -52,8 +58,8 @@ function (SplFileInfo $file) {
52
58
return substr ($ file ->getFilename (), -4 ) === ".php " ;
53
59
}
54
60
),
55
- function ($ file ) use ($ workingPath ) {
56
- return File::createFromPath ($ file ->getPathname (), $ workingPath );
61
+ function ($ file ) use ($ workingDirectory ) {
62
+ return File::createFromPath ($ file ->getPathname (), $ workingDirectory );
57
63
}
58
64
)
59
65
;
You can’t perform that action at this time.
0 commit comments