method   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 13
dl 0
loc 22
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 2
A keyValueSerializerIs() 0 7 1
1
<?php namespace norsys\score\composer\scripts;
2
3
use norsys\score\composer\scripts\part;
4
use norsys\score\serializer\keyValue as serializer;
5
use norsys\score\php;
6
7
class method
8
	implements
9
		part
10
{
11
	private
12
		$method,
13
		$converter
14
	;
15
16
	function __construct(php\method $method, php\method\converter\toString $converter = null)
17
	{
18
		$this->method = $method;
19
		$this->converter = $converter ?: new php\method\converter\toString\official;
20
	}
21
22
	function keyValueSerializerIs(serializer $serializer) :void
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
23
	{
24
		$this->converter
25
			->recipientOfPhpMethodAsStringIs(
26
				$this->method,
27
				new serializer\string\recipient(
28
					$serializer
29
				)
30
			)
31
		;
32
	}
33
}
34