fifo   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 11
dl 0
loc 28
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A recipientOfFsPathFilenameInContainerIs() 0 3 1
A blockForContainerIteratorIs() 0 8 1
1
<?php namespace norsys\score\fs\path\filename\container;
2
3
use norsys\score\fs\path\{ filename\container, filename };
4
use norsys\score\container\{ iterator\block, iterator };
5
6
class fifo
7
	implements
8
		container
9
{
10
	private
11
		$filenames
12
	;
13
14
	function __construct(filename... $filenames)
15
	{
16
		$this->filenames = $filenames;
17
	}
18
19
	function blockForContainerIteratorIs(block $block) :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...
20
	{
21
		(
22
			new iterator\fifo
23
		)
24
			->variablesForIteratorBlockAre(
25
				$block,
26
				... $this->filenames
27
			)
28
		;
29
	}
30
31
	function recipientOfFsPathFilenameInContainerIs(container\filename\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...
32
	{
33
		$recipient->fsPathFilenameInContainerAre(... $this->filenames);
34
	}
35
}
36