Conditions | 3 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
16 | public function __construct(Builder $builder, EntityInterface $related, SearchQuery $search = null) |
||
17 | { |
||
18 | parent::__construct(); |
||
19 | |||
20 | $this->input[''] = ''; |
||
21 | |||
22 | if ($search === null) { |
||
23 | $search = new SearchQuery(); |
||
24 | } |
||
25 | |||
26 | foreach ($related->search($search) as $id => $row) { |
||
27 | $this->input[$id] = $related->getLabel($id, $row); |
||
28 | } |
||
29 | |||
30 | $this->set('list', false); |
||
|
|||
31 | $this->wrapper->class('format is-responsive'); |
||
32 | $this->data('module', 'format-select'); |
||
33 | } |
||
34 | } |
||
35 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: