GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 7b42e1...c93f43 )
by Marius
10:41 queued 04:09
created

PostRequestTrait::getPostVars()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 3
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 3
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * @package presentation
4
 * @subpackage requests
5
 * @author marius orcsik <[email protected]>
6
 * @date 21.02.15
7
 */
8
namespace vsc\presentation\requests;
9
10
11 View Code Duplication
trait PostRequestTrait {
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
12
	protected $aPostVars = array();
13
14 17
	protected function initPost($aPost) {
15 17
		$this->aPostVars = $aPost;
16 17
	}
17
18
	/**
19
	 * @return bool
20
	 */
21
	public function hasPostVars() {
22
		return (count($this->aPostVars) > 0);
23
	}
24
25
	/**
26
	 * @param string $sVarName
27
	 * @return bool
28
	 */
29
	public function hasPostVar($sVarName) {
30
		return array_key_exists($sVarName, $this->aPostVars);
31
	}
32
33
	/**
34
	 *
35
	 * @param string $sVarName
36
	 * @return mixed
37
	 */
38
	protected function getPostVar($sVarName) {
39
		if (array_key_exists($sVarName, $this->aPostVars)) {
40
			return $this->aPostVars[$sVarName];
41
		} else {
42
			return null;
43
		}
44
	}
45
46
	/**
47
	 * @return array
48
	 */
49
	public function getPostVars() {
50
		return $this->aPostVars;
51
	}
52
}
53