provider::recipientOfStringIs()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 27
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 27
rs 9.8666
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php namespace norsys\score\php\string\provider\suffix;
2
3
use norsys\score\php;
4
use norsys\score\php\string\{ recipient, recipient\buffer };
5
use norsys\score\container\iterator\{ fifo, block };
6
7
class provider
8
	implements
9
		php\string\provider
10
{
11
	private
12
		$suffix,
13
		$providers
14
	;
15
16
	function __construct(php\string\provider $suffix, php\string\provider... $providers)
17
	{
18
		$this->suffix = $suffix;
19
		$this->providers = $providers;
20
	}
21
22
	function recipientOfStringIs(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...
23
	{
24
		$buffer = new php\string\buffer\infinite;
25
26
		(
27
			new fifo
28
		)
29
			->variablesForIteratorBlockAre(
30
				new block\functor(
31
					function($iterator, $provider) use ($buffer)
32
					{
33
						$provider
34
							->recipientOfStringIs(
35
								new recipient\suffix\provider(
36
									$this->suffix,
37
									new recipient\buffer($buffer)
38
								)
39
							)
40
						;
41
42
					}
43
				),
44
				... $this->providers
45
			)
46
		;
47
48
		$buffer->recipientOfStringFromBufferIs($recipient);
49
	}
50
}
51