Skip to content

Commit be7ca15

Browse files
committed
refactor: change parameter order
1 parent 8522e99 commit be7ca15

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

system/HTTP/SiteURIFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717

1818
class SiteURIFactory
1919
{
20-
private Superglobals $superglobals;
2120
private App $appConfig;
21+
private Superglobals $superglobals;
2222

23-
public function __construct(Superglobals $superglobals, App $appConfig)
23+
public function __construct(App $appConfig, Superglobals $superglobals)
2424
{
25-
$this->superglobals = $superglobals;
2625
$this->appConfig = $appConfig;
26+
$this->superglobals = $superglobals;
2727
}
2828

2929
/**

tests/system/HTTP/SiteURIFactoryDetectRoutePathTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private function createSiteURIFactory(array $server, ?App $appConfig = null): Si
3838
$_SERVER = $server;
3939
$superglobals = new Superglobals();
4040

41-
return new SiteURIFactory($superglobals, $appConfig);
41+
return new SiteURIFactory($appConfig, $superglobals);
4242
}
4343

4444
public function testDefault()

tests/system/HTTP/SiteURIFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ private function createSiteURIFactory(?App $config = null, ?Superglobals $superg
3636
$config ??= new App();
3737
$superglobals ??= new Superglobals();
3838

39-
return new SiteURIFactory($superglobals, $config);
39+
return new SiteURIFactory($config, $superglobals);
4040
}
4141

4242
public function testCreateFromGlobals()

0 commit comments

Comments
 (0)