Skip to content

Commit 85aac65

Browse files
committed
Sync namesapce and path
simplify finder lookup
1 parent 335c525 commit 85aac65

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/Util/Logfile/AbstractReader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ public static function autoloadCustomReaders($clazz)
5454
private static function getCustomReaders()
5555
{
5656
$finder = Finder::create()->in(__DIR__.DIRECTORY_SEPARATOR.'Custom');
57-
array_map(array($finder, 'name'), array('*.php'));
57+
$finder->name('*.php');
5858

5959
$readers = array();
6060
foreach ($finder as $file) {
61-
$clazz = __NAMESPACE__.'\\'.$file->getBasename('.php');
61+
$clazz = __NAMESPACE__.'\\Custom\\'.$file->getBasename('.php');
6262
$readers[] = new $clazz;
6363
}
6464
return $readers;

src/Util/Logfile/Custom/NginxCustomLogFormatReader.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
*
77
* Released under the MIT license
88
*/
9-
namespace UAParser\Util\Logfile;
9+
namespace UAParser\Util\Logfile\Custom;
10+
11+
use UAParser\Util\Logfile\AbstractReader;
1012

1113
class NginxCustomLogFormatReader extends AbstractReader
1214
{

0 commit comments

Comments
 (0)