Completed
Push — master ( e392e8...95dbc3 )
by Jared
09:09
created

TimberRequest   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1
Metric Value
wmc 6
lcom 1
cbo 1
dl 0
loc 30
rs 10

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A init() 0 4 1
A __call() 0 1 1
A __get() 0 1 1
A __isset() 0 1 1
A meta() 0 1 1
1
<?php
2
/**
3
 * TimberRequest exposes $_GET and $_POST to the context
4
 */
5
class TimberRequest extends TimberCore implements TimberCoreInterface {
6
	public $post = array();
7
	public $get = array();
8
	
9
	/**
10
	 * Constructs a TimberRequest object
11
	 * @example
12
	 */
13
	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...
14
		$this->init();
15
	}
16
	/**
17
	 * @internal
18
	 */
19
	protected function init() {
20
		$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...
21
		$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...
22
	}
23
24
	public function __call( $field, $args ) {}
25
26
	public function __get( $field ) {}
27
28
	/**
29
	 * @return boolean
0 ignored issues
show
Documentation introduced by
Should the return type not be boolean|null?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
30
	 */
31
	public function __isset( $field ) {}
32
33
	public function meta( $key ) {}
34
}
35