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\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This is the class that validates and merges configuration from your app/config files.
*
* To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/configuration.html}
*/
class Configuration implements ConfigurationInterface
{
* {@inheritdoc}
public function getConfigTreeBuilder()
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('polidog_ssr');
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.
$rootNode
->children()
->scalarNode('bundle_src_path')->isRequired()->end()
->scalarNode('cache')->defaultFalse()->end()
->arrayNode('baracoa')
->addDefaultsIfNotSet()
->scalarNode('object')->defaultValue('polidog_ssr.baracore')->isRequired()->end()
->scalarNode('cache_object')->defaultValue('polidog_ssr.cache_baracore')->isRequired()->end()
->end()
;
return $treeBuilder;
}
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.