mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-09 13:47:17 +02:00
Fix code style
This commit is contained in:
parent
82470738e4
commit
b47fc318a5
2 changed files with 7 additions and 5 deletions
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue