@@ -41,6 +41,10 @@ |
||
41 | 41 | |
42 | 42 | protected $file2; |
43 | 43 | |
44 | + /** |
|
45 | + * @param string $file1 |
|
46 | + * @param string $file2 |
|
47 | + */ |
|
44 | 48 | public function __construct(StyleInterface $style, $file1, $file2) |
45 | 49 | { |
46 | 50 | $this->style = $style; |
@@ -40,6 +40,9 @@ |
||
40 | 40 | |
41 | 41 | private $verbosity; |
42 | 42 | |
43 | + /** |
|
44 | + * @param integer $verbosity |
|
45 | + */ |
|
43 | 46 | public function __construct(StyleInterface $style, $verbosity = Output::VERBOSITY_NORMAL) |
44 | 47 | { |
45 | 48 | $this->style = $style; |
@@ -51,11 +51,11 @@ discard block |
||
51 | 51 | $mergeResult->sort(); |
52 | 52 | |
53 | 53 | foreach ($mergeResult as $key => $value) { |
54 | - if (! isset($value['base'])) { |
|
54 | + if (!isset($value['base'])) { |
|
55 | 55 | $this->writeAddedTest($key); |
56 | 56 | continue; |
57 | 57 | } |
58 | - if (! isset($value['current'])) { |
|
58 | + if (!isset($value['current'])) { |
|
59 | 59 | $this->writeRemovedTest($key); |
60 | 60 | continue; |
61 | 61 | } |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | |
113 | 113 | private function addVerboseInformationToChangedTest($current) |
114 | 114 | { |
115 | - if (! $current['message']) { |
|
115 | + if (!$current['message']) { |
|
116 | 116 | return; |
117 | 117 | } |
118 | 118 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | private function addVeryVerboseInformationToChangedTest($current) |
131 | 131 | { |
132 | - if (! $current['info']) { |
|
132 | + if (!$current['info']) { |
|
133 | 133 | return; |
134 | 134 | } |
135 | 135 |
@@ -36,7 +36,6 @@ |
||
36 | 36 | use Org_Heigl\JUnitDiff\Writer\FileSummary; |
37 | 37 | use Org_Heigl\JUnitDiff\Writer\Legend; |
38 | 38 | use Org_Heigl\JUnitDiff\Writer\Standard; |
39 | -use Org_Heigl\JUnitDiff\Writer\Quiet; |
|
40 | 39 | use Org_Heigl\JUnitDiff\Writer\Summary; |
41 | 40 | use Symfony\Component\Console\Command\Command; |
42 | 41 | use Symfony\Component\Console\Input\InputArgument; |
@@ -49,12 +49,12 @@ |
||
49 | 49 | protected function configure() |
50 | 50 | { |
51 | 51 | $this->setName('compare') |
52 | - ->setDescription('Compares two JUnit log files') |
|
53 | - ->setDefinition([ |
|
54 | - new InputArgument('base', InputArgument::REQUIRED, 'Base file for the comparison'), |
|
55 | - new InputArgument('current', InputArgument::REQUIRED, 'Current file to compare against the base file') |
|
56 | - ]) |
|
57 | - ->setHelp(''); |
|
52 | + ->setDescription('Compares two JUnit log files') |
|
53 | + ->setDefinition([ |
|
54 | + new InputArgument('base', InputArgument::REQUIRED, 'Base file for the comparison'), |
|
55 | + new InputArgument('current', InputArgument::REQUIRED, 'Current file to compare against the base file') |
|
56 | + ]) |
|
57 | + ->setHelp(''); |
|
58 | 58 | } |
59 | 59 | |
60 | 60 |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | public function getLastLibXmlError() |
40 | 40 | { |
41 | 41 | $error = libxml_get_last_error(); |
42 | - if (! $error instanceof \LibXMLError) { |
|
42 | + if (!$error instanceof \LibXMLError) { |
|
43 | 43 | return false; |
44 | 44 | } |
45 | 45 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function parseFile($filename) |
56 | 56 | { |
57 | - if (! is_readable($filename)) { |
|
57 | + if (!is_readable($filename)) { |
|
58 | 58 | throw new \UnexpectedValueException(sprintf( |
59 | 59 | 'File %s is not readable', |
60 | 60 | basename($filename) |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $items = $xpath->query('//testcase'); |
78 | 78 | foreach ($items as $item) { |
79 | 79 | $class = $item->getAttribute('class'); |
80 | - if (! $class) { |
|
80 | + if (!$class) { |
|
81 | 81 | $class = explode('::', $item->parentNode->getAttribute('name'))[0]; |
82 | 82 | } |
83 | 83 | |
@@ -98,14 +98,14 @@ discard block |
||
98 | 98 | switch ($type) { |
99 | 99 | case 'error': |
100 | 100 | case 'failure': |
101 | - if (! $element->hasAttributes()) { |
|
101 | + if (!$element->hasAttributes()) { |
|
102 | 102 | break; |
103 | 103 | } |
104 | 104 | $message = $element->attributes->getNamedItem('message'); |
105 | 105 | if ($message instanceof \DOMAttr) { |
106 | 106 | $message = $message->value; |
107 | 107 | } |
108 | - $ftype = $element->attributes->getNamedItem('type'); |
|
108 | + $ftype = $element->attributes->getNamedItem('type'); |
|
109 | 109 | if ($ftype instanceof \DOMAttr) { |
110 | 110 | $ftype = $ftype->value; |
111 | 111 | } |
@@ -41,12 +41,12 @@ |
||
41 | 41 | protected function configure() |
42 | 42 | { |
43 | 43 | $this->setName('diff') |
44 | - ->setDescription('Shows a diff between two JUnit log files') |
|
45 | - ->setDefinition([ |
|
46 | - new InputOption('input1', '1', InputOption::VALUE_REQUIRED, 'First input file'), |
|
47 | - new InputOption('input2', '2', InputOption::VALUE_REQUIRED, 'Second input file') |
|
48 | - ]) |
|
49 | - ->setHelp(''); |
|
44 | + ->setDescription('Shows a diff between two JUnit log files') |
|
45 | + ->setDefinition([ |
|
46 | + new InputOption('input1', '1', InputOption::VALUE_REQUIRED, 'First input file'), |
|
47 | + new InputOption('input2', '2', InputOption::VALUE_REQUIRED, 'Second input file') |
|
48 | + ]) |
|
49 | + ->setHelp(''); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 |
@@ -78,11 +78,11 @@ |
||
78 | 78 | $array = $this->merge($array1, $array2); |
79 | 79 | |
80 | 80 | foreach ($array as $key => $value) { |
81 | - if (! isset($value['base'])) { |
|
81 | + if (!isset($value['base'])) { |
|
82 | 82 | $output->writeln('<bg=green;fg=black>+</> ' . $key); |
83 | 83 | continue; |
84 | 84 | } |
85 | - if (! isset($value['current'])) { |
|
85 | + if (!isset($value['current'])) { |
|
86 | 86 | $output->writeln('<bg=red;fg=yellow>-</> ' . $key); |
87 | 87 | continue; |
88 | 88 | } |