Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/dependency-injection/Argument/ServiceClosureArgument.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
23 { | 23 { |
24 private $values; | 24 private $values; |
25 | 25 |
26 public function __construct(Reference $reference) | 26 public function __construct(Reference $reference) |
27 { | 27 { |
28 $this->values = array($reference); | 28 $this->values = [$reference]; |
29 } | 29 } |
30 | 30 |
31 /** | 31 /** |
32 * {@inheritdoc} | 32 * {@inheritdoc} |
33 */ | 33 */ |
39 /** | 39 /** |
40 * {@inheritdoc} | 40 * {@inheritdoc} |
41 */ | 41 */ |
42 public function setValues(array $values) | 42 public function setValues(array $values) |
43 { | 43 { |
44 if (array(0) !== array_keys($values) || !($values[0] instanceof Reference || null === $values[0])) { | 44 if ([0] !== array_keys($values) || !($values[0] instanceof Reference || null === $values[0])) { |
45 throw new InvalidArgumentException('A ServiceClosureArgument must hold one and only one Reference.'); | 45 throw new InvalidArgumentException('A ServiceClosureArgument must hold one and only one Reference.'); |
46 } | 46 } |
47 | 47 |
48 $this->values = $values; | 48 $this->values = $values; |
49 } | 49 } |