Completed
Push — master ( df5bb2...a0585b )
by Frédéric
03:38
created

recipientOfSegmentInNetUriPathAsStringFromConverterIs()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 19
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php namespace norsys\score\net\uri\path;
2
3
use norsys\score\{
4
	net\uri\path,
5
	php\string\recipient,
6
	container\fifo,
7
	container\iterator\block\functor as block
8
};
9
10
class abempty
11
	implements
12
		path
13
{
14
	private
15
		$segments
16
	;
17
18
	function __construct(segment... $segments)
19
	{
20
		$this->segments = $segments;
21
	}
22
23
	function recipientOfSegmentInNetUriPathAsStringFromConverterIs(path\segment\converter\toString $converter, 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...
24
	{
25
		$buffer = new recipient\buffer;
26
27
		(
28
			new fifo(
29
				... $this->segments
30
			)
31
		)
32
			->blockForIteratorIs(
33
				new block(
34
					function($iterator, $segment) use ($converter, $buffer) {
35
						$converter->recipientOfSegmentInNetUriPathAsStringIs($segment, $buffer);
36
					}
37
				)
38
			)
39
		;
40
41
		$buffer->recipientOfStringIs($recipient);
42
	}
43
}
44