Skip to content

Commit

Permalink
Update MatrixServiceProvider.php
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
  • Loading branch information
ghostwriter committed Jan 17, 2023
1 parent 8f02d31 commit 2c2b7ae
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/ServiceProvider/MatrixServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@ public function __invoke(ContainerInterface $container): void
->sortByName();

foreach ($finder->getIterator() as $splFileInfo) {
$tool = sprintf(
'%s%s',
str_replace('ServiceProvider', 'Tool', __NAMESPACE__ . '\\'),
$splFileInfo->getBasename('.php')
$container->bind(
sprintf(
'%s%s',
str_replace('ServiceProvider', 'Tool', __NAMESPACE__ . '\\'),
$splFileInfo->getBasename('.php')
),
null,
[Tool::class]
);

$container->bind($tool, $tool, [Tool::class]);
}
}
}

0 comments on commit 2c2b7ae

Please sign in to comment.