Completed
Pull Request — master (#25)
by Greg
02:42
created
src/Transformations/DomToArraySimplifier.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     }
17 17
 
18 18
     /**
19
-     * @param ReflectionClass $dataType
19
+     * @param \ReflectionClass $dataType
20 20
      */
21 21
     public function canSimplify(\ReflectionClass $dataType)
22 22
     {
Please login to merge, or discard this patch.
src/FormatterManager.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
         if (count($validFormats) > 1) {
92 92
             // Make an input option for --format
93
-            $description = 'Format the result data. Available formats: ' . implode(',', $validFormats);
93
+            $description = 'Format the result data. Available formats: '.implode(',', $validFormats);
94 94
             $automaticOptions[FormatterOptions::FORMAT] = new InputOption(FormatterOptions::FORMAT, '', InputOption::VALUE_OPTIONAL, $description, $defaultFormat);
95 95
         }
96 96
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             // We have fields; that implies 'table', unless someone says something different
100 100
             $defaultFormat = 'table';
101 101
 
102
-            $description = 'Available fields: ' . implode(', ', $this->availableFieldsList($availableFields));
102
+            $description = 'Available fields: '.implode(', ', $this->availableFieldsList($availableFields));
103 103
             $automaticOptions[FormatterOptions::FIELDS] = new InputOption(FormatterOptions::FIELDS, '', InputOption::VALUE_OPTIONAL, $description, $defaultFields);
104 104
         }
105 105
 
@@ -113,8 +113,8 @@  discard block
 block discarded – undo
113 113
     protected function availableFieldsList($availableFields)
114 114
     {
115 115
         return array_map(
116
-            function ($key) use ($availableFields) {
117
-                return $availableFields[$key] . " ($key)";
116
+            function($key) use ($availableFields) {
117
+                return $availableFields[$key]." ($key)";
118 118
             },
119 119
             array_keys($availableFields)
120 120
         );
@@ -210,10 +210,10 @@  discard block
 block discarded – undo
210 210
      */
211 211
     public function write(OutputInterface $output, $format, $structuredOutput, FormatterOptions $options)
212 212
     {
213
-        $formatter = $this->getFormatter((string)$format);
213
+        $formatter = $this->getFormatter((string) $format);
214 214
         if (!is_string($structuredOutput) && !$this->isValidFormat($formatter, $structuredOutput)) {
215 215
             $validFormats = $this->validFormats($structuredOutput);
216
-            throw new InvalidFormatException((string)$format, $structuredOutput, $validFormats);
216
+            throw new InvalidFormatException((string) $format, $structuredOutput, $validFormats);
217 217
         }
218 218
         // Give the formatter a chance to override the options
219 219
         $options = $this->overrideOptions($formatter, $structuredOutput, $options);
Please login to merge, or discard this patch.
src/Exception/InvalidFormatException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
     public function __construct($format, $data, $validFormats)
12 12
     {
13 13
         $dataDescription = static::describeDataType($data);
14
-        $message = "The format $format cannot be used with the data produced by this command, which was $dataDescription.  Valid formats are: " . implode(',', $validFormats);
14
+        $message = "The format $format cannot be used with the data produced by this command, which was $dataDescription.  Valid formats are: ".implode(',', $validFormats);
15 15
         parent::__construct($message, 1);
16 16
     }
17 17
 }
Please login to merge, or discard this patch.
src/Formatters/StringFormatter.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -4,9 +4,7 @@
 block discarded – undo
4 4
 use Consolidation\OutputFormatters\Validate\ValidationInterface;
5 5
 use Consolidation\OutputFormatters\Options\OverrideOptionsInterface;
6 6
 use Consolidation\OutputFormatters\Options\FormatterOptions;
7
-use Consolidation\OutputFormatters\Validate\ValidDataTypesTrait;
8 7
 use Symfony\Component\Console\Output\OutputInterface;
9
-use Consolidation\OutputFormatters\StructuredData\RestructureInterface;
10 8
 
11 9
 /**
12 10
  * String formatter
Please login to merge, or discard this patch.
src/Validate/ValidDataTypesTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
     {
14 14
         return array_reduce(
15 15
             $this->validDataTypes(),
16
-            function ($carry, $supportedType) use ($dataType) {
16
+            function($carry, $supportedType) use ($dataType) {
17 17
                 return
18 18
                     $carry ||
19 19
                     ($dataType->getName() == $supportedType->getName()) ||
Please login to merge, or discard this patch.