for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Karma\Configuration\Parser;
use Karma\Configuration\Parser;
class ExternalParser extends AbstractSectionParser
{
private
$parser,
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.
$variables,
$filesStatus;
public function __construct(Parser $parser)
parent::__construct();
$this->parser = $parser;
$this->variables = array();
$this->filesStatus = array();
}
public function parseLine($line)
if($this->isACommentLine($line))
return true;
$file = trim($line);
$found = false;
if($this->parser->getFileSystem()->has($file))
$found = true;
$this->variables = $this->parser->parse($file);
$this->filesStatus[$file] = array(
'found' => $found,
'referencedFrom' => $this->currentFilePath,
);
public function getExternalVariables()
return $this->variables;
public function getExternalFilesStatus()
return $this->filesStatus;
Only declaring a single property per statement allows you to later on add doc comments more easily.
It is also recommended by PSR2, so it is a common style that many people expect.