Completed
Push — master ( 8158f1...90d7fd )
by Konstantinos
11:17 queued 06:55
created

InstanceOfTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 4 1
A get() 0 4 1
1
<?php
2
3
namespace BZIon\Twig;
4
5
class InstanceOfTest
6
{
7
    /**
8
     * Find if a model is valid
9
     *
10
     * @return bool
11
     */
12 1
    public function __invoke($variable, $instance)
13
    {
14 1
        return $variable instanceof $instance;
15
    }
16
17 1
    public static function get()
18
    {
19 1
        return new \Twig_SimpleTest('instanceof', new self());
20
    }
21
}
22