Conform to new rules

This commit is contained in:
QWp6t
2015-12-27 23:42:11 -08:00
committed by Ben Word
parent 2d02544173
commit 6a4d3bd51a
12 changed files with 306 additions and 281 deletions

View File

@@ -5,25 +5,29 @@
* @package Roots\Sage
* @author QWp6t
*/
class JsonManifest implements ManifestInterface {
/** @var array */
protected $manifest = [];
class JsonManifest implements ManifestInterface
{
/** @var array */
protected $manifest = [];
/**
* JsonManifest constructor
* @param string $manifestPath Local filesystem path to JSON-encoded manifest
*/
public function __construct($manifestPath) {
$this->manifest = file_exists($manifestPath) ? json_decode(file_get_contents($manifestPath), true) : [];
}
/**
* JsonManifest constructor
* @param string $manifestPath Local filesystem path to JSON-encoded manifest
*/
public function __construct($manifestPath)
{
$this->manifest = file_exists($manifestPath) ? json_decode(file_get_contents($manifestPath), true) : [];
}
/** @inheritdoc */
public function get($file) {
return isset($this->manifest[$file]) ? $this->manifest[$file] : $file;
}
/** @inheritdoc */
public function get($file)
{
return isset($this->manifest[$file]) ? $this->manifest[$file] : $file;
}
/** @inheritdoc */
public function getAll() {
return $this->manifest;
}
/** @inheritdoc */
public function getAll()
{
return $this->manifest;
}
}