File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed
Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -27,16 +27,15 @@ class SleeperHandler{
2727 * @var ThreadSafeArray
2828 * @phpstan-var ThreadSafeArray<int, int>
2929 */
30- private $ sharedObject ;
30+ private readonly ThreadSafeArray $ sharedObject ;
3131
3232 /**
3333 * @var \Closure[]
3434 * @phpstan-var array<int, \Closure() : void>
3535 */
36- private $ handlers = [];
36+ private array $ handlers = [];
3737
38- /** @var int */
39- private $ nextSleeperId = 0 ;
38+ private int $ nextSleeperId = 0 ;
4039
4140 public function __construct (){
4241 $ this ->sharedObject = new ThreadSafeArray ();
Original file line number Diff line number Diff line change @@ -39,8 +39,8 @@ final class SleeperHandlerEntry extends ThreadSafe{
3939 * @phpstan-param ThreadSafeArray<int, int> $sharedObject
4040 */
4141 public function __construct (
42- private ThreadSafeArray $ sharedObject ,
43- private int $ id
42+ private readonly ThreadSafeArray $ sharedObject ,
43+ private readonly int $ id
4444 ){}
4545
4646 final public function getNotifierId () : int {
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ final class SleeperNotifier{
2929 * @phpstan-param ThreadSafeArray<int, int> $sharedObject
3030 */
3131 public function __construct (
32- private ThreadSafeArray $ sharedObject ,
33- private int $ notifierId
32+ private readonly ThreadSafeArray $ sharedObject ,
33+ private readonly int $ notifierId
3434 ){}
3535
3636 /**
You can’t perform that action at this time.
0 commit comments