Checker   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 17
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A passes() 0 8 2
1
<?php
2
3
namespace DeGraciaMathieu\FreezeMyScalar;
4
5
use DeGraciaMathieu\FreezeMyScalar\Exceptions;
6
7
class Checker 
8
{
9
    /**
10
     * @param  string $rule
11
     * @param  mixed $content
12
     * @throws \DeGraciaMathieu\FreezeMyScalar\Exceptions\UnexpectedValueException
13
     * @return void
14
     */
15 3
    public static function passes($rule, $content)
16
    {
17 3
        $rule = new $rule;
18
19 3
        if (! $rule->verify($content)) {
20 1
            throw new Exceptions\UnexpectedValueException();
21
        }
22 2
    }
23
}
24