Passed
Push — master ( 42f7e7...125d75 )
by Frédéric
02:06
created

fifo::stringIs()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 10
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php namespace norsys\score\php\string\recipient;
2
3
use norsys\score\{
4
	php\string\recipient,
5
	container,
6
	container\iterator
7
};
8
9
class fifo
10
	implements
11
		recipient
12
{
13
	private
14
		$recipients
15
	;
16
17
	function __construct(recipient... $recipients)
18
	{
19
		$this->recipients = $recipients;
20
	}
21
22
	function stringIs(string $string) :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
		(
25
			new container\fifo(... $this->recipients)
26
		)
27
			->blockForIteratorIs(
28
				new iterator\block\functor(
29
					function($iterator, $recipient) use ($string)
30
					{
31
						$recipient->stringIs($string);
32
					}
33
				)
34
			)
35
		;
36
	}
37
}
38