Skip to content

Commit

Permalink
refactor: change parameter order
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Jul 12, 2023
1 parent a131d6f commit b2e8c02
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions system/HTTP/SiteURIFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

class SiteURIFactory
{
private Superglobals $superglobals;
private App $appConfig;
private Superglobals $superglobals;

public function __construct(Superglobals $superglobals, App $appConfig)
public function __construct(App $appConfig, Superglobals $superglobals)
{
$this->superglobals = $superglobals;
$this->appConfig = $appConfig;
$this->superglobals = $superglobals;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/system/HTTP/SiteURIFactoryDetectRoutePathTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private function createSiteURIFactory(array $server, ?App $appConfig = null): Si
$_SERVER = $server;
$superglobals = new Superglobals();

return new SiteURIFactory($superglobals, $appConfig);
return new SiteURIFactory($appConfig, $superglobals);
}

public function testDefault()
Expand Down
2 changes: 1 addition & 1 deletion tests/system/HTTP/SiteURIFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private function createSiteURIFactory(?App $config = null, ?Superglobals $superg
$config ??= new App();
$superglobals ??= new Superglobals();

return new SiteURIFactory($superglobals, $config);
return new SiteURIFactory($config, $superglobals);
}

public function testCreateFromGlobals()
Expand Down

0 comments on commit b2e8c02

Please sign in to comment.