Completed
Branch — master (ab32a2)
by Francesco
04:49
created
DependencyInjection/MesHighlightExtension.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
13 13
 
14 14
 use Symfony\Component\Config\FileLocator;
15 15
 use Symfony\Component\DependencyInjection\ContainerBuilder;
16
-use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
17 16
 use Symfony\Component\HttpKernel\DependencyInjection\ConfigurableExtension;
18 17
 
19 18
 /**
Please login to merge, or discard this patch.
Highlighter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     {
73 73
         $pattern = '#(?:'.$this->leftDelimiter.')([\S|\s]+)(?:'.$this->rightDelimiter.')#iU';
74 74
 
75
-        return preg_replace_callback($pattern, function ($matches) use ($language) {
75
+        return preg_replace_callback($pattern, function($matches) use ($language) {
76 76
             return $this->highlight($this->resolveResource(trim($matches[1])), $language);
77 77
         }, $content);
78 78
     }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         if ($this->showLines) {
96 96
             $lines = preg_split("/\r\n|\r|\n/", $value);
97 97
 
98
-            array_walk($lines, function (&$line, $index) {
98
+            array_walk($lines, function(&$line, $index) {
99 99
                 $line = <<<HTML
100 100
 <div class="line"><span class="linenum">$index</span>$line</div>
101 101
 HTML;
Please login to merge, or discard this patch.
Controller/HighlightDemoController.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@
 block discarded – undo
26 26
     public function highlightDemoAction()
27 27
     {
28 28
         $root = dirname($this->get('kernel')
29
-                             ->locateResource('@MesHighlightBundle/MesHighlightBundle.php'));
29
+                                ->locateResource('@MesHighlightBundle/MesHighlightBundle.php'));
30 30
 
31 31
         // Change root path for "code files".
32 32
         $this->get('mes_highlight.highlighter')
33
-             ->setRootPath($root);
33
+                ->setRootPath($root);
34 34
 
35 35
         $content = <<<'CODE'
36 36
 <h1>MesHighlightBundle Demo</h1>
Please login to merge, or discard this patch.
Resources/demo/demo.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,19 +25,19 @@
 block discarded – undo
25 25
     public function highlightDemoAction()
26 26
     {
27 27
         $root = dirname($this->get('kernel')
28
-                             ->locateResource('@MesHighlightBundle/MesHighlightBundle.php'));
28
+                                ->locateResource('@MesHighlightBundle/MesHighlightBundle.php'));
29 29
 
30 30
         // Change root path for "code files".
31 31
         $this->get('mes_highlight.highlighter')
32
-             ->setRootPath($root);
32
+                ->setRootPath($root);
33 33
 
34 34
         // Add js language for highlighting.
35 35
         $this->get('mes_highlight.highlighter')
36
-             ->addSupportedLanguages(array(
37
-                 'js',
38
-                 'xml',
39
-                 'http',
40
-             ));
36
+                ->addSupportedLanguages(array(
37
+                    'js',
38
+                    'xml',
39
+                    'http',
40
+                ));
41 41
 
42 42
         $content = '{{Resources/demo/demo.php}}';
43 43
 
Please login to merge, or discard this patch.
DependencyInjection/Compiler/AddTwigExtensionCompilerPass.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -32,11 +32,11 @@
 block discarded – undo
32 32
         }
33 33
 
34 34
         $container->register('mes_highlight.highlighter.twig_extension', 'Mes\Misc\HighlightBundle\Twig\Extension\HighlightExtension')
35
-                  ->setPublic(false);
35
+                    ->setPublic(false);
36 36
 
37 37
         $container->getDefinition('twig')
38
-                  ->addMethodCall('addExtension', array(
39
-                      new Reference('mes_highlight.highlighter.twig_extension'),
40
-                  ));
38
+                    ->addMethodCall('addExtension', array(
39
+                        new Reference('mes_highlight.highlighter.twig_extension'),
40
+                    ));
41 41
     }
42 42
 }
Please login to merge, or discard this patch.
DependencyInjection/Configuration.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
         $rootNode = $treeBuilder->root('mes_highlight');
46 46
 
47 47
         $rootNode->fixXmlConfig('supported_language')
48
-                 ->addDefaultsIfNotSet()
49
-                 ->children()
48
+                    ->addDefaultsIfNotSet()
49
+                    ->children()
50 50
                     ->arrayNode('supported_languages')
51 51
                         ->info('Supported languages')
52 52
                         ->example('supported_languages: ["php", "xml", "twig", "javascript", "sql", "json"]')
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
                         ->example('root_path: "%kernel.root_dir%"')
69 69
                         ->defaultValue($this->rootPath)
70 70
                     ->end()
71
-                 ->end();
71
+                    ->end();
72 72
 
73 73
         return $treeBuilder;
74 74
     }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
                         ->defaultValue(array('php', 'xml', 'twig', 'javascript', 'sql', 'json'))
54 54
                         ->validate()
55 55
                         ->always()
56
-                            ->then(function ($languages) {
56
+                            ->then(function($languages) {
57 57
                                 if (empty($languages)) {
58 58
                                     throw new \InvalidArgumentException(sprintf('Option "%s" cannot be empty.', 'supported_languages'));
59 59
                                 }
Please login to merge, or discard this patch.