| 1 | <?php |
||
| 11 | abstract class Alert { |
||
| 12 | |||
| 13 | public $type; |
||
| 14 | public $message; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Cria um novo alerta |
||
| 18 | * @param string $type |
||
| 19 | * @param string $message |
||
| 20 | */ |
||
| 21 | public function __construct($type, $message) { |
||
| 26 | |||
| 27 | /** @return string */ |
||
| 28 | public function __toString() { |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Exibe o conteúdo HTML do alerta |
||
| 34 | * @param Alert $alert |
||
|
|
|||
| 35 | */ |
||
| 36 | public function load() { |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Cria um alerta de erro ou sucesso, dependendo dos parâmetros |
||
| 43 | * Possibilitando criar um "AlertError" ou "AlertSuccess" em um único método |
||
| 44 | * @param string $error |
||
| 45 | * @param string $success |
||
| 46 | * @return Alert |
||
| 47 | */ |
||
| 48 | public static function create($error, $success) { |
||
| 55 | |||
| 56 | } |
||
| 57 |
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
$italyis not defined by the methodfinale(...).The most likely cause is that the parameter was removed, but the annotation was not.