@@ -63,6 +63,9 @@ discard block |
||
| 63 | 63 | $this->dir = getcwd(); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | + /** |
|
| 67 | + * @param string $errorType |
|
| 68 | + */ |
|
| 66 | 69 | protected function errorCondtion($msg, $errorType) |
| 67 | 70 | { |
| 68 | 71 | $this->errorConditions[$msg] = $errorType; |
@@ -110,7 +113,7 @@ discard block |
||
| 110 | 113 | } |
| 111 | 114 | |
| 112 | 115 | /** |
| 113 | - * @param array $argv |
|
| 116 | + * @param string[] $argv |
|
| 114 | 117 | * @param null|string $appName |
| 115 | 118 | * @param null|string $appVersion |
| 116 | 119 | * @param null|\Symfony\Component\Console\Output\OutputInterface $output |
@@ -133,7 +136,7 @@ discard block |
||
| 133 | 136 | * @param null|\Symfony\Component\Console\Input\InputInterface $input |
| 134 | 137 | * @param null|\Symfony\Component\Console\Output\OutputInterface $output |
| 135 | 138 | * @param null|\Robo\Application $app |
| 136 | - * @param array[] $commandFiles |
|
| 139 | + * @param null|string $commandFiles |
|
| 137 | 140 | * @param null|ClassLoader $classLoader |
| 138 | 141 | * |
| 139 | 142 | * @return int |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | public function testGetClasses() |
| 12 | 12 | { |
| 13 | 13 | $classLoader = new ClassLoader(); |
| 14 | - $classLoader->addPsr4('\\Robo\\', [realpath(__DIR__.'/../../src')]); |
|
| 14 | + $classLoader->addPsr4('\\Robo\\', [realpath(__DIR__ . '/../../src')]); |
|
| 15 | 15 | |
| 16 | 16 | $discovery = new RelativeNamespaceDiscovery('\Commands'); |
| 17 | 17 | $discovery->setClassLoader($classLoader); |
@@ -91,8 +91,8 @@ |
||
| 91 | 91 | { |
| 92 | 92 | $finder = new Finder(); |
| 93 | 93 | $finder->files() |
| 94 | - ->name($pattern) |
|
| 95 | - ->in($directories); |
|
| 94 | + ->name($pattern) |
|
| 95 | + ->in($directories); |
|
| 96 | 96 | |
| 97 | 97 | return $finder; |
| 98 | 98 | } |
@@ -56,17 +56,17 @@ |
||
| 56 | 56 | foreach ($this->getClassLoader()->getPrefixesPsr4() as $baseNamespace => $directories) { |
| 57 | 57 | $path = $this->getRelativeNamespacePath(); |
| 58 | 58 | |
| 59 | - $directories = array_map(function ($directory) use ($path) { |
|
| 60 | - return $directory.$path; |
|
| 59 | + $directories = array_map(function($directory) use ($path) { |
|
| 60 | + return $directory . $path; |
|
| 61 | 61 | }, $directories); |
| 62 | 62 | |
| 63 | - $directories = array_filter($directories, function ($path) { |
|
| 63 | + $directories = array_filter($directories, function($path) { |
|
| 64 | 64 | return is_dir($path); |
| 65 | 65 | }); |
| 66 | 66 | |
| 67 | 67 | foreach ($this->search($directories, $this->searchPattern) as $file) { |
| 68 | 68 | $relativePathName = $file->getRelativePathname(); |
| 69 | - $classes[] = $baseNamespace.str_replace(['/', '.php'], ['\\', ''], $relativePathName); |
|
| 69 | + $classes[] = $baseNamespace . str_replace(['/', '.php'], ['\\', ''], $relativePathName); |
|
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | return $classes; |