Completed
Push — master ( 373b7d...c92b89 )
by Razon
11:43 queued 10:06
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
ccs 0
cts 4
cp 0
rs 10

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