Completed
Push — master ( 7d24f6...de5c91 )
by Razon
05:04 queued 03:34
created

ComposerHelper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 3
c 1
b 0
f 0
dl 0
loc 11
rs 10
ccs 0
cts 3
cp 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getVendorPath() 0 4 1
1
<?php
2
namespace RazonYang\MediaWiki\ZhConverter;
3
4
use Composer\Autoload\ClassLoader;
5
6
class ComposerHelper
7
{
8
    /**
9
     * Gets composer vendor path.
10
     *
11
     * @return string
12
     */
13
    public static function getVendorPath()
14
    {
15
        $reflection = new \ReflectionClass(ClassLoader::class);
16
        return dirname(dirname($reflection->getFileName()));
17
    }
18
}
19