1 | <?php |
||
5 | class Client |
||
6 | { |
||
7 | /** @var string **/ |
||
8 | protected $id; |
||
9 | /** @var \DateTime **/ |
||
10 | protected $lastConnectedAt; |
||
11 | /** @var boolean **/ |
||
12 | protected $isFirstConnection; |
||
13 | /** @var int **/ |
||
14 | protected $playerId; |
||
15 | |||
16 | /** |
||
17 | * @param int $id |
||
18 | * @return $this |
||
19 | */ |
||
20 | public function setId($id) |
||
26 | |||
27 | /** |
||
28 | * @return int |
||
29 | */ |
||
30 | public function getId() |
||
34 | |||
35 | /** |
||
36 | * @param \DateTime $lastConnectedAt |
||
37 | * @return \Asylamba\Classes\Daemon\Client |
||
38 | */ |
||
39 | public function setLastConnectedAt(\DateTime $lastConnectedAt) |
||
45 | |||
46 | /** |
||
47 | * @return \DateTime |
||
48 | */ |
||
49 | public function getLastConnectedAt() |
||
53 | |||
54 | /** |
||
55 | * @param boolean $isFirstConnection |
||
56 | * @return $this |
||
57 | */ |
||
58 | public function setIsFirstConnection($isFirstConnection) |
||
64 | |||
65 | /** |
||
66 | * @return boolean |
||
67 | */ |
||
68 | public function getIsFirstConnection() |
||
72 | |||
73 | /** |
||
74 | * @param int $playerId |
||
75 | * @return Client |
||
76 | */ |
||
77 | public function setPlayerId($playerId) |
||
83 | |||
84 | /** |
||
85 | * @return int |
||
86 | */ |
||
87 | public function getPlayerId() |
||
91 | } |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.