1 | <?php |
||
2 | |||
3 | declare ( strict_types = 1 ); |
||
4 | |||
5 | namespace Ch0c01dxyz\InstaToken\Objects; |
||
6 | |||
7 | /** |
||
8 | * @author Egar Rizki <[email protected]> |
||
9 | */ |
||
10 | class UserName |
||
11 | { |
||
12 | /** |
||
13 | * @var userName |
||
14 | */ |
||
15 | protected $userName; |
||
16 | |||
17 | /** |
||
18 | * Username Constructor |
||
19 | * |
||
20 | * @param string $un |
||
21 | */ |
||
22 | public function __construct ( string $un ) |
||
23 | { |
||
24 | $this->userName = $un; |
||
0 ignored issues
–
show
|
|||
25 | } |
||
26 | |||
27 | /** |
||
28 | * @return string |
||
29 | */ |
||
30 | public function __toString () : string |
||
31 | { |
||
32 | return $this->userName; |
||
33 | } |
||
34 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..