1 | <?php |
||
20 | class Process extends Action |
||
21 | { |
||
22 | use ManageTrait; |
||
23 | |||
24 | const EVENT_RECEIVE_WEBHOOK = 'receiveWebhook'; |
||
25 | |||
26 | /** |
||
27 | * @inheritdoc |
||
28 | */ |
||
29 | public $statusCodeSuccess = 201; |
||
30 | |||
31 | /** |
||
32 | * @return mixed |
||
33 | * @throws \yii\base\InvalidConfigException |
||
34 | * @throws \yii\web\HttpException |
||
35 | */ |
||
36 | public function run() |
||
42 | |||
43 | /** |
||
44 | * @inheritdoc |
||
45 | */ |
||
46 | protected function performAction(array $data = []): bool |
||
63 | } |
||
64 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)
or! empty(...)
instead.