Completed
Push — master ( 373b7d...c92b89 )
by Razon
11:43 queued 10:06
created

ComposerHelper::getVendorPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
nc 1
nop 0
crap 2
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