mirror of
https://github.com/danog/class-finder.git
synced 2024-11-30 04:29:03 +01:00
Fix PHP 5.3 compatibility
This commit is contained in:
parent
1428e1a0a6
commit
2f81fac230
@ -202,8 +202,9 @@ class PSR4Namespace
|
||||
return array_merge($carry, $arrayOfClasses);
|
||||
}, array());
|
||||
|
||||
$potentialClasses = array_map(function($file) use ($self) {
|
||||
return $self->namespace . str_replace('.php', '', $file);
|
||||
$selfNamespace = $this->namespace; // PHP 5.3 BC
|
||||
$potentialClasses = array_map(function($file) use ($self, $selfNamespace) {
|
||||
return $selfNamespace . str_replace('.php', '', $file);
|
||||
}, $potentialClassFiles);
|
||||
|
||||
return array_filter($potentialClasses, function($potentialClass) {
|
||||
|
Loading…
Reference in New Issue
Block a user