for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Mage Scan
*
* PHP version 5
* @category MageScan
* @package MageScan
* @author Steve Robbins <[email protected]>
* @copyright 2015 Steve Robbins
* @license http://creativecommons.org/licenses/by/4.0/ CC BY 4.0
* @link https://github.com/steverobbins/magescan
*/
namespace MageScan\Command\Scan;
use MageScan\Check\Version;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
* Scan version command
class VersionCommand extends AbstractCommand
{
* Configure command
* @return void
protected function configure()
$this
->setName('scan:version')
->setDescription('Get the version of a Magento installation');
parent::configure();
}
* Execute command
* @param InputInterface $input
* @param OutputInterface $output
protected function execute(InputInterface $input, OutputInterface $output)
$version = new Version;
$version->setRequest($this->request);
$version = $version->getInfo();
$this->out('Magento Information', [[
'type' => 'table',
'data' => [
['Parameter', 'Value'],
[
['Edition', $version[0] ?: 'Unknown'],
['Version', $version[1] ?: 'Unknown'],
]
]]);