1 | <?php |
||
15 | class Item { |
||
16 | |||
17 | /** |
||
18 | * @see https://en.wikipedia.org/wiki/BibTeX |
||
19 | * |
||
20 | * @var string |
||
21 | */ |
||
22 | private $type = ''; |
||
23 | |||
24 | /** |
||
25 | * @var [] |
||
26 | */ |
||
27 | protected $fields = [ |
||
28 | 'address' => '', |
||
29 | 'annote' => '', |
||
30 | 'author' => [], |
||
31 | 'booktitle' => '', |
||
32 | 'chapter' => '', |
||
33 | 'crossref' => '', |
||
34 | 'doi' => '', |
||
35 | 'edition' => '', |
||
36 | 'editor' => [], |
||
37 | 'eprint' => '', |
||
38 | 'howpublished' => '', |
||
39 | 'institution' => '', |
||
40 | 'journal' => '', |
||
41 | 'key' => '', |
||
42 | 'month' => '', |
||
43 | 'note' => '', |
||
44 | 'number' => '', |
||
45 | 'organization' => '', |
||
46 | 'pages' => '', |
||
47 | 'publisher' => '', |
||
48 | 'school' => '', |
||
49 | 'series' => '', |
||
50 | 'title' => '', |
||
51 | 'url' => '', |
||
52 | 'volume' => '', |
||
53 | 'year' => '' |
||
54 | ]; |
||
55 | |||
56 | /** |
||
57 | * @var callable |
||
58 | */ |
||
59 | private $formatterCallback; |
||
60 | |||
61 | /** |
||
62 | * @since 3.1 |
||
63 | */ |
||
64 | 7 | public function __construct() { |
|
67 | |||
68 | /** |
||
69 | * @since 3.1 |
||
70 | * |
||
71 | * @param callable $compoundLabelCallback |
||
|
|||
72 | */ |
||
73 | 3 | public function setFormatterCallback( callable $formatterCallback ) { |
|
76 | |||
77 | /** |
||
78 | * @since 3.1 |
||
79 | * |
||
80 | * @param $key |
||
81 | * @param string $text |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | 6 | public function replace( $key, $text ) { |
|
98 | |||
99 | /** |
||
100 | * @since 3.1 |
||
101 | * |
||
102 | * @param $key |
||
103 | * @param mixed $value |
||
104 | */ |
||
105 | 5 | public function set( $key, $value ) { |
|
117 | |||
118 | /** |
||
119 | * @since 3.1 |
||
120 | * |
||
121 | * @return string |
||
122 | */ |
||
123 | 5 | public function text() { |
|
150 | |||
151 | /** |
||
152 | * Consist of `author last name` + `year` + `first word of title` |
||
153 | * |
||
154 | * @return string |
||
155 | */ |
||
156 | 5 | protected function buildURI() { |
|
184 | |||
185 | } |
||
186 |
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.