1 | <?php |
||
8 | class Zip |
||
9 | { |
||
10 | /** @var \ZipArchive */ |
||
11 | protected $zipFile; |
||
12 | |||
13 | /** @var int */ |
||
14 | protected $fileCount = 0; |
||
15 | |||
16 | /** @var string */ |
||
17 | protected $pathToZip; |
||
18 | |||
19 | public static function createForManifest(Manifest $manifest, string $pathToZip): Zip |
||
29 | |||
30 | protected static function determineNameOfFileInZip(string $pathToFile, string $pathToZip) |
||
42 | |||
43 | public function __construct(string $pathToZip) |
||
51 | |||
52 | public function path(): string |
||
56 | |||
57 | public function size(): int |
||
65 | |||
66 | public function humanReadableSize(): string |
||
70 | |||
71 | protected function open() |
||
75 | |||
76 | protected function close() |
||
80 | |||
81 | /** |
||
82 | * @param string|array $files |
||
83 | * @param string $nameInZip |
||
84 | * |
||
85 | * @return \Spatie\Backup\Tasks\Backup\Zip |
||
86 | */ |
||
87 | public function add($files, string $nameInZip = null): Zip |
||
110 | |||
111 | public function count(): int |
||
115 | } |
||
116 |
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.