1 | <?php |
||
2 | |||
3 | |||
4 | namespace carono\yii2trello\query; |
||
5 | |||
6 | |||
7 | use Trello\Client; |
||
0 ignored issues
–
show
|
|||
8 | use yii2mod\query\ArrayQuery; |
||
9 | |||
10 | abstract class Query extends ArrayQuery |
||
11 | { |
||
12 | protected $modelClass; |
||
13 | protected $client; |
||
14 | protected $member; |
||
15 | |||
16 | /** |
||
17 | * @param $id |
||
18 | * @return $this |
||
19 | */ |
||
20 | public function andWhereMember($id) |
||
21 | { |
||
22 | $this->member = $id; |
||
23 | return $this; |
||
24 | } |
||
25 | |||
26 | public function __construct($modelClass, $config = []) |
||
27 | { |
||
28 | $this->modelClass = $modelClass; |
||
29 | parent::__construct($config); |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @param null $client |
||
0 ignored issues
–
show
|
|||
34 | * @return array |
||
35 | */ |
||
36 | public function all($client = null): array |
||
37 | { |
||
38 | $this->client = static::getClient($client); |
||
39 | return parent::all(); |
||
40 | } |
||
41 | |||
42 | public function one($client = null) |
||
43 | { |
||
44 | $this->client = static::getClient($client); |
||
45 | return parent::one(); |
||
46 | } |
||
47 | |||
48 | /** |
||
49 | * @param null $client |
||
0 ignored issues
–
show
|
|||
50 | * @return Client |
||
51 | */ |
||
52 | protected static function getClient($client = null) |
||
53 | { |
||
54 | if ($client === null) { |
||
0 ignored issues
–
show
|
|||
55 | $client = \Yii::$app->get('trello'); |
||
56 | } |
||
57 | return $client; |
||
0 ignored issues
–
show
|
|||
58 | } |
||
59 | |||
60 | /** |
||
61 | * @param $client |
||
62 | * @return \Trello\Model\Member |
||
63 | */ |
||
64 | protected function getMember($client) |
||
65 | { |
||
66 | $member = new \Trello\Model\Member(static::getClient($client)); |
||
0 ignored issues
–
show
The type
Trello\Model\Member was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths ![]() |
|||
67 | $member->setId($this->member); |
||
68 | return $member; |
||
69 | } |
||
70 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths