Completed
Push — master ( 49fe21...84aa69 )
by WEBEWEB
01:47
created

ClassUtility   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 13
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getShortName() 0 3 1
1
<?php
2
3
/**
4
 * This file is part of the core-library package.
5
 *
6
 * (c) 2018 NdC/WBW
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Library\Core\Utility;
13
14
use ReflectionClass;
15
16
/**
17
 * Class utility.
18
 *
19
 * @author NdC/WBW <https://github.com/webeweb/>
20
 * @package WBW\Library\Core\Utility
21
 * @final
22
 */
23
final class ClassUtility {
24
25
    /**
26
     * Get the short class name.
27
     *
28
     * @param mixed $classname The class name or object.
29
     * @return string Returns the short class name.
30
     */
31
    public static function getShortName($classname) {
32
        return (new ReflectionClass($classname))->getShortName();
33
    }
34
35
}
36