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.

NullSubstitute   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A apply() 0 4 1
1
<?php
2
3
namespace Papper\MemberOption;
4
5
use Papper\MemberOptionInterface;
6
use Papper\PropertyMap;
7
use Papper\TypeMap;
8
9
/**
10
 * Allows to supply an alternate value for a destination member if the source value is null anywhere along the member chain.
11
 *
12
 * @author Vladimir Komissarov <[email protected]>
13
 */
14
class NullSubstitute implements MemberOptionInterface
15
{
16
	private $nullSubtitute;
17
18
	public function __construct($nullSubtitute)
19
	{
20
		$this->nullSubtitute = $nullSubtitute;
21
	}
22
23
	public function apply(TypeMap $typeMap, PropertyMap $propertyMap)
24
	{
25
		$propertyMap->setNullSubtitute($this->nullSubtitute);
26
	}
27
}
28