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

TimberRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 21
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A init() 0 4 1
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