fifo   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 14
dl 0
loc 30
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A keyValueSerializerIs() 0 17 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