@@ -20,10 +20,10 @@ discard block |
||
20 | 20 | protected static function describeDataType($data) |
21 | 21 | { |
22 | 22 | if ($data instanceof \ReflectionClass) { |
23 | - return 'an instance of ' . $data->getName(); |
|
23 | + return 'an instance of '.$data->getName(); |
|
24 | 24 | } |
25 | 25 | if (is_object($data)) { |
26 | - return 'an instance of ' . get_class($data); |
|
26 | + return 'an instance of '.get_class($data); |
|
27 | 27 | } |
28 | 28 | if (is_array($data)) { |
29 | 29 | return 'an array'; |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | if (is_string($data)) { |
32 | 32 | return 'a string'; |
33 | 33 | } |
34 | - return '<' . var_export($data) . '>'; |
|
34 | + return '<'.var_export($data).'>'; |
|
35 | 35 | } |
36 | 36 | |
37 | 37 | protected static function describeAllowedTypes($allowedTypes) |
@@ -85,6 +85,9 @@ discard block |
||
85 | 85 | return $formatter; |
86 | 86 | } |
87 | 87 | |
88 | + /** |
|
89 | + * @param string $format |
|
90 | + */ |
|
88 | 91 | public function hasFormatter($format) |
89 | 92 | { |
90 | 93 | return array_key_exists($format, $this->formatters); |
@@ -135,8 +138,7 @@ discard block |
||
135 | 138 | * Restructure the data as necessary (e.g. to select or reorder fields). |
136 | 139 | * |
137 | 140 | * @param mixed $structuredOutput |
138 | - * @param array $configurationData |
|
139 | - * @param array $options |
|
141 | + * @param FormatterOptions $options |
|
140 | 142 | * @return mixed |
141 | 143 | */ |
142 | 144 | public function restructureData($structuredOutput, FormatterOptions $options) |
@@ -156,8 +158,7 @@ discard block |
||
156 | 158 | * validation will not occur. |
157 | 159 | * |
158 | 160 | * @param mixed $structuredOutput |
159 | - * @param array $configurationData |
|
160 | - * @param array $options |
|
161 | + * @param FormatterOptions $options |
|
161 | 162 | * @return mixed |
162 | 163 | */ |
163 | 164 | public function overrideRestructure(FormatterInterface $formatter, $structuredOutput, FormatterOptions $options) |
@@ -42,7 +42,7 @@ |
||
42 | 42 | */ |
43 | 43 | public function write(OutputInterface $output, $format, $structuredOutput, FormatterOptions $options) |
44 | 44 | { |
45 | - $formatter = $this->getFormatter((string)$format, $options); |
|
45 | + $formatter = $this->getFormatter((string) $format, $options); |
|
46 | 46 | $structuredOutput = $this->validateAndRestructure($formatter, $structuredOutput, $options); |
47 | 47 | $formatter->write($output, $structuredOutput, $options); |
48 | 48 | } |
@@ -43,6 +43,9 @@ discard block |
||
43 | 43 | return new self($configurationData + $this->getConfigurationData(), $this->getOptions()); |
44 | 44 | } |
45 | 45 | |
46 | + /** |
|
47 | + * @param string $key |
|
48 | + */ |
|
46 | 49 | public function get($key, $defaults = [], $default = false) |
47 | 50 | { |
48 | 51 | $value = $this->fetch($key, $defaults, $default); |
@@ -102,6 +105,10 @@ discard block |
||
102 | 105 | return $this; |
103 | 106 | } |
104 | 107 | |
108 | + /** |
|
109 | + * @param string $key |
|
110 | + * @param boolean $value |
|
111 | + */ |
|
105 | 112 | public function setConfigurationDefault($key, $value) |
106 | 113 | { |
107 | 114 | if (!array_key_exists($key, $this->configurationData)) { |
@@ -69,6 +69,9 @@ |
||
69 | 69 | } |
70 | 70 | } |
71 | 71 | |
72 | + /** |
|
73 | + * @param FormatterOptions $options |
|
74 | + */ |
|
72 | 75 | protected function writeCsvLine(OutputInterface $output, $data, $options) |
73 | 76 | { |
74 | 77 | $output->write($this->csvEscape($data)); |