Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/MultiAuthPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,9 @@ class MultiAuthPlugin implements PluginInterface, EventSubscriberInterface, Capa
protected IOInterface $io;
protected AuthManager $authManager;
protected RequestModifier $requestModifier;

public function __construct(
protected Arr $arr,
protected Str $str,
protected Factory $factory
) {
}
protected Factory $factory;
protected Arr $arr;
protected Str $str;

/**
* @inheritDoc
Expand All @@ -36,8 +32,12 @@ public function activate(Composer $composer, IOInterface $io): void
{
$this->composer = $composer;
$this->io = $io;
$this->factory = new Factory();

$this->authManager = $this->factory->makeAuthManager($composer->getConfig());
$this->requestModifier = $this->factory->makeRequestModifier();
$this->arr = $this->factory->makeArr();
$this->str = $this->factory->makeStr();
}

/**
Expand Down
10 changes: 7 additions & 3 deletions src/RequestModifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@

class RequestModifier
{
public function __construct(
protected Str $str
) {
/**
* Create a new Request Modifier instance.
*/
public function __construct(protected Str $str)
{
//
}

/**
* Build HTTP headers from resolved credentials.
*
Expand Down
2 changes: 1 addition & 1 deletion tests/MultiAuthPluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class MultiAuthPluginTest extends TestCase

protected function getPlugin(): MultiAuthPlugin
{
return new MultiAuthPlugin(new Arr(), new Str(), new Factory());
return new MultiAuthPlugin();
}

public function test_plugin_registers_events_and_commands(): void
Expand Down