1 | <?php |
||
11 | class Client |
||
12 | { |
||
13 | use EncryptableFieldEntity; |
||
14 | |||
15 | /** |
||
16 | * @var integer |
||
17 | * @Id |
||
18 | * @Column(type="integer", length=11) |
||
19 | * @GeneratedValue |
||
20 | */ |
||
21 | private $id; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | * @Column(type="string",length=50) |
||
26 | */ |
||
27 | private $clientIdentifier; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | * @Column(type="string",length=100) |
||
32 | */ |
||
33 | private $clientSecret; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | * @Column(type="string") |
||
38 | */ |
||
39 | private $redirectUri = ''; |
||
40 | |||
41 | /** |
||
42 | * Get id |
||
43 | * |
||
44 | * @return integer |
||
45 | */ |
||
46 | public function getId() |
||
50 | |||
51 | /** |
||
52 | * Set client_identifier |
||
53 | * |
||
54 | * @param string $clientIdentifier |
||
55 | * @return Client |
||
56 | */ |
||
57 | public function setClientIdentifier($clientIdentifier) |
||
62 | |||
63 | /** |
||
64 | * Get client_identifier |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | public function getClientIdentifier() |
||
72 | |||
73 | /** |
||
74 | * Set client_secret |
||
75 | * |
||
76 | * @param string $clientSecret |
||
77 | * @return Client |
||
78 | */ |
||
79 | public function setClientSecret($clientSecret) |
||
84 | |||
85 | /** |
||
86 | * Get client_secret |
||
87 | * |
||
88 | * @return string |
||
89 | */ |
||
90 | public function getClientSecret() |
||
94 | |||
95 | /** |
||
96 | * @param $clientSecret |
||
97 | * @return bool |
||
98 | */ |
||
99 | public function verifyClientSecret($clientSecret) |
||
103 | |||
104 | /** |
||
105 | * Set redirect_uri |
||
106 | * |
||
107 | * @param string $redirectUri |
||
108 | * @return Client |
||
109 | */ |
||
110 | 1 | public function setRedirectUri($redirectUri) |
|
115 | |||
116 | /** |
||
117 | * Get redirect_uri |
||
118 | * |
||
119 | * @return string |
||
120 | */ |
||
121 | 1 | public function getRedirectUri() |
|
125 | |||
126 | public function toArray() |
||
134 | } |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.
For example, imagine you have a variable
$accountId
that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to theid
property of an instance of theAccount
class. This class holds a proper account, so the id value must no longer be false.Either this assignment is in error or a type check should be added for that assignment.