Skip to content

Commit

Permalink
fix issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mimmi20 committed Oct 29, 2023
1 parent 9fe73c7 commit 01d76fc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 25 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
"phpstan/phpstan-deprecation-rules": "^1.1.4",
"phpstan/phpstan-phpunit": "^1.3.15",
"phpunit/phpunit": "^10.4.1",
"rector/rector": "^0.18.6",
"vimeo/psalm": "^5.15.0"
"rector/rector": "^0.18.6"
},
"suggest": {
"laminas/laminas-modulemanager": "Required for Module Integration",
Expand Down
18 changes: 0 additions & 18 deletions psalm.xml

This file was deleted.

3 changes: 1 addition & 2 deletions src/Router/HostName.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
use function array_key_exists;
use function array_keys;
use function array_map;
use function array_merge;
use function assert;
use function count;
use function in_array;
Expand Down Expand Up @@ -146,7 +145,7 @@ public function match(Request $request): RouteMatch | null
$this->port = $uri->getPort();
$this->host = $host;

return new RouteMatch(array_merge($this->defaults, ['host' => rawurldecode($host)]));
return new RouteMatch([...$this->defaults, 'host' => rawurldecode($host)]);
}

/**
Expand Down
9 changes: 6 additions & 3 deletions tests/Router/HostNameFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected function setUp(): void
$this->object = new HostNameFactory();
}

/** @throws void */
/** @throws ServiceNotCreatedException */
public function testInvokeWithoutOptions(): void
{
$container = $this->getMockBuilder(ContainerInterface::class)->getMock();
Expand All @@ -44,7 +44,7 @@ public function testInvokeWithoutOptions(): void
($this->object)($container, 'test');
}

/** @throws void */
/** @throws ServiceNotCreatedException */
public function testInvokeFailed(): void
{
$container = $this->getMockBuilder(ContainerInterface::class)->getMock();
Expand All @@ -57,7 +57,10 @@ public function testInvokeFailed(): void
($this->object)($container, 'test', []);
}

/** @throws Exception */
/**
* @throws Exception
* @throws ServiceNotCreatedException
*/
public function testInvoke(): void
{
$container = $this->getMockBuilder(ContainerInterface::class)->getMock();
Expand Down

0 comments on commit 01d76fc

Please sign in to comment.