Completed
Push — master ( c92b89...bb4046 )
by Razon
10:10 queued 08:29
created

ComposerHelper::getVendorPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 1
b 0
f 0
ccs 3
cts 3
cp 1
cc 1
nc 1
nop 0
crap 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 1
    public static function getVendorPath()
14
    {
15 1
        $reflection = new \ReflectionClass(ClassLoader::class);
16 1
        return dirname(dirname($reflection->getFileName()));
17
    }
18
}
19