1 | <?php |
||
17 | class Process |
||
18 | { |
||
19 | /** |
||
20 | * List of system commands to execute. |
||
21 | * |
||
22 | * @var array<\phpbu\Backup\Cli\Cmd> |
||
23 | */ |
||
24 | private $commands = []; |
||
25 | |||
26 | /** |
||
27 | * Redirect the output |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | private $redirectOutput; |
||
32 | |||
33 | private $sCmdCompressor; |
||
34 | |||
35 | /** |
||
36 | * Redirect the stdOut. |
||
37 | * |
||
38 | 12 | * @param string $path |
|
39 | */ |
||
40 | 12 | public function redirectOutputTo($path) |
|
44 | |||
45 | /** |
||
46 | * Set the compressor cmd |
||
47 | * |
||
48 | 1 | * @param string $cmd |
|
|
|||
49 | */ |
||
50 | 1 | public function setCompression($sCmdCompressor) |
|
54 | |||
55 | /** |
||
56 | * Should the output be redirected. |
||
57 | * |
||
58 | 1 | * @return boolean |
|
59 | */ |
||
60 | 1 | public function isOutputRedirected() |
|
64 | |||
65 | /** |
||
66 | * Redirect getter. |
||
67 | * |
||
68 | 99 | * @return string |
|
69 | */ |
||
70 | 99 | public function getRedirectPath() |
|
74 | |||
75 | /** |
||
76 | * Adds a cli command to the command list. |
||
77 | * |
||
78 | * @param \phpbu\App\Cli\Cmd $cmd |
||
79 | 97 | */ |
|
80 | public function addCommand(Cmd $cmd) |
||
84 | |||
85 | 96 | /** |
|
86 | 96 | * Generates the system command. |
|
87 | * |
||
88 | 96 | * @return string |
|
89 | * @throws \phpbu\App\Exception |
||
90 | */ |
||
91 | public function getCommandLine() |
||
103 | 1 | ||
104 | 1 | /** |
|
105 | * Executes the commands. |
||
106 | 1 | * |
|
107 | * @return \phpbu\App\Cli\Result |
||
108 | * @throws \phpbu\App\Exception |
||
109 | */ |
||
110 | public function run() |
||
136 | } |
||
137 |
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.