for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is, guess what, part of WebHelper.
*
* (c) James <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace JamesRezo\WebHelper\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use JamesRezo\WebHelper\WebHelper;
class GenerateCommand extends Command
{
protected function configure()
$this
->setName('generate')
->setDescription('Output statements for a webserver')
->setHelp('The <info>generate</info> command creates one or many statements for the specified webserver.')
;
}
protected function execute(InputInterface $input, OutputInterface $output)
$input = $input;
$input
This checks looks for cases where a variable has been assigned to itself.
This assignement can be removed without consequences.
$webhelper = new WebHelper();
$webhelper->setRepository(__DIR__ . '/../../res');
if ($webhelper->getRepository()->okGo()) {
$webhelper->setServer('apache', '2.4.18');
foreach (['alias', 'directory'] as $directive) {
$twigFile = $webhelper->find($directive);
$output->write($webhelper->render($twigFile, [
'project' => [
'aliasname' => 'webhelper',
'documentroot' => realpath(__DIR__ . '/../../')
]
]));
This checks looks for cases where a variable has been assigned to itself.
This assignement can be removed without consequences.