Completed
Pull Request — master (#16)
by Andreas
03:16
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.
src/JUnitParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      */
39 39
     public function parseFile($filename)
40 40
     {
41
-        if (! is_readable($filename)) {
41
+        if (!is_readable($filename)) {
42 42
             throw new \UnexpectedValueException(sprintf(
43 43
                 'File %s is not readable',
44 44
                 basename($filename)
Please login to merge, or discard this patch.
src/JUnitMerger.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
             $this->mergeResult->addBase($key, $value);
54 54
         }
55 55
 
56
-        foreach($array2 as $key => $value) {
56
+        foreach ($array2 as $key => $value) {
57 57
             $this->mergeResult->addCurrent($key, $value);
58 58
         }
59 59
 
Please login to merge, or discard this patch.
src/Writer/Standard.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,11 +47,11 @@
 block discarded – undo
47 47
         $mergeResult->sort();
48 48
 
49 49
         foreach ($mergeResult as $key => $value) {
50
-            if (! isset($value['base'])) {
50
+            if (!isset($value['base'])) {
51 51
                 $this->style->text('<bg=green;fg=black>+</> ' . $key);
52 52
                 continue;
53 53
             }
54
-            if (! isset($value['current'])) {
54
+            if (!isset($value['current'])) {
55 55
                 $this->style->text('<bg=red;fg=yellow>-</> ' . $key);
56 56
                 continue;
57 57
             }
Please login to merge, or discard this patch.
src/Command/CompareCommand.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,12 +47,12 @@
 block discarded – undo
47 47
     protected function configure()
48 48
     {
49 49
         $this->setName('compare')
50
-             ->setDescription('Compares two JUnit log files')
51
-             ->setDefinition(array(
52
-                 new InputArgument('base', InputArgument::REQUIRED, 'Base file for the comparison'),
53
-                 new InputArgument('current', InputArgument::REQUIRED, 'Current file to compare against the base file')
54
-             ))
55
-             ->setHelp('');
50
+                ->setDescription('Compares two JUnit log files')
51
+                ->setDefinition(array(
52
+                    new InputArgument('base', InputArgument::REQUIRED, 'Base file for the comparison'),
53
+                    new InputArgument('current', InputArgument::REQUIRED, 'Current file to compare against the base file')
54
+                ))
55
+                ->setHelp('');
56 56
     }
57 57
 
58 58
 
Please login to merge, or discard this patch.