comparison vendor/zendframework/zend-diactoros/src/ServerRequest.php @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents 5311817fb629
children
comparison
equal deleted inserted replaced
3:307d7a7fd348 4:a9cd425dd02b
178 /** 178 /**
179 * {@inheritdoc} 179 * {@inheritdoc}
180 */ 180 */
181 public function withParsedBody($data) 181 public function withParsedBody($data)
182 { 182 {
183 if (! is_array($data) && ! is_object($data) && null !== $data) {
184 throw new InvalidArgumentException(sprintf(
185 '%s expects a null, array, or object argument; received %s',
186 __METHOD__,
187 gettype($data)
188 ));
189 }
190
183 $new = clone $this; 191 $new = clone $this;
184 $new->parsedBody = $data; 192 $new->parsedBody = $data;
185 return $new; 193 return $new;
186 } 194 }
187 195