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.

IgnoreTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 7

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testShouldNotMapIgnoredMembers() 0 12 1
A testMapperShouldThrowExceptionWhenSourceMemberMissing() 0 8 1
1
<?php
2
3
namespace Papper\Tests\MemberOptions\Ignore;
4
5
use Papper\Engine;
6
use Papper\MemberOption\Ignore;
7
use Papper\Tests\FixtureBase;
8
use Papper\Tests\TestCaseBase;
9
10
class IgnoreTest extends TestCaseBase
11
{
12
	public function testShouldNotMapIgnoredMembers()
13
	{
14
		// arrange
15
		$engine = new Engine();
16
		$engine->createMap(Source::className(), Destination::className())
17
			->forMember('value', new Ignore());
18
		// act
19
		/** @var Destination $destination */
20
		$destination = $engine->map(new Source())->toType(Destination::className());
21
		// assert
22
		$this->assertNull($destination->value);
23
	}
24
25
	public function testMapperShouldThrowExceptionWhenSourceMemberMissing()
26
	{
27
		$this->setExpectedException('Papper\MappingException');
28
		// arrange
29
		$engine = new Engine();
30
		// act
31
		$engine->map(new Source())->toType(Destination::className());
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
}
38
39
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...
40
{
41
	public $value;
42
}
43