Completed
Push — master ( e8a810...7ca800 )
by Andrew
07:51 queued 05:38
created

Util   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A readProperty() 0 8 1
1
<?php
2
3
namespace AndrewCarterUK\NoMoreLeaksBundle;
4
5
class Util
6
{
7
    public static function readProperty($object, $property)
8
    {
9 2
        $closure = \Closure::bind(function () use ($object, $property) {
10 2
            return $object->{$property};
11 2
        }, null, $object);
12
13 2
        return $closure();
14
    }
15
}
16