1 | <?php |
||
19 | class ApcuCacheInfoCommand extends AbstractCommand |
||
20 | { |
||
21 | protected static $apcFix = [ |
||
22 | 'stime' => "start_time", |
||
23 | 'atime' => "access_time", |
||
24 | 'mtime' => "modification_time", |
||
25 | 'ctime' => "creation_time", |
||
26 | 'dtime' => "deletion_time", |
||
27 | |||
28 | 'nslots' => "num_slots", |
||
29 | 'nhits' => "num_hits", |
||
30 | 'nmisses' => "num_misses", |
||
31 | 'ninserts' => "num_inserts", |
||
32 | 'nentries' => "num_entries", |
||
33 | 'nexpunges' => "expunges", |
||
34 | "num_expunges" => "expunges", |
||
35 | |||
36 | 'key' => "info", |
||
37 | ]; |
||
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | 19 | protected function configure() |
|
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | 1 | protected function execute(InputInterface $input, OutputInterface $output): int |
|
72 | |||
73 | /** |
||
74 | * @param array $info |
||
75 | * @return array |
||
76 | */ |
||
77 | 1 | protected function getRows($info) |
|
95 | |||
96 | /** |
||
97 | * Fix inconsistencies between APC and APCu |
||
98 | * |
||
99 | * @param array &$array |
||
100 | */ |
||
101 | 2 | protected function normalize(array &$array) |
|
110 | } |
||
111 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.