1 | <?php |
||
16 | class CitationReferencePositionJournal { |
||
17 | |||
18 | /** |
||
19 | * @var Cache |
||
20 | */ |
||
21 | private $cache = null; |
||
22 | |||
23 | /** |
||
24 | * @var CacheKeyProvider |
||
25 | */ |
||
26 | private $cacheKeyProvider; |
||
27 | |||
28 | /** |
||
29 | * @var array |
||
30 | */ |
||
31 | private static $citationReferenceJournal = []; |
||
32 | |||
33 | /** |
||
34 | * @since 1.0 |
||
35 | * |
||
36 | * @param Cache $cache |
||
37 | * @param CacheKeyProvider $cacheKeyProvider |
||
38 | */ |
||
39 | 18 | public function __construct( Cache $cache, CacheKeyProvider $cacheKeyProvider ) { |
|
43 | |||
44 | /** |
||
45 | * @since 1.0 |
||
46 | * |
||
47 | * @param DIWikiPage $subject |
||
|
|||
48 | * |
||
49 | * @return boolean |
||
50 | */ |
||
51 | 14 | public function hasCitationReference( SemanticData $semanticData ) { |
|
54 | |||
55 | /** |
||
56 | * @since 1.0 |
||
57 | * |
||
58 | * @param DIWikiPage $subject |
||
59 | * |
||
60 | * @return array|null |
||
61 | */ |
||
62 | 9 | public function getJournalBySubject( DIWikiPage $subject ) { |
|
65 | |||
66 | /** |
||
67 | * @note Build a journal from unbound references (loose from the subject invoked |
||
68 | * citation references), the position isn't important because those will not |
||
69 | * be linked to any CiteRef anchors. |
||
70 | * |
||
71 | * @since 1.0 |
||
72 | * |
||
73 | * @param array $referenceList |
||
74 | * |
||
75 | * @return array|null |
||
76 | */ |
||
77 | 3 | public function buildJournalForUnboundReferenceList( array $referenceList ) { |
|
78 | |||
79 | 3 | if ( $referenceList === [] ) { |
|
80 | 1 | return null; |
|
81 | } |
||
82 | |||
83 | $journal = [ |
||
84 | 3 | 'total' => 0, |
|
85 | 'reference-list' => [], |
||
86 | 'reference-pos' => [] |
||
87 | ]; |
||
88 | |||
89 | 3 | $journal['total'] = count( $referenceList ); |
|
90 | |||
91 | 3 | foreach ( $referenceList as $reference ) { |
|
92 | 3 | $journal['reference-pos'][$reference] = []; |
|
93 | 3 | $journal['reference-list'][$reference] = $reference; |
|
94 | } |
||
95 | |||
96 | 3 | return $journal; |
|
97 | } |
||
98 | |||
99 | /** |
||
100 | * @since 1.0 |
||
101 | * |
||
102 | * @param DIWikiPage|null $subject |
||
103 | * @param string $reference |
||
104 | * |
||
105 | * @return string|null |
||
106 | */ |
||
107 | 7 | public function findLastReferencePositionEntryFor( DIWikiPage $subject = null, $reference ) { |
|
127 | |||
128 | /** |
||
129 | * @since 1.0 |
||
130 | * |
||
131 | * @param DIWikiPage|null $subject |
||
132 | * @param string $reference |
||
133 | */ |
||
134 | 9 | public function addJournalEntryFor( DIWikiPage $subject = null, $reference ) { |
|
189 | |||
190 | 10 | private function hasJournalForHash( $hash ) { |
|
200 | |||
201 | } |
||
202 |
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.