Skip to content

Commit 96f1b1d

Browse files
committed
fix loadRenderers
1 parent 31c0c07 commit 96f1b1d

File tree

8 files changed

+14
-11
lines changed

8 files changed

+14
-11
lines changed

lib/PHPCfg/Parser.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ protected function loadHandlers(): void
9191
{
9292
$it = new RecursiveIteratorIterator(
9393
new RecursiveDirectoryIterator(
94-
__DIR__ . '/ParserHandler/',
95-
RecursiveIteratorIterator::LEAVES_ONLY
96-
)
94+
__DIR__ . '/ParserHandler/'
95+
),
96+
RecursiveIteratorIterator::LEAVES_ONLY
9797
);
9898
$handlers = [];
9999
foreach ($it as $file) {

lib/PHPCfg/Printer/Printer.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use PHPCfg\Op;
1818
use PHPCfg\Operand;
1919
use PHPCfg\Script;
20+
use FilesystemIterator;
2021
use RecursiveDirectoryIterator;
2122
use RecursiveIteratorIterator;
2223
use SplObjectStorage;
@@ -59,9 +60,11 @@ protected function loadRenderers(): void
5960
$it = new RecursiveIteratorIterator(
6061
new RecursiveDirectoryIterator(
6162
__DIR__ . '/Renderer/',
62-
RecursiveIteratorIterator::LEAVES_ONLY
63-
)
63+
FilesystemIterator::SKIP_DOTS
64+
),
65+
RecursiveIteratorIterator::CHILD_FIRST
6466
);
67+
6568
$handlers = [];
6669
foreach ($it as $file) {
6770
if (!$file->isFile() || $file->getExtension() !== 'php') {

lib/PHPCfg/Printer/Renderer/Op/Assertion.php renamed to lib/PHPCfg/Printer/Renderer/Specific/Op/Assertion.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @license MIT See LICENSE at the root of the project for more info
1010
*/
1111

12-
namespace PHPCfg\Printer\Renderer\Op;
12+
namespace PHPCfg\Printer\Renderer\Specific\Op;
1313

1414
use PHPCfg\Assertion as CoreAssertion;
1515
use PHPCfg\Op;

lib/PHPCfg/Printer/Renderer/Op/Include_.php renamed to lib/PHPCfg/Printer/Renderer/Specific/Op/Include_.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @license MIT See LICENSE at the root of the project for more info
1010
*/
1111

12-
namespace PHPCfg\Printer\Renderer\Op;
12+
namespace PHPCfg\Printer\Renderer\Specific\Op;
1313

1414
use PHPCfg\Op;
1515
use PHPCfg\Printer\Renderer\GenericOp;

lib/PHPCfg/Printer/Renderer/Op/TraitUse.php renamed to lib/PHPCfg/Printer/Renderer/Specific/Op/TraitUse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @license MIT See LICENSE at the root of the project for more info
1010
*/
1111

12-
namespace PHPCfg\Printer\Renderer\Op;
12+
namespace PHPCfg\Printer\Renderer\Specific\Op;
1313

1414
use PHPCfg\Op;
1515
use PHPCfg\Printer\Renderer\GenericOp;

lib/PHPCfg/Printer/Renderer/Operand/Literal.php renamed to lib/PHPCfg/Printer/Renderer/Specific/Operand/Literal.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @license MIT See LICENSE at the root of the project for more info
1010
*/
1111

12-
namespace PHPCfg\Printer\Renderer\Operand;
12+
namespace PHPCfg\Printer\Renderer\Specific\Operand;
1313

1414
use PHPCfg\Op;
1515
use PHPCfg\Operand;

lib/PHPCfg/Printer/Renderer/Operand/Temporary.php renamed to lib/PHPCfg/Printer/Renderer/Specific/Operand/Temporary.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @license MIT See LICENSE at the root of the project for more info
1010
*/
1111

12-
namespace PHPCfg\Printer\Renderer\Operand;
12+
namespace PHPCfg\Printer\Renderer\Specific\Operand;
1313

1414
use PHPCfg\Op;
1515
use PHPCfg\Operand;

lib/PHPCfg/Printer/Renderer/Operand/Variable.php renamed to lib/PHPCfg/Printer/Renderer/Specific/Operand/Variable.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* @license MIT See LICENSE at the root of the project for more info
1010
*/
1111

12-
namespace PHPCfg\Printer\Renderer\Operand;
12+
namespace PHPCfg\Printer\Renderer\Specific\Operand;
1313

1414
use LogicException;
1515
use PHPCfg\Op;

0 commit comments

Comments
 (0)