File tree Expand file tree Collapse file tree 1 file changed +6
-23
lines changed Expand file tree Collapse file tree 1 file changed +6
-23
lines changed Original file line number Diff line number Diff line change @@ -25,49 +25,32 @@ final class Key
25
25
/**
26
26
* @param string $resource
27
27
*/
28
- public function __construct ($ resource )
28
+ public function __construct (string $ resource )
29
29
{
30
- $ this ->resource = ( string ) $ resource ;
30
+ $ this ->resource = $ resource ;
31
31
}
32
32
33
33
public function __toString ()
34
34
{
35
35
return $ this ->resource ;
36
36
}
37
37
38
- /**
39
- * @param string $stateKey
40
- *
41
- * @return bool
42
- */
43
- public function hasState ($ stateKey )
38
+ public function hasState (string $ stateKey ): bool
44
39
{
45
40
return isset ($ this ->state [$ stateKey ]);
46
41
}
47
42
48
- /**
49
- * @param string $stateKey
50
- * @param mixed $state
51
- */
52
- public function setState ($ stateKey , $ state )
43
+ public function setState (string $ stateKey , $ state ): void
53
44
{
54
45
$ this ->state [$ stateKey ] = $ state ;
55
46
}
56
47
57
- /**
58
- * @param string $stateKey
59
- */
60
- public function removeState ($ stateKey )
48
+ public function removeState (string $ stateKey ): void
61
49
{
62
50
unset($ this ->state [$ stateKey ]);
63
51
}
64
52
65
- /**
66
- * @param $stateKey
67
- *
68
- * @return mixed
69
- */
70
- public function getState ($ stateKey )
53
+ public function getState (string $ stateKey )
71
54
{
72
55
return $ this ->state [$ stateKey ];
73
56
}
You can’t perform that action at this time.
0 commit comments