| Total Complexity | 5 |
| Total Lines | 61 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class FieldParserGraphicPrimitiveTest extends AbstractFieldParserTest |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var FieldParserGraphicPrimitive |
||
| 13 | */ |
||
| 14 | private $parser; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @return SimpleXMLElement |
||
| 18 | */ |
||
| 19 | protected function getXmlField() |
||
| 23 | <FldType>GraphicPrimitive</FldType> |
||
| 24 | <CLSID>{DC1F7EC4-7698-11D5-8036-005004D10645}</CLSID> |
||
| 25 | <Displayed>1</Displayed> |
||
| 26 | <X>4200</X> |
||
| 27 | <Y>250</Y> |
||
| 28 | <W>3775</W> |
||
| 29 | <H>450</H> |
||
| 30 | <Ln>1</Ln> |
||
| 31 | <Data> |
||
| 32 | <Object> |
||
| 33 | <DataType>0</DataType> |
||
| 34 | </Object> |
||
| 35 | </Data> |
||
| 36 | <Graphic> |
||
| 37 | <GfxW>8500</GfxW> |
||
| 38 | <GfxH>4700</GfxH> |
||
| 39 | <Primitive> |
||
| 40 | <Shape>i am shape</Shape> |
||
| 41 | <LineW>25</LineW> |
||
| 42 | </Primitive> |
||
| 43 | </Graphic> |
||
| 44 | </Field>' |
||
| 45 | ); |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return FieldParserGraphicPrimitive |
||
| 50 | */ |
||
| 51 | protected function getParser() |
||
| 52 | { |
||
| 53 | if (!$this->parser) { |
||
| 54 | $this->parser = new FieldParserGraphicPrimitive(); |
||
| 55 | } |
||
| 56 | |||
| 57 | return $this->parser; |
||
|
|
|||
| 58 | } |
||
| 59 | |||
| 60 | public function testGetShape() |
||
| 64 | } |
||
| 65 | |||
| 66 | public function testGetLineWeight() |
||
| 70 | } |
||
| 71 | } |
||
| 72 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: