1 | <?php |
||
38 | class BaseService extends BaseObject |
||
39 | { |
||
40 | use TypeConverter; |
||
41 | |||
42 | /** |
||
43 | * @var string namespace used for key generation |
||
44 | */ |
||
45 | public $namespace = ''; |
||
46 | |||
47 | /** |
||
48 | * @var Connection|array|string the Redis DB connection object or the application component ID of the DB connection. |
||
49 | */ |
||
50 | protected $db; |
||
51 | |||
52 | /** |
||
53 | * @inheritdoc |
||
54 | */ |
||
55 | 6 | public function init() |
|
60 | |||
61 | /** |
||
62 | * Compute etag based on model attributes |
||
63 | * @param BaseModelInterface $model |
||
64 | * @return string |
||
65 | * @since 1.0.0 |
||
66 | */ |
||
67 | protected function computeEtag(BaseModelInterface $model) |
||
71 | |||
72 | /** |
||
73 | * Encode attributes array |
||
74 | * |
||
75 | * @param array $attributes |
||
76 | * |
||
77 | * @return string |
||
78 | * @since 1.0.0 |
||
79 | */ |
||
80 | protected function encodeAttributes(Array $attributes) |
||
86 | |||
87 | } |
||
88 |
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: