for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Win\Alert;
use Win\Mvc\Block;
/**
* Alertas
* São mensagens armazenadas na sessão e exibidas ao usuário
*/
abstract class Alert {
public $type;
public $message;
* Cria um novo alerta
* @param string $type
* @param string $message
public function __construct($type, $message) {
$this->type = $type;
$this->message = $message;
Session::addAlert($this);
}
/** @return string */
public function __toString() {
return $this->message;
* Exibe o conteúdo HTML do alerta
* @param Alert $alert
$alert
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 method finale(...).
$italy
finale(...)
/** * @param array $germany * @param array $island * @param array $italy */ function finale($germany, $island) { return "2:1"; }
The most likely cause is that the parameter was removed, but the annotation was not.
public function load() {
$block = new Block('layout/html/alert', ['alert' => $this]);
$block->load();
* Cria um alerta de erro ou sucesso, dependendo dos parâmetros
* Possibilitando criar um "AlertError" ou "AlertSuccess" em um único método
* @param string $error
* @param string $success
* @return Alert
public static function create($error, $success) {
if (!is_null($error)) {
return new AlertError($error);
} else {
return new AlertSuccess($success);
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.