Conditions | 4 |
Paths | 4 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 4 | ||
Bugs | 2 | Features | 1 |
1 | <?php |
||
47 | public function fields() |
||
48 | { |
||
49 | foreach ($this->components() as $component) { |
||
50 | if (false === class_exists($component)) { |
||
51 | throw new \Exception(sprintf('The %s class does not exist', $component)); |
||
52 | } |
||
53 | if ($component instanceof FieldComponent) { |
||
54 | throw new \Exception('The %s class must be extend the FieldComponent', $component); |
||
55 | } |
||
56 | $component::register($this->name, $this->connector()); |
||
57 | } |
||
58 | } |
||
59 | |||
82 |