Completed
Push — master ( 5429d4...981a91 )
by Wanderson
01:44
created

Alert::toHtml()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Win\Alert;
4
5
use Win\Mvc\Block;
6
7
/**
8
 * Alertas
9
 * São mensagens exibidas na tela
10
 */
11
abstract class Alert {
12
13
	public $type;
14
	public $message;
15
16
	/**
17
	 * Cria uma nova mensagem
18
	 * @param string $type
19
	 * @param string $message
20
	 */
21
	public function __construct($type, $message) {
22
		$this->type = $type;
23
		$this->message = $message;
24
		Session::addAlert($this);
25
	}
26
27
	public function __toString() {
28
		return $this->message;
29
	}
30
31
	/**
32
	 * Carrega o html do alerta
33
	 * @param Alert $alert
0 ignored issues
show
Bug introduced by
There is no parameter named $alert. Was it maybe removed?

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(...).

/**
 * @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.

Loading history...
34
	 */
35
	public function toHtml() {
36
		$block = new Block('layout/html/alert', ['alert' => $this]);
37
		$block->toHtml();
38
	}
39
40
}
41