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.

ConvertTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 3
Bugs 2 Features 0
Metric Value
wmc 2
c 3
b 2
f 0
lcom 0
cbo 2
dl 0
loc 30
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testObjectToArray() 0 5 1
A provideObjectsAndArrays() 0 14 1
1
<?php
2
3
namespace prgTW\BaseCRM\Tests\Utils;
4
5
use prgTW\BaseCRM\Utils\Convert;
6
7
class ConvertTest extends \PHPUnit_Framework_TestCase
8
{
9
	/**
10
	 * @dataProvider provideObjectsAndArrays
11
	 *
12
	 * @param object $object
13
	 * @param array  $array
14
	 */
15
	public function testObjectToArray($object, array $array)
16
	{
17
		$converted = Convert::objectToArray($object);
18
		$this->assertEquals($array, $converted);
19
	}
20
21
	public function provideObjectsAndArrays()
22
	{
23
		$obj1          = new \stdClass();
24
		$obj1->a       = 1;
25
		$obj1->b       = new \stdClass();
26
		$obj1->b->c    = 2;
27
		$obj1->b->d    = new \stdClass();
28
		$obj1->b->d->e = 3;
29
30
		return [
31
			[new \stdClass(), []],
32
			[$obj1, ['a' => 1, 'b' => ['c' => 2, 'd' => ['e' => 3]]]],
33
		];
34
	}
35
36
}
37