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.

JsonRPCResponse   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 35
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0
wmc 6
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
B getProperties() 0 23 6
1
<?php
2
/**
3
 * @package domain
4
 * @subpackage models
5
 * @author marius orcsik <[email protected]>
6
 * @date 2012.08.25
7
 */
8
namespace vsc\domain\models;
9
10
class JsonRPCResponse extends ModelA {
11
	public $id = null;
12
	public $result = null;
13
	public $error = null;
14
15
	/**
16
	 *
17
	 * @param bool $bIncludeProtected
18
	 * @return array
19
	 */
20 2
	protected function getProperties($bIncludeProtected = false) {
21 2
		$aRet = array();
22 2
		$t = new \ReflectionObject($this);
23 2
		$aProperties = $t->getProperties();
24
25
		/* @var $oProperty \ReflectionProperty */
26 2
		foreach ($aProperties as $oProperty) {
27 2
			$sName = $oProperty->getName();
28
29 2
			if ($oProperty->isPrivate() || $sName == '_current') {
30
				// skip private properties or IteratorTrait::$_current
31 2
				continue;
32 2
			} elseif ($oProperty->isProtected()) {
33 2
				if ($bIncludeProtected) {
34 1
					$oProperty->setAccessible(true);
35
				} else {
36 1
					continue;
37
				}
38
			}
39 2
			$aRet[$sName] = $oProperty->getValue($this);
40
		}
41 2
		return $aRet;
42
	}
43
44
}
45