@@ -53,7 +53,7 @@ |
||
| 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 | |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | try { |
| 63 | 63 | $file1 = $input->getOption('input1'); |
| 64 | 64 | $array1 = $parser->parseFile($file1); |
| 65 | - } catch(\Exception $e) { |
|
| 65 | + } catch (\Exception $e) { |
|
| 66 | 66 | $output->writeln('<bg=red;fg=white> ' . $e->getMessage() . ' </>'); |
| 67 | 67 | return; |
| 68 | 68 | } |
@@ -78,11 +78,11 @@ discard block |
||
| 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 | } |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | $merged[$key]['base'] = $value; |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | - foreach($array2 as $key => $value) { |
|
| 136 | + foreach ($array2 as $key => $value) { |
|
| 137 | 137 | $merged[$key]['current'] = $value; |
| 138 | 138 | } |
| 139 | 139 | |
@@ -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 | |
@@ -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) |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | foreach ($items as $item) { |
| 79 | 79 | |
| 80 | 80 | $class = $item->getAttribute('class'); |
| 81 | - if (! $class) { |
|
| 81 | + if (!$class) { |
|
| 82 | 82 | $class = explode('::', $item->parentNode->getAttribute('name'))[0]; |
| 83 | 83 | } |
| 84 | 84 | |
@@ -99,14 +99,14 @@ discard block |
||
| 99 | 99 | switch ($type) { |
| 100 | 100 | case 'error': |
| 101 | 101 | case 'failure': |
| 102 | - if (! $element->hasAttributes()) { |
|
| 102 | + if (!$element->hasAttributes()) { |
|
| 103 | 103 | break; |
| 104 | 104 | } |
| 105 | 105 | $message = $element->attributes->getNamedItem('message'); |
| 106 | 106 | if ($message instanceof \DOMAttr) { |
| 107 | 107 | $message = $message->value; |
| 108 | 108 | } |
| 109 | - $ftype = $element->attributes->getNamedItem('type'); |
|
| 109 | + $ftype = $element->attributes->getNamedItem('type'); |
|
| 110 | 110 | if ($ftype instanceof \DOMAttr) { |
| 111 | 111 | $ftype = $ftype->value; |
| 112 | 112 | } |