Completed
Push — master ( c63a7f...74e06a )
by Derek
02:21
created

Query::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 1
crap 2
1
<?php
2
namespace Subreality\Dilmun\Anshar\Http\UriParts;
3
4
class Query
5
{
6
    private static $unreserved_pattern  = '\w\-\.~';
0 ignored issues
show
Unused Code introduced by
The property $unreserved_pattern is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
7
    private static $pct_encoded_pattern = '%[A-Fa-f0-9]{2}';
0 ignored issues
show
Unused Code introduced by
The property $pct_encoded_pattern is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
8
9
    private $query = "";
0 ignored issues
show
Unused Code introduced by
The property $query is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
10
11 7
    public function __construct($query)
12
    {
13 7
        if (!is_string($query)) {
14 6
            throw new \InvalidArgumentException("Query must be a string");
15
        }
16
    }
17
}