1 | <?php |
||
24 | class PatronConnection extends AbstractSaveableConnection implements SavableIntegrationConnectionInterface |
||
25 | { |
||
26 | use AccessTokenAuthorizationTrait; |
||
27 | |||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | public $hubId; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | public $appId; |
||
37 | |||
38 | /** |
||
39 | * @var HubSpotResourceOwner |
||
40 | */ |
||
41 | private $resourceOwner; |
||
42 | |||
43 | /** |
||
44 | * @inheritdoc |
||
45 | */ |
||
46 | public static function displayName(): string |
||
50 | |||
51 | /** |
||
52 | * @inheritdoc |
||
53 | */ |
||
54 | public function rules() |
||
81 | |||
82 | /** |
||
83 | * @inheritdoc |
||
84 | * @throws \Throwable |
||
85 | */ |
||
86 | public function afterSave(bool $isNew, array $changedAttributes = []) |
||
104 | |||
105 | /** |
||
106 | * @inheritdoc |
||
107 | * |
||
108 | * @throws \Twig_Error_Loader |
||
109 | * @throws \yii\base\Exception |
||
110 | */ |
||
111 | public function getSettingsHtml(): string |
||
125 | |||
126 | /** |
||
127 | * @inheritdoc |
||
128 | * @throws \yii\base\InvalidConfigException |
||
129 | */ |
||
130 | public function getHubId(): string |
||
140 | |||
141 | /** |
||
142 | * @inheritdoc |
||
143 | * @throws \yii\base\InvalidConfigException |
||
144 | */ |
||
145 | public function getAppId(): string |
||
155 | |||
156 | /** |
||
157 | * @param string $attribute |
||
158 | * @return string|null |
||
159 | * @throws \yii\base\InvalidConfigException |
||
160 | */ |
||
161 | protected function getFromAccessTokenValues(string $attribute) |
||
167 | |||
168 | /** |
||
169 | * @return HubSpotResourceOwner |
||
170 | * @throws \yii\base\InvalidConfigException |
||
171 | */ |
||
172 | protected function getResourceOwner() |
||
181 | |||
182 | /** |
||
183 | * @param bool $restricted |
||
184 | * @return Provider |
||
185 | */ |
||
186 | protected function getRecord(bool $restricted = true): Provider |
||
209 | } |
||
210 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.