@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | ->scalarNode('base_url') |
79 | 79 | ->defaultValue(null) |
80 | 80 | ->validate() |
81 | - ->ifTrue(function ($v) { |
|
81 | + ->ifTrue(function($v) { |
|
82 | 82 | return !is_string($v); |
83 | 83 | }) |
84 | 84 | ->thenInvalid('base_url can be: string') |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | ->end() |
87 | 87 | ->arrayNode('options') |
88 | 88 | ->validate() |
89 | - ->ifTrue(function ($options) { |
|
89 | + ->ifTrue(function($options) { |
|
90 | 90 | return count($options['form_params']) && count($options['multipart']); |
91 | 91 | }) |
92 | 92 | ->thenInvalid('You cannot use form_params and multipart at the same time.') |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | ->end() |
100 | 100 | ->variableNode('allow_redirects') |
101 | 101 | ->validate() |
102 | - ->ifTrue(function ($v) { |
|
102 | + ->ifTrue(function($v) { |
|
103 | 103 | return !is_array($v) && !is_bool($v); |
104 | 104 | }) |
105 | 105 | ->thenInvalid('allow_redirects can be: bool or array') |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | ->end() |
108 | 108 | ->variableNode('auth') |
109 | 109 | ->validate() |
110 | - ->ifTrue(function ($v) { |
|
110 | + ->ifTrue(function($v) { |
|
111 | 111 | return !is_array($v) && !is_string($v); |
112 | 112 | }) |
113 | 113 | ->thenInvalid('auth can be: string or array') |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | ->end() |
116 | 116 | ->variableNode('query') |
117 | 117 | ->validate() |
118 | - ->ifTrue(function ($v) { |
|
118 | + ->ifTrue(function($v) { |
|
119 | 119 | return !is_string($v) && !is_array($v); |
120 | 120 | }) |
121 | 121 | ->thenInvalid('query can be: string or array') |
@@ -124,16 +124,16 @@ discard block |
||
124 | 124 | ->arrayNode('curl') |
125 | 125 | ->beforeNormalization() |
126 | 126 | ->ifArray() |
127 | - ->then(function (array $curlOptions) { |
|
127 | + ->then(function(array $curlOptions) { |
|
128 | 128 | $result = []; |
129 | 129 | |
130 | 130 | foreach ($curlOptions as $key => $value) { |
131 | - $optionName = 'CURLOPT_' . strtoupper($key); |
|
131 | + $optionName = 'CURLOPT_'.strtoupper($key); |
|
132 | 132 | |
133 | 133 | if (!defined($optionName)) { |
134 | 134 | throw new InvalidConfigurationException(sprintf( |
135 | - 'Invalid curl option in eight_points_guzzle: %s. ' . |
|
136 | - 'Ex: use sslversion for CURLOPT_SSLVERSION option. ' . PHP_EOL . |
|
135 | + 'Invalid curl option in eight_points_guzzle: %s. '. |
|
136 | + 'Ex: use sslversion for CURLOPT_SSLVERSION option. '.PHP_EOL. |
|
137 | 137 | 'See all available options: http://php.net/manual/en/function.curl-setopt.php', |
138 | 138 | $key |
139 | 139 | )); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | ->end() |
151 | 151 | ->variableNode('cert') |
152 | 152 | ->validate() |
153 | - ->ifTrue(function ($v) { |
|
153 | + ->ifTrue(function($v) { |
|
154 | 154 | return !is_string($v) && (!is_array($v) || count($v) !== 2); |
155 | 155 | }) |
156 | 156 | ->thenInvalid('cert can be: string or array with two entries (path and password)') |
@@ -160,7 +160,7 @@ discard block |
||
160 | 160 | ->booleanNode('debug')->end() |
161 | 161 | ->variableNode('decode_content') |
162 | 162 | ->validate() |
163 | - ->ifTrue(function ($v) { |
|
163 | + ->ifTrue(function($v) { |
|
164 | 164 | return !is_string($v) && !is_bool($v); |
165 | 165 | }) |
166 | 166 | ->thenInvalid('decode_content can be: bool or string (gzip, compress, deflate, etc...)') |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | ->end() |
178 | 178 | ->scalarNode('sink') |
179 | 179 | ->validate() |
180 | - ->ifTrue(function ($v) { |
|
180 | + ->ifTrue(function($v) { |
|
181 | 181 | return !is_string($v); |
182 | 182 | }) |
183 | 183 | ->thenInvalid('sink can be: string') |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | ->booleanNode('http_errors')->end() |
187 | 187 | ->variableNode('expect') |
188 | 188 | ->validate() |
189 | - ->ifTrue(function ($v) { |
|
189 | + ->ifTrue(function($v) { |
|
190 | 190 | return !is_bool($v) && !is_int($v); |
191 | 191 | }) |
192 | 192 | ->thenInvalid('expect can be: bool or int') |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | ->end() |
195 | 195 | ->variableNode('ssl_key') |
196 | 196 | ->validate() |
197 | - ->ifTrue(function ($v) { |
|
197 | + ->ifTrue(function($v) { |
|
198 | 198 | return !is_string($v) && (!is_array($v) || count($v) !== 2); |
199 | 199 | }) |
200 | 200 | ->thenInvalid('ssl_key can be: string or array with two entries (path and password)') |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | ->scalarNode('timeout')->end() |
207 | 207 | ->variableNode('verify') |
208 | 208 | ->validate() |
209 | - ->ifTrue(function ($v) { |
|
209 | + ->ifTrue(function($v) { |
|
210 | 210 | return !is_bool($v) && !is_string($v); |
211 | 211 | }) |
212 | 212 | ->thenInvalid('verify can be: bool or string') |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | ->end() |
237 | 237 | ->scalarNode('version') |
238 | 238 | ->validate() |
239 | - ->ifTrue(function ($v) { |
|
239 | + ->ifTrue(function($v) { |
|
240 | 240 | return !is_string($v) && !is_float($v); |
241 | 241 | }) |
242 | 242 | ->thenInvalid('version can be: string or float') |