| 1 | <?php |
||
| 24 | class GdprDeleteForm extends Model |
||
| 25 | { |
||
| 26 | use ContainerAwareTrait; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var string User's password |
||
| 30 | */ |
||
| 31 | public $password; |
||
| 32 | /** |
||
| 33 | * @var SecurityHelper |
||
| 34 | */ |
||
| 35 | protected $securityHelper; |
||
| 36 | /** |
||
| 37 | * @var User |
||
| 38 | */ |
||
| 39 | protected $user; |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param SecurityHelper $securityHelper |
||
| 43 | * @param array $config |
||
| 44 | */ |
||
| 45 | 1 | public function __construct(SecurityHelper $securityHelper, $config = []) |
|
| 50 | |||
| 51 | /** |
||
| 52 | * {@inheritdoc} |
||
| 53 | */ |
||
| 54 | 1 | public function rules() |
|
| 70 | |||
| 71 | /** |
||
| 72 | * @return User|null|\yii\web\IdentityInterface |
||
| 73 | */ |
||
| 74 | 1 | public function getUser() |
|
| 82 | |||
| 83 | 1 | public function attributeLabels() |
|
| 89 | } |
||
| 90 |
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: