Skip to content

Commit e978556

Browse files
committed
Fix types
Signed-off-by: Alexander M. Turek <me@derrabus.de>
1 parent 5b86b7a commit e978556

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

Alias.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,15 @@
1515

1616
class Alias
1717
{
18-
private $id;
19-
private $deprecation = [];
18+
private string $id;
19+
private array $deprecation = [];
2020

2121
public function __construct(string $id)
2222
{
2323
$this->id = $id;
2424
}
2525

26-
/**
27-
* @return static
28-
*/
29-
public function withId(string $id): self
26+
public function withId(string $id): static
3027
{
3128
$new = clone $this;
3229

Loader/Configurator/AliasConfigurator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
class AliasConfigurator
1818
{
19-
private $alias;
19+
private Alias $alias;
2020

2121
public function __construct(Alias $alias)
2222
{
@@ -34,7 +34,7 @@ public function __construct(Alias $alias)
3434
*
3535
* @throws InvalidArgumentException when the message template is invalid
3636
*/
37-
public function deprecate(string $package, string $version, string $message): self
37+
public function deprecate(string $package, string $version, string $message): static
3838
{
3939
$this->alias->setDeprecated($package, $version, $message);
4040

0 commit comments

Comments
 (0)