diff --git a/src/Command/Lint.php b/src/Command/Lint.php index 3b8525c4..60712911 100644 --- a/src/Command/Lint.php +++ b/src/Command/Lint.php @@ -126,6 +126,12 @@ protected function getFiles($filename, array $files, array $directories) // Get files from passed in options $search = $files; $paths = $this->laravel['view']->getFinder()->getPaths(); + $hints = $this->laravel['view']->getFinder()->getHints(); + if (is_array($hints) && !empty($hints)) { + $paths = array_reduce($hints, function ($package, $paths) { + return array_merge($paths, $package); + }, $paths); + } if (!empty($filename)) { $search[] = $filename; diff --git a/tests/Command/Lint/Base.php b/tests/Command/Lint/Base.php index ba007baa..abf5f87e 100644 --- a/tests/Command/Lint/Base.php +++ b/tests/Command/Lint/Base.php @@ -20,6 +20,7 @@ protected function getApplication(array $customConfig = []) $viewFinder = m::mock('Illuminate\View\ViewFinderInterface'); $viewFinder->shouldReceive('getPaths')->andReturn([]); // paths + $viewFinder->shouldReceive('getHints')->andReturn([]); // hints $viewFinder->shouldReceive('files')->andReturn($finder); $app['view'] = m::mock('Illuminate\View\Factory');