Skip to content

Commit

Permalink
Separate chain calls (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
sankaest authored May 22, 2022
1 parent 40aeedd commit 97a5fd3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/Classifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ public function find(): iterable
*/
private function scanFiles(): void
{
$files = (new Finder())->in($this->directory)->name('*.php')->sortByName()->files();
$files = (new Finder())
->in($this->directory)
->name('*.php')
->sortByName()
->files();

foreach ($files as $file) {
require_once $file;
Expand Down
4 changes: 3 additions & 1 deletion tests/FinderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ public function testAttributes(string|array $attributes, array $expectedClasses)
public function testMixed(array $attributes, array $interfaces, array $expectedClasses)
{
$finder = new Classifier(__DIR__);
$finder = $finder->withAttribute($attributes)->withInterface($interfaces);
$finder = $finder
->withAttribute($attributes)
->withInterface($interfaces);

$result = $finder->find();

Expand Down

0 comments on commit 97a5fd3

Please # to comment.