Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update class finder

  • Loading branch information...
commit e16cb16673b418857dee3f5b662deab164611fdb 1 parent 44cef67
@Herzult Herzult authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 Finder/ClassFinder.php
View
8 Finder/ClassFinder.php
@@ -18,16 +18,16 @@ public function __construct(Finder $finder = null, Filesystem $filesystem = null
public function findClasses($directory, $namespace)
{
+ if (false === $this->filesystem->exists($directory)) {
+ return array();
+ }
+
$classes = array();
$this->finder->files();
$this->finder->name('*.php');
$this->finder->in($directory);
- if (false === $this->filesystem->exists($directory)) {
- return $classes;
- }
-
foreach ($this->finder->getIterator() as $name) {
$baseName = substr($name, strlen($directory)+1, -4);
$baseClassName = str_replace('/', '\\', $baseName);
Please sign in to comment.
Something went wrong with that request. Please try again.