| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 27 | protected function build(TypeConfigInterface $config) |
||
| 28 | { |
||
| 29 | parent::build($config); |
||
| 30 | |||
| 31 | $config->getField('friends')->getConfig()->set('resolve', function($droid){ |
||
|
|
|||
| 32 | return StarWarsData::getFriends($droid); |
||
| 33 | }); |
||
| 34 | |||
| 35 | $config |
||
| 36 | ->addField('primaryFunction', TypeMap::TYPE_STRING); |
||
| 37 | } |
||
| 38 | |||
| 47 | } |
If you implement
__calland 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
__callis implemented by a parent class and only the child class knows which methods exist: