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.

NullSubstituteTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 7

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 7
dl 0
loc 20
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testMap() 0 17 1
1
<?php
2
3
namespace Papper\Tests\MemberOptions\NullSubstitute;
4
5
use Papper\MemberOption\NullSubstitute;
6
use Papper\Tests\FixtureBase;
7
use Papper\Tests\TestCaseBase;
8
9
/**
10
 * Class NullSubstituteTest
11
 *
12
 * @
13
 */
14
class NullSubstituteTest extends TestCaseBase
15
{
16
	public function testMap()
17
	{
18
		// arrange
19
		$source = new Source();
20
		$source->value = null;
21
22
		$engine = $this->createEngine();
23
		$engine->createMap(Source::className(), Destination::className())
24
			->forMember('value', new NullSubstitute('I am null!'));
25
26
		// act
27
		/** @var Destination $dest */
28
		$dest = $engine->map($source)->toType(Destination::className());
29
30
		// assert
31
		$this->assertEquals('I am null!', $dest->value);
32
	}
33
}
34
35
class Source extends FixtureBase
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
36
{
37
	public $value;
38
}
39
40
class Destination extends FixtureBase
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
41
{
42
	public $value;
43
}
44