any   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A stringIs() 0 11 1
A __construct() 0 4 1
1
<?php namespace norsys\score\php\string\recipient\slashes;
2
3
use norsys\score\php\{
4
	string\recipient,
5
	charlist
6
};
7
8
class any
9
	implements
10
		recipient
11
{
12
	private
13
		$charlist,
14
		$recipient
15
	;
16
17
	function __construct(charlist $charlist, recipient $recipient)
18
	{
19
		$this->charlist = $charlist;
20
		$this->recipient = $recipient;
21
	}
22
23
	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...
24
	{
25
		(
26
			new charlist\converter\toString\official
27
		)
28
			->recipientOfCharlistAsStringIs(
29
				$this->charlist,
30
				new recipient\functor(
31
					function($charlist) use ($string)
32
					{
33
						$this->recipient->stringIs(addcslashes($string, $charlist));
34
					}
35
				)
36
			)
37
		;
38
	}
39
}
40