fifo::keyValueSerializerIs()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

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