lastname   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 20
dl 0
loc 38
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A recipientOfHumanNameAsStringIs() 0 34 1
1
<?php namespace norsys\score\human\name\converter\toString\firstname;
2
3
use norsys\score\human\{ name, name\converter\toString };
4
use norsys\score\php\{ string\recipient, block };
5
use norsys\score\trampoline;
6
7
class lastname
8
	implements
9
		toString
10
{
11
	function recipientOfHumanNameAsStringIs(name $name, recipient $recipient) :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...
12
	{
13
		(
14
			new trampoline\container\fifo(
15
				new trampoline\functor(
16
					function($block) use ($name)
17
					{
18
						$name->recipientOfFirstnameAsStringIs(
19
							new recipient\block($block)
20
						);
21
					}
22
				),
23
				new trampoline\functor(
24
					function($block) use ($name)
25
					{
26
						$name->recipientOfLastnameAsStringIs(
27
							new recipient\block($block)
28
						);
29
					}
30
				)
31
			)
32
		)
33
			->argumentsForBlockAre(
34
				new block\functor(
35
					function($firstname, $lastname) use ($recipient)
36
					{
37
						(
38
							new recipient\surround(
39
								$firstname,
40
								$lastname,
41
								$recipient
42
							)
43
						)
44
							->stringIs(' ')
45
						;
46
					}
47
				)
48
			)
49
		;
50
	}
51
}
52