| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Server module for HiPanel |
||
| 4 | * |
||
| 5 | * @link https://github.com/hiqdev/hipanel-module-server |
||
| 6 | * @package hipanel-module-server |
||
| 7 | * @license BSD-3-Clause |
||
| 8 | * @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/) |
||
| 9 | */ |
||
| 10 | |||
| 11 | namespace hipanel\modules\server\models\query; |
||
| 12 | |||
| 13 | use hiqdev\hiart\ActiveQuery; |
||
| 14 | use Yii; |
||
| 15 | |||
| 16 | class HubQuery extends ActiveQuery |
||
| 17 | { |
||
| 18 | public function withBindings(): self |
||
| 19 | { |
||
| 20 | if (Yii::$app->user->can('hub.read')) { |
||
|
0 ignored issues
–
show
|
|||
| 21 | $this->joinWith('bindings'); |
||
| 22 | $this->andWhere(['with_bindings' => true]); |
||
| 23 | } |
||
| 24 | |||
| 25 | return $this; |
||
| 26 | } |
||
| 27 | |||
| 28 | public function withMonitoringSettings(): self |
||
| 29 | { |
||
| 30 | if (Yii::$app->user->can('server.manage-settings')) { |
||
| 31 | $this->joinWith(['monitoringSettings']); |
||
| 32 | $this->andWhere(['with_monitoringSettings' => 1]); |
||
| 33 | } |
||
| 34 | |||
| 35 | return $this; |
||
| 36 | } |
||
| 37 | } |
||
| 38 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.