Completed
Pull Request — master (#853)
by
unknown
06:22 queued 03:34
created

TimberRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/**
4
 * TimberRequest exposes $_GET and $_POST to the context
5
 */
6
class TimberRequest extends TimberCore implements TimberCoreInterface {
0 ignored issues
show
Bug introduced by
There is one abstract method meta in this class; you could implement it, or declare this class as abstract.
Loading history...
7
8
	public $post = array();
9
	public $get = array();
10
	
11
	/**
12
	 * Constructs a TimberRequest object
13
	 * @example
14
	 */
15
	function __construct() {
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
16
		$this->init();
17
	}
18
19
	/**
20
	 * @internal
21
	 */
22
	protected function init() {
23
		$this->post = $_POST;
0 ignored issues
show
introduced by
Detected access of super global var $_POST, probably need manual inspection.
Loading history...
introduced by
Detected usage of a non-sanitized input variable: $_POST
Loading history...
24
		$this->get = $_GET;
0 ignored issues
show
introduced by
Detected access of super global var $_GET, probably need manual inspection.
Loading history...
introduced by
Detected usage of a non-sanitized input variable: $_GET
Loading history...
25
	}
26
}
27