Completed
Branch master (c0ce1f)
by Andreas
02:40
created
src/Command/DiffCommand.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,12 +37,12 @@
 block discarded – undo
37 37
     protected function configure()
38 38
     {
39 39
         $this->setName('diff')
40
-             ->setDescription('Shows a diff between two JUnit log files')
41
-             ->setDefinition(array(
42
-                 new InputOption('input1', '1', InputOption::VALUE_REQUIRED, 'First input file'),
43
-                 new InputOption('input2', '2', InputOption::VALUE_REQUIRED, 'Second input file')
44
-             ))
45
-             ->setHelp('');
40
+                ->setDescription('Shows a diff between two JUnit log files')
41
+                ->setDefinition(array(
42
+                    new InputOption('input1', '1', InputOption::VALUE_REQUIRED, 'First input file'),
43
+                    new InputOption('input2', '2', InputOption::VALUE_REQUIRED, 'Second input file')
44
+                ))
45
+                ->setHelp('');
46 46
     }
47 47
 
48 48
 
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         try {
57 57
             $file1  = $input->getOption('input1');
58 58
             $array1 = $this->parseJunitFile($file1);
59
-        } catch(\Exception $e) {
59
+        } catch (\Exception $e) {
60 60
             $output->writeln('<bg=red;fg=white>  ' . $e->getMessage() . '  </>');
61 61
             return;
62 62
         }
@@ -72,11 +72,11 @@  discard block
 block discarded – undo
72 72
         $array = $this->merge($array1, $array2);
73 73
 
74 74
         foreach ($array as $key => $value) {
75
-            if (! isset($value['base'])) {
75
+            if (!isset($value['base'])) {
76 76
                 $output->writeln('<bg=green;fg=black>+</> ' . $key);
77 77
                 continue;
78 78
             }
79
-            if (! isset($value['current'])) {
79
+            if (!isset($value['current'])) {
80 80
                 $output->writeln('<bg=red;fg=yellow>-</> ' . $key);
81 81
                 continue;
82 82
             }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             $merged[$key]['base'] = $value;
128 128
         }
129 129
 
130
-        foreach($array2 as $key => $value) {
130
+        foreach ($array2 as $key => $value) {
131 131
             $merged[$key]['current'] = $value;
132 132
         }
133 133
 
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 
139 139
     protected function parseJunitFile($filename)
140 140
     {
141
-        if (! is_readable($filename)) {
141
+        if (!is_readable($filename)) {
142 142
             throw new \UnexpectedValueException(sprintf(
143 143
                 'File %s is not readable',
144 144
                 basename($filename)
Please login to merge, or discard this patch.