1 | <?php |
||
8 | abstract class AbstractFieldParser implements FieldParserInterface |
||
9 | { |
||
10 | /** |
||
11 | * @var FieldParserRegistry |
||
12 | */ |
||
13 | protected $fieldParserRegistry; |
||
14 | |||
15 | /** |
||
16 | * @var \SimpleXMLElement |
||
17 | */ |
||
18 | protected $xmlField; |
||
19 | |||
20 | /** |
||
21 | * @var \SimpleXMLElement |
||
22 | */ |
||
23 | protected $xmlHeader; |
||
24 | |||
25 | /** |
||
26 | * @var float |
||
27 | */ |
||
28 | protected $scale; |
||
29 | |||
30 | /** |
||
31 | * @param FieldParserRegistry $fieldParserRegistry |
||
32 | * @param \SimpleXMLElement $xmlField |
||
33 | * @param \SimpleXMLElement $xmlHeader |
||
34 | * @param float $scale |
||
35 | */ |
||
36 | public function parse( |
||
48 | |||
49 | /** |
||
50 | * @return string |
||
51 | */ |
||
52 | public function getFieldName() |
||
56 | |||
57 | /** |
||
58 | * @return int |
||
|
|||
59 | */ |
||
60 | public function getPositionX() |
||
64 | |||
65 | /** |
||
66 | * @return int |
||
67 | */ |
||
68 | public function getPositionY() |
||
72 | |||
73 | /** |
||
74 | * @return int |
||
75 | */ |
||
76 | public function getWidth() |
||
80 | |||
81 | /** |
||
82 | * @return int |
||
83 | */ |
||
84 | public function getHeight() |
||
88 | |||
89 | /** |
||
90 | * @return bool |
||
91 | */ |
||
92 | public function isDisplayed() |
||
96 | |||
97 | /** |
||
98 | * @return FieldParserInterface |
||
99 | */ |
||
100 | public static function factory() |
||
104 | } |
||
105 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.