| @@ -25,7 +25,7 @@ | ||
| 25 | 25 | protected function tsvEscape($data) | 
| 26 | 26 |      { | 
| 27 | 27 |          return implode("\t", array_map( | 
| 28 | -            function ($item) { | |
| 28 | +            function($item) { | |
| 29 | 29 | return str_replace(["\t", "\n"], ['\t', '\n'], $item); | 
| 30 | 30 | }, | 
| 31 | 31 | $data | 
| @@ -67,7 +67,7 @@ | ||
| 67 | 67 | return | 
| 68 | 68 | array_filter( | 
| 69 | 69 | array_keys($fieldLabels), | 
| 70 | -                function ($key) use ($fieldRegex, $fieldLabels) { | |
| 70 | +                function($key) use ($fieldRegex, $fieldLabels) { | |
| 71 | 71 | $value = $fieldLabels[$key]; | 
| 72 | 72 | return preg_match($fieldRegex, $value) || preg_match($fieldRegex, $key); | 
| 73 | 73 | } | 
| @@ -11,7 +11,7 @@ | ||
| 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 | } | 
| @@ -30,15 +30,15 @@ | ||
| 30 | 30 |              if (is_array($data) || ($data->getName() == 'ArrayObject')) { | 
| 31 | 31 | return 'an array'; | 
| 32 | 32 | } | 
| 33 | - return 'an instance of ' . $data->getName(); | |
| 33 | + return 'an instance of '.$data->getName(); | |
| 34 | 34 | } | 
| 35 | 35 |          if (is_string($data)) { | 
| 36 | 36 | return 'a string'; | 
| 37 | 37 | } | 
| 38 | 38 |          if (is_object($data)) { | 
| 39 | - return 'an instance of ' . get_class($data); | |
| 39 | + return 'an instance of '.get_class($data); | |
| 40 | 40 | } | 
| 41 | -        throw new \Exception("Undescribable data error: " . var_export($data, true)); | |
| 41 | +        throw new \Exception("Undescribable data error: ".var_export($data, true)); | |
| 42 | 42 | } | 
| 43 | 43 | |
| 44 | 44 | protected static function describeAllowedTypes($allowedTypes) | 
| @@ -13,7 +13,7 @@ | ||
| 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()) || | 
| @@ -42,7 +42,7 @@ | ||
| 42 | 42 |      { | 
| 43 | 43 | $flattenedRendererList = array_reduce( | 
| 44 | 44 | $this->rendererList, | 
| 45 | -            function ($carry, $item) { | |
| 45 | +            function($carry, $item) { | |
| 46 | 46 | return array_merge($carry, $item); | 
| 47 | 47 | }, | 
| 48 | 48 | [] | 
| @@ -89,7 +89,7 @@ discard block | ||
| 89 | 89 |              if (!empty($headers)) { | 
| 90 | 90 | array_splice($headers, 1, 0, ':'); | 
| 91 | 91 | } | 
| 92 | -            $data = array_map(function ($item) { | |
| 92 | +            $data = array_map(function($item) { | |
| 93 | 93 | array_splice($item, 1, 0, ':'); | 
| 94 | 94 | return $item; | 
| 95 | 95 | }, $data); | 
| @@ -116,7 +116,7 @@ discard block | ||
| 116 | 116 | $wrapper = new WordWrapper($options->get(FormatterOptions::TERMINAL_WIDTH)); | 
| 117 | 117 | $wrapper->setPaddingFromStyle($tableStyle); | 
| 118 | 118 |          if (!empty($headers)) { | 
| 119 | -            $headerLengths = array_map(function ($item) { | |
| 119 | +            $headerLengths = array_map(function($item) { | |
| 120 | 120 | return strlen($item); | 
| 121 | 121 | }, $headers); | 
| 122 | 122 | $wrapper->setMinimumWidths($headerLengths); | 
| @@ -58,7 +58,7 @@ | ||
| 58 | 58 | return $childElementName; | 
| 59 | 59 | } | 
| 60 | 60 |          if (is_object($value)) { | 
| 61 | - $value = (array)$value; | |
| 61 | + $value = (array) $value; | |
| 62 | 62 | } | 
| 63 | 63 |          if (!is_array($value)) { | 
| 64 | 64 | return $key; | 
| @@ -111,13 +111,13 @@ discard block | ||
| 111 | 111 | |
| 112 | 112 |          if (count($validFormats) > 1) { | 
| 113 | 113 | // Make an input option for --format | 
| 114 | -            $description = 'Format the result data. Available formats: ' . implode(',', $validFormats); | |
| 114 | +            $description = 'Format the result data. Available formats: '.implode(',', $validFormats); | |
| 115 | 115 | $automaticOptions[FormatterOptions::FORMAT] = new InputOption(FormatterOptions::FORMAT, '', InputOption::VALUE_OPTIONAL, $description, $defaultFormat); | 
| 116 | 116 | } | 
| 117 | 117 | |
| 118 | 118 |          if ($availableFields) { | 
| 119 | 119 | $defaultFields = $options->get(FormatterOptions::DEFAULT_FIELDS, [], ''); | 
| 120 | -            $description = 'Available fields: ' . implode(', ', $this->availableFieldsList($availableFields)); | |
| 120 | +            $description = 'Available fields: '.implode(', ', $this->availableFieldsList($availableFields)); | |
| 121 | 121 | $automaticOptions[FormatterOptions::FIELDS] = new InputOption(FormatterOptions::FIELDS, '', InputOption::VALUE_OPTIONAL, $description, $defaultFields); | 
| 122 | 122 | $automaticOptions[FormatterOptions::FIELD] = new InputOption(FormatterOptions::FIELD, '', InputOption::VALUE_OPTIONAL, "Select just one field, and force format to 'string'.", ''); | 
| 123 | 123 | } | 
| @@ -132,8 +132,8 @@ discard block | ||
| 132 | 132 | protected function availableFieldsList($availableFields) | 
| 133 | 133 |      { | 
| 134 | 134 | return array_map( | 
| 135 | -            function ($key) use ($availableFields) { | |
| 136 | - return $availableFields[$key] . " ($key)"; | |
| 135 | +            function($key) use ($availableFields) { | |
| 136 | + return $availableFields[$key]." ($key)"; | |
| 137 | 137 | }, | 
| 138 | 138 | array_keys($availableFields) | 
| 139 | 139 | ); | 
| @@ -197,10 +197,10 @@ discard block | ||
| 197 | 197 | */ | 
| 198 | 198 | public function write(OutputInterface $output, $format, $structuredOutput, FormatterOptions $options) | 
| 199 | 199 |      { | 
| 200 | - $formatter = $this->getFormatter((string)$format); | |
| 200 | + $formatter = $this->getFormatter((string) $format); | |
| 201 | 201 |          if (!is_string($structuredOutput) && !$this->isValidFormat($formatter, $structuredOutput)) { | 
| 202 | 202 | $validFormats = $this->validFormats($structuredOutput); | 
| 203 | - throw new InvalidFormatException((string)$format, $structuredOutput, $validFormats); | |
| 203 | + throw new InvalidFormatException((string) $format, $structuredOutput, $validFormats); | |
| 204 | 204 | } | 
| 205 | 205 | // Give the formatter a chance to override the options | 
| 206 | 206 | $options = $this->overrideOptions($formatter, $structuredOutput, $options); |