1 | <?php |
||
11 | abstract class MetaBase extends ArrayObject |
||
12 | { |
||
13 | const META_ATTRIBUTE_NAME = 'name'; |
||
14 | const META_NAME_PREFIX = ''; |
||
15 | |||
16 | protected $page; |
||
17 | protected static $characterLimits = array(); |
||
18 | |||
19 | /** |
||
20 | * Constructor. |
||
21 | * |
||
22 | * @param Page $page |
||
23 | */ |
||
24 | public function __construct(Page $page) |
||
29 | |||
30 | /** |
||
31 | * Generate all tags. |
||
32 | * |
||
33 | * @return array |
||
34 | */ |
||
35 | abstract protected function generateTags(); |
||
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | */ |
||
40 | public function addMeta($name, $content) |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function addLink($rel, $href) |
||
54 | |||
55 | /** |
||
56 | * Adds an array of metas. |
||
57 | * |
||
58 | * @param array $metas |
||
59 | */ |
||
60 | protected function addMetas(array $metas) |
||
68 | |||
69 | /** |
||
70 | * Adds an array of links. |
||
71 | * |
||
72 | * @param array $links |
||
73 | */ |
||
74 | protected function addLinks(array $links) |
||
82 | |||
83 | /** |
||
84 | * Escapes the value of an attribute. |
||
85 | * |
||
86 | * @param string $value |
||
87 | * |
||
88 | * @return string |
||
89 | */ |
||
90 | protected static function escape($value) |
||
94 | |||
95 | /** |
||
96 | * Filters attribute values to trim by length. |
||
97 | * |
||
98 | * @param string $value |
||
|
|||
99 | * |
||
100 | * @return string |
||
101 | */ |
||
102 | protected static function trim($name, $content) |
||
112 | } |
||
113 |
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.