rfc3986   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 24
dl 0
loc 42
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A recipientOfNetUriAsStringIs() 0 27 1
1
<?php namespace norsys\score\net\uri\converter\toString;
2
3
use norsys\score\{
4
	net\uri,
5
	net\uri\converter\toString,
6
	php\string\recipient,
7
	php\string\provider,
8
	php\string\buffer
9
};
10
11
class rfc3986
12
	implements
13
		toString
14
{
15
	private
16
		$schemeConverter,
17
		$hierPartConverter
18
	;
19
20
	function __construct(uri\scheme\converter\toString $schemeConverter, uri\hierPart\converter\toString $hierPartConverter)
21
	{
22
		$this->schemeConverter = $schemeConverter;
23
		$this->hierPartConverter = $hierPartConverter;
24
	}
25
26
	function recipientOfNetUriAsStringIs(uri $uri, 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...
27
	{
28
		$uri
29
			->recipientOfNetUriSchemeAsStringFromConverterIs(
30
				$this->schemeConverter,
31
				new recipient\functor(
32
					function($scheme) use ($uri, $recipient)
33
					{
34
						(
35
							new buffer\infinite($scheme)
36
						)
37
							->recipientOfStringFromProviderIs(
38
								new provider\functor(
39
									function($recipient) use ($uri)
40
									{
41
										$uri
42
											->recipientOfNetUriHierPartAsStringFromConverterIs(
43
												$this->hierPartConverter,
44
												new recipient\prefix(
45
													':',
46
													$recipient
47
												)
48
											)
49
										;
50
									}
51
								),
52
								$recipient
53
							)
54
						;
55
					}
56
				)
57
			)
58
		;
59
	}
60
}
61