Test Failed
Push — master ( 8f2167...5d2217 )
by Georgi
08:27
created

HasPackageManifest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getCachedManifestPath() 0 3 1
A packageManifest() 0 3 2
1
<?php 
2
3
namespace Epesi\Core\System\Modules\Concerns;
4
5
use Illuminate\Filesystem\Filesystem;
6
use Epesi\Core\System\Modules\PackageManifest;
7
8
trait HasPackageManifest
9
{
10
	protected static $packageManifest;
11
	
12
	final public static function packageManifest()
13
	{
14
		return self::$packageManifest = self::$packageManifest?: new PackageManifest(new Filesystem(), app()->basePath(), self::getCachedManifestPath());
15
	}
16
	
17
	final public static function getCachedManifestPath()
18
	{
19
		return app()->bootstrapPath() . '/cache/epesi.php';
20
	}
21
}