for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Polidog\SsrBundle\DependencyInjection;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
/**
* This is the class that loads and manages your bundle configuration.
*
* @see http://symfony.com/doc/current/cookbook/bundles/extension.html
*/
class PolidogSsrExtension extends Extension
{
* {@inheritdoc}
public function load(array $configs, ContainerBuilder $container)
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
$a = "a"; $ab = "ab"; $abc = "abc";
will produce issues in the first and second line, while this second example
will produce no issues.
$container->setParameter('polidog_ssr.bundle_src_path', $config['bundle_src_path']);
$container->setParameter('polidog_ssr.baracoa.object', $config['baracoa']['object']);
$container->setParameter('polidog_ssr.baracoa.cache_object', $config['baracoa']['cache_object']);
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');
}
This check marks files that end in a newline character, i.e. an empy line.
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.