1 | <?php |
||
17 | class SubobjectParserFunction { |
||
18 | |||
19 | /** |
||
20 | * Fixed identifier that describes the sortkey annotation parameter |
||
21 | */ |
||
22 | const PARAM_SORTKEY = '@sortkey'; |
||
23 | |||
24 | /** |
||
25 | * Fixed identifier that describes the subobject category parameter. |
||
26 | * |
||
27 | * We keep it as a @ fixed parameter since the standard annotation would |
||
28 | * require special attention (Category:;instead of ::) when annotating a |
||
29 | * category |
||
30 | */ |
||
31 | const PARAM_CATEGORY = '@category'; |
||
32 | |||
33 | /** |
||
34 | * @var ParserData |
||
35 | */ |
||
36 | protected $parserData; |
||
37 | |||
38 | /** |
||
39 | * @var Subobject |
||
40 | */ |
||
41 | protected $subobject; |
||
42 | |||
43 | /** |
||
44 | * @var MessageFormatter |
||
45 | */ |
||
46 | protected $messageFormatter; |
||
47 | |||
48 | /** |
||
49 | * @var DataValueFactory |
||
50 | */ |
||
51 | private $dataValueFactory = null; |
||
52 | |||
53 | /** |
||
54 | * @var boolean |
||
55 | */ |
||
56 | private $isEnabledFirstElementPropertyLabel = false; |
||
57 | |||
58 | /** |
||
59 | * @since 1.9 |
||
60 | * |
||
61 | * @param ParserData $parserData |
||
62 | * @param Subobject $subobject |
||
63 | * @param MessageFormatter $messageFormatter |
||
64 | */ |
||
65 | 87 | public function __construct( ParserData $parserData, Subobject $subobject, MessageFormatter $messageFormatter ) { |
|
71 | |||
72 | /** |
||
73 | * @since 1.9 |
||
74 | * |
||
75 | * @param boolean $isEnabledFirstElementPropertyLabel |
||
76 | * |
||
77 | * @return SubobjectParserFunction |
||
78 | */ |
||
79 | 5 | public function setFirstElementForPropertyLabel( $isEnabledFirstElementPropertyLabel = true ) { |
|
80 | 5 | $this->isEnabledFirstElementPropertyLabel = (bool)$isEnabledFirstElementPropertyLabel; |
|
81 | 5 | return $this; |
|
82 | } |
||
83 | |||
84 | /** |
||
85 | * @since 1.9 |
||
86 | * |
||
87 | * @param ParserParameterProcessor $params |
||
|
|||
88 | * |
||
89 | * @return string|null |
||
90 | */ |
||
91 | 84 | public function parse( ParserParameterProcessor $parameters ) { |
|
108 | |||
109 | 86 | protected function addDataValuesToSubobject( ParserParameterProcessor $parserParameterProcessor ) { |
|
161 | |||
162 | 85 | private function getParameters( ParserParameterProcessor $parserParameterProcessor ) { |
|
180 | |||
181 | 85 | private function doPrepareParameters( ParserParameterProcessor $parserParameterProcessor ) { |
|
204 | |||
205 | 85 | private function doAugmentSortKeyForWhenDisplayTitleIsAccessible( $semanticData ) { |
|
223 | |||
224 | 2 | private function addErrorWithMsg( $subject, $errorMsg ) { |
|
240 | |||
241 | } |
||
242 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.