for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author Patsura Dmitry https://github.com/ovr <[email protected]>
*/
namespace PHPSA;
use PHPSA\Command\CheckCommand;
class Application extends \Symfony\Component\Console\Application
{
* @var Configuration
protected $configuration;
* @var IssuesCollector
protected $issuesCollector;
* @var Compiler
public $compiler;
const VERSION = '0.4-dev';
public function __construct()
parent::__construct('PHP Static Analyzer', $this->getStringVersion());
$this->add(new CheckCommand());
$this->issuesCollector = new IssuesCollector();
$this->configuration = new Configuration();
}
* @return string
protected function getStringVersion()
$hash = $this->getCVVersion();
if (!empty($hash)) {
return self::VERSION . ' #' . $hash;
return self::VERSION;
protected function getCVVersion()
exec('git describe --always', $version_mini_hash);
return $version_mini_hash ? $version_mini_hash[0] : '';
* @return Configuration
public function getConfiguration()
return $this->configuration;
* @return IssuesCollector
public function getIssuesCollector()
return $this->issuesCollector;