Completed
Pull Request — master (#69)
by Greg
01:48
created
src/StructuredData/UnstructuredListData.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         }
37 37
         $transformed_fields = [];
38 38
         foreach ($fields as $field) {
39
-            list($machine_name,$label) = explode(' as ', $field) + [$field, preg_replace('#.*\.#', '', $field)];
39
+            list($machine_name, $label) = explode(' as ', $field) + [$field, preg_replace('#.*\.#', '', $field)];
40 40
             $transformed_fields[$machine_name] = $label;
41 41
         }
42 42
         return $transformed_fields;
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
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
         if (count($validFormats) > 1) {
120 120
             // Make an input option for --format
121
-            $description = 'Format the result data. Available formats: ' . implode(',', $validFormats);
121
+            $description = 'Format the result data. Available formats: '.implode(',', $validFormats);
122 122
             $automaticOptions[FormatterOptions::FORMAT] = new InputOption(FormatterOptions::FORMAT, '', InputOption::VALUE_REQUIRED, $description, $defaultFormat);
123 123
         }
124 124
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
         if ($availableFields) {
128 128
             $defaultFields = $options->get(FormatterOptions::DEFAULT_FIELDS, [], '');
129
-            $description = 'Available fields: ' . implode(', ', $this->availableFieldsList($availableFields));
129
+            $description = 'Available fields: '.implode(', ', $this->availableFieldsList($availableFields));
130 130
             $automaticOptions[FormatterOptions::FIELDS] = new InputOption(FormatterOptions::FIELDS, '', InputOption::VALUE_REQUIRED, $description, $defaultFields);
131 131
         } elseif ($dataTypeClass->implementsInterface(RestructureInterface::class)) {
132 132
             $automaticOptions[FormatterOptions::FIELDS] = new InputOption(FormatterOptions::FIELDS, '', InputOption::VALUE_REQUIRED, 'Dot notation of fields to include in output.', []);
@@ -146,8 +146,8 @@  discard block
 block discarded – undo
146 146
     protected function availableFieldsList($availableFields)
147 147
     {
148 148
         return array_map(
149
-            function ($key) use ($availableFields) {
150
-                return $availableFields[$key] . " ($key)";
149
+            function($key) use ($availableFields) {
150
+                return $availableFields[$key]." ($key)";
151 151
             },
152 152
             array_keys($availableFields)
153 153
         );
@@ -211,10 +211,10 @@  discard block
 block discarded – undo
211 211
      */
212 212
     public function write(OutputInterface $output, $format, $structuredOutput, FormatterOptions $options)
213 213
     {
214
-        $formatter = $this->getFormatter((string)$format);
214
+        $formatter = $this->getFormatter((string) $format);
215 215
         if (!is_string($structuredOutput) && !$this->isValidFormat($formatter, $structuredOutput)) {
216 216
             $validFormats = $this->validFormats($structuredOutput);
217
-            throw new InvalidFormatException((string)$format, $structuredOutput, $validFormats);
217
+            throw new InvalidFormatException((string) $format, $structuredOutput, $validFormats);
218 218
         }
219 219
         if ($structuredOutput instanceof FormatterAwareInterface) {
220 220
             $structuredOutput->setFormatter($formatter);
Please login to merge, or discard this patch.