Skip to content

Commit 7334cf9

Browse files
committed
Use PHP 8.2 syntax sugar and fix issues reported by PHPStan
Signed-off-by: Roman Ondráček <[email protected]>
1 parent 205d6b0 commit 7334cf9

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

src/CommandLoader/ContainerCommandLoader.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,14 @@
1010
class ContainerCommandLoader implements CommandLoaderInterface
1111
{
1212

13-
private Container $container;
14-
15-
/** @var array<string> */
16-
private array $commandMap;
17-
1813
/**
1914
* @param array<string> $commandMap
2015
*/
21-
public function __construct(Container $container, array $commandMap)
16+
public function __construct(
17+
private readonly Container $container,
18+
private readonly array $commandMap,
19+
)
2220
{
23-
$this->container = $container;
24-
$this->commandMap = $commandMap;
2521
}
2622

2723
public function get(string $name): Command

src/Http/ConsoleRequestFactory.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@
99
class ConsoleRequestFactory extends RequestFactory
1010
{
1111

12-
private string $url;
13-
14-
public function __construct(string $url)
12+
public function __construct(
13+
private readonly string $url,
14+
)
1515
{
16-
$this->url = $url;
1716
}
1817

1918
public function fromGlobals(): Request

0 commit comments

Comments
 (0)