Skip to content

Commit 0a7e42e

Browse files
style: strictly type parameters
1 parent 869ab67 commit 0a7e42e

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/ActiveState.php

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,8 @@ public function matchesResource(string $resourceClass, string|ResourceState $sta
7878
/**
7979
* Get the current state for a resource.
8080
* If no resource class is provided, returns the shared state.
81-
*
82-
* @param string|null $resourceClass
8381
*/
84-
public function get($resourceClass = null): string
82+
public function get(?string $resourceClass = null): string
8583
{
8684
if ($resourceClass === null) {
8785
return $this->getShared();
@@ -93,11 +91,8 @@ public function get($resourceClass = null): string
9391
/**
9492
* Set the current state for a resource.
9593
* If no resource class is provided, sets the shared state.
96-
*
97-
* @param string|ResourceState $state
98-
* @param string|null $resourceClass
9994
*/
100-
public function set($state, $resourceClass = null): void
95+
public function set(string|ResourceState $state, ?string $resourceClass = null): void
10196
{
10297
$state = $this->resolveState($state);
10398

@@ -111,11 +106,8 @@ public function set($state, $resourceClass = null): void
111106
/**
112107
* Check if the current state matches the given state for a resource.
113108
* If no resource class is provided, checks against the shared state.
114-
*
115-
* @param string|ResourceState $state
116-
* @param string|null $resourceClass
117109
*/
118-
public function matches($state, $resourceClass = null): bool
110+
public function matches(string|ResourceState $state, ?string $resourceClass = null): bool
119111
{
120112
$state = $this->resolveState($state);
121113

0 commit comments

Comments
 (0)