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::getProperties()   B
last analyzed

Complexity

Conditions 6
Paths 5

Size

Total Lines 23

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 14
CRAP Score 6

Importance

Changes 0
Metric Value
cc 6
nc 5
nop 1
dl 0
loc 23
ccs 14
cts 14
cp 1
crap 6
rs 8.9297
c 0
b 0
f 0
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