Fix code style

This commit is contained in:
Art4 2025-01-03 10:13:08 +00:00
parent 82470738e4
commit b47fc318a5
2 changed files with 7 additions and 5 deletions

View file

@ -27,7 +27,7 @@ final class AddonManager
public function __construct(string $addonPath, LoggerInterface $logger)
{
$this->addonPath = $addonPath;
$this->logger = $logger;
$this->logger = $logger;
}
public function bootstrapAddons(array $addonNames): void
@ -91,7 +91,7 @@ final class AddonManager
public function initAddons(array $dependencies): void
{
foreach ($this->addons as $addon) {
$required = $addon->getRequiredDependencies();
$required = $addon->getRequiredDependencies();
$addonDependencies = [];
foreach ($required as $dependency) {

View file

@ -20,7 +20,9 @@ use Psr\Log\LoggerInterface;
/**
* Helper interface to combine AddonBootstrap and DependencyProvider.
*/
interface CombinedAddonBootstrapDependencyProvider extends AddonBootstrap, DependencyProvider {}
interface CombinedAddonBootstrapDependencyProvider extends AddonBootstrap, DependencyProvider
{
}
class AddonProxyTest extends TestCase
{
@ -56,7 +58,7 @@ class AddonProxyTest extends TestCase
public function testInitAddonCallsBootstrap(): void
{
$bootstrap = $this->createMock(AddonBootstrap::class);
$bootstrap->expects($this->once())->method('initAddon')->willReturnCallback(function($event) {
$bootstrap->expects($this->once())->method('initAddon')->willReturnCallback(function ($event) {
$this->assertInstanceOf(AddonStartEvent::class, $event);
});
@ -69,7 +71,7 @@ class AddonProxyTest extends TestCase
{
$bootstrap = $this->createMock(AddonBootstrap::class);
$bootstrap->expects($this->once())->method('initAddon')->willReturnCallback(function(AddonStartEvent $event) {
$bootstrap->expects($this->once())->method('initAddon')->willReturnCallback(function (AddonStartEvent $event) {
$dependencies = $event->getDependencies();
$this->assertArrayHasKey(LoggerInterface::class, $dependencies);