1 | <?php namespace Comodojo\Extender\Task; |
||
29 | abstract class AbstractTask implements TaskInterface { |
||
30 | |||
31 | use ConfigurationTrait; |
||
32 | use EventsTrait; |
||
33 | use LoggerTrait; |
||
34 | use PidTrait; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $name; |
||
40 | |||
41 | /** |
||
42 | * @var TaskParameters |
||
43 | */ |
||
44 | protected $parameters; |
||
45 | |||
46 | /** |
||
47 | * {@inheritdoc} |
||
48 | */ |
||
49 | public function __construct( |
||
66 | |||
67 | /** |
||
68 | * Get niceness of a running process |
||
69 | * |
||
70 | * @param int|null $pid The pid to query, or current process if null |
||
|
|||
71 | * @return int |
||
72 | */ |
||
73 | public function getName() { |
||
78 | |||
79 | /** |
||
80 | * Get niceness of a running process |
||
81 | * |
||
82 | * @param int|null $pid The pid to query, or current process if null |
||
83 | * @return int |
||
84 | */ |
||
85 | public function getParameters() { |
||
90 | |||
91 | /** |
||
92 | * Get niceness of a running process |
||
93 | * |
||
94 | * @param int|null $pid The pid to query, or current process if null |
||
95 | * @return int |
||
96 | */ |
||
97 | public function setName($name) { |
||
104 | |||
105 | /** |
||
106 | * Get niceness of a running process |
||
107 | * |
||
108 | * @param int|null $pid The pid to query, or current process if null |
||
109 | * @return int |
||
110 | */ |
||
111 | public function setParameters(TaskParameters $parameters) { |
||
118 | |||
119 | /** |
||
120 | * The run method; SHOULD be implemented by each task |
||
121 | */ |
||
122 | abstract public function run(); |
||
123 | |||
124 | } |
||
125 |
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.