1 | <?php |
||
26 | class GdprDeleteForm extends Model |
||
27 | { |
||
28 | use ContainerAwareTrait; |
||
29 | |||
30 | /** |
||
31 | * @var string User's password |
||
32 | */ |
||
33 | public $password; |
||
34 | /** |
||
35 | * @var SecurityHelper |
||
36 | */ |
||
37 | protected $securityHelper; |
||
38 | /** |
||
39 | * @var User |
||
40 | */ |
||
41 | protected $user; |
||
42 | |||
43 | /** |
||
44 | * @param SecurityHelper $securityHelper |
||
45 | * @param array $config |
||
46 | */ |
||
47 | 1 | public function __construct(SecurityHelper $securityHelper, $config = []) |
|
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | 1 | public function rules() |
|
72 | |||
73 | /** |
||
74 | * @return User|null|\yii\web\IdentityInterface |
||
75 | */ |
||
76 | 1 | public function getUser() |
|
84 | |||
85 | 1 | public function attributeLabels() |
|
91 | } |
||
92 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: