Completed
Push — master ( 15f79b...42f7e7 )
by Frédéric
03:51 queued 01:19
created

any   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 11
dl 0
loc 18
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 14 1
1
<?php namespace norsys\score\net\uri\scheme;
2
3
use norsys\score\{
4
	php,
5
	net\uri\scheme
6
};
7
8
class any extends php\string\lowercase
9
	implements
10
		scheme
11
{
12
	function __construct($string, \exception $exception = null)
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...
13
	{
14
		parent::__construct($string);
15
16
		(
17
			new php\test\match\regex(
18
				new php\string\regex\pcre('/^[a-z][a-z0-9+-.]*$/'),
19
				$this
20
			)
21
		)
22
			->recipientOfTestIs(
23
				new php\test\recipient\ifFalse\exception\fallback(
24
					new \invalidArgumentException('Scheme must follow ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )'),
25
					$exception
26
				)
27
			)
28
		;
29
	}
30
}
31