Passed
Pull Request — master (#61)
by Saiful
02:44
created

ClassUtils   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 9
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getClass() 0 7 2
1
<?php
2
3
namespace Xiidea\EasyAuditBundle\Common;
4
5
use Doctrine\Persistence\Proxy;
6
7
class ClassUtils
8
{
9
    public static function getClass($entity): string
10
    {
11
        if ($entity instanceof Proxy) {
12
            return get_parent_class($entity);
13
        }
14
15
        return get_class($entity);
16
    }
17
}