PhpCsFixer\Console\Application::getLongVersion PHP Method

getLongVersion() public method

public getLongVersion ( )
    public function getLongVersion()
    {
        $version = parent::getLongVersion() . ' by <comment>Fabien Potencier</comment> and <comment>Dariusz Ruminski</comment>';
        $commit = '@git-commit@';
        if ('@' . 'git-commit@' !== $commit) {
            $version .= ' (' . substr($commit, 0, 7) . ')';
        }
        return $version;
    }

Usage Example

 public function testApplication()
 {
     $app = new Application();
     $this->assertStringMatchesFormat('<info>PHP CS Fixer</info> version <comment>%d.%d%s</comment> by <comment>Fabien Potencier</comment> and <comment>Dariusz Ruminski</comment>', $app->getLongVersion());
 }