| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3.0175 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | 2 | public function getFieldRenderer($graphicPrimitiveType) |
|
| 17 | { |
||
| 18 | 2 | switch ($graphicPrimitiveType) { |
|
| 19 | case GraphicPrimitiveType::TYPE_OUTLINE_BOX: |
||
| 20 | 1 | $class = FieldRendererOutlineBox::class; |
|
| 21 | 1 | break; |
|
| 22 | |||
| 23 | case GraphicPrimitiveType::TYPE_FILLED_BOX: |
||
| 24 | 1 | $class = FieldRendererFilledBox::class; |
|
| 25 | 1 | break; |
|
| 26 | |||
| 27 | default: |
||
| 28 | throw new UnsupportedFieldTypeException($graphicPrimitiveType); |
||
| 29 | } |
||
| 30 | |||
| 31 | 2 | return $class::factory(); |
|
| 32 | } |
||
| 34 |