any::stringIs()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 11
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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