Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/dependency-injection/Definition.php @ 18:af1871eacc83
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:33:08 +0100 |
parents | 129ea1e6d783 |
children |
comparison
equal
deleted
inserted
replaced
17:129ea1e6d783 | 18:af1871eacc83 |
---|---|
261 | 261 |
262 if (\is_int($index) && ($index < 0 || $index > \count($this->arguments) - 1)) { | 262 if (\is_int($index) && ($index < 0 || $index > \count($this->arguments) - 1)) { |
263 throw new OutOfBoundsException(sprintf('The index "%d" is not in the range [0, %d].', $index, \count($this->arguments) - 1)); | 263 throw new OutOfBoundsException(sprintf('The index "%d" is not in the range [0, %d].', $index, \count($this->arguments) - 1)); |
264 } | 264 } |
265 | 265 |
266 if (!array_key_exists($index, $this->arguments)) { | 266 if (!\array_key_exists($index, $this->arguments)) { |
267 throw new OutOfBoundsException(sprintf('The argument "%s" doesn\'t exist.', $index)); | 267 throw new OutOfBoundsException(sprintf('The argument "%s" doesn\'t exist.', $index)); |
268 } | 268 } |
269 | 269 |
270 $this->arguments[$index] = $argument; | 270 $this->arguments[$index] = $argument; |
271 | 271 |
306 * | 306 * |
307 * @throws OutOfBoundsException When the argument does not exist | 307 * @throws OutOfBoundsException When the argument does not exist |
308 */ | 308 */ |
309 public function getArgument($index) | 309 public function getArgument($index) |
310 { | 310 { |
311 if (!array_key_exists($index, $this->arguments)) { | 311 if (!\array_key_exists($index, $this->arguments)) { |
312 throw new OutOfBoundsException(sprintf('The argument "%s" doesn\'t exist.', $index)); | 312 throw new OutOfBoundsException(sprintf('The argument "%s" doesn\'t exist.', $index)); |
313 } | 313 } |
314 | 314 |
315 return $this->arguments[$index]; | 315 return $this->arguments[$index]; |
316 } | 316 } |