Passed
Branch tests1.5 (af713c)
by Wanderson
01:19
created

Header::set()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Win\Request;
4
5
use Win\Data\Data;
6
7
/**
8
 * Header HTTP
9
 */
10
class Header extends Data {
11
12
	/**
13
	 * Adiciona no 'HTTP Header' os valores que foram adicionados
14
	 * @codeCoverageIgnore
15
	 */
16
	public function run() {
17
		foreach ($this->all() as $key => $value) {
18
			header($key . ':' . $value);
19
		}
20
		if ($this->get('location')) {
21
			die();
0 ignored issues
show
Best Practice introduced by
Using exit here is not recommended.

In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.

Loading history...
22
		}
23
	}
24
25
}
26