Completed
Push — master ( 27c6b5...777874 )
by Emlyn
05:09
created

AbstractComponent::getPath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1
Metric Value
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * @package    Fuel\Foundation
4
 * @version    2.0
5
 * @author     Fuel Development Team
6
 * @license    MIT License
7
 * @copyright  2010 - 2016 Fuel Development Team
8
 * @link       http://fuelphp.com
9
 */
10
11
declare(strict_types=1);
12
13
namespace Fuel\Foundation;
14
15
use ReflectionClass;
16
17
abstract class AbstractComponent implements ComponentInterface
18
{
19
	/**
20
	 * {@inheritdoc}
21
	 */
22 6
	public function getPath() : string
23
	{
24 6
		$reflection = new ReflectionClass(static::class);
25 6
		return dirname($reflection->getFileName()) . '/..';
26
	}
27
}
28