Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/dependency-injection/Compiler/CheckArgumentsValidityPass.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 |
---|---|
39 } | 39 } |
40 | 40 |
41 $i = 0; | 41 $i = 0; |
42 foreach ($value->getArguments() as $k => $v) { | 42 foreach ($value->getArguments() as $k => $v) { |
43 if ($k !== $i++) { | 43 if ($k !== $i++) { |
44 if (!is_int($k)) { | 44 if (!\is_int($k)) { |
45 $msg = sprintf('Invalid constructor argument for service "%s": integer expected but found string "%s". Check your service definition.', $this->currentId, $k); | 45 $msg = sprintf('Invalid constructor argument for service "%s": integer expected but found string "%s". Check your service definition.', $this->currentId, $k); |
46 $value->addError($msg); | 46 $value->addError($msg); |
47 if ($this->throwExceptions) { | 47 if ($this->throwExceptions) { |
48 throw new RuntimeException($msg); | 48 throw new RuntimeException($msg); |
49 } | 49 } |
61 | 61 |
62 foreach ($value->getMethodCalls() as $methodCall) { | 62 foreach ($value->getMethodCalls() as $methodCall) { |
63 $i = 0; | 63 $i = 0; |
64 foreach ($methodCall[1] as $k => $v) { | 64 foreach ($methodCall[1] as $k => $v) { |
65 if ($k !== $i++) { | 65 if ($k !== $i++) { |
66 if (!is_int($k)) { | 66 if (!\is_int($k)) { |
67 $msg = sprintf('Invalid argument for method call "%s" of service "%s": integer expected but found string "%s". Check your service definition.', $methodCall[0], $this->currentId, $k); | 67 $msg = sprintf('Invalid argument for method call "%s" of service "%s": integer expected but found string "%s". Check your service definition.', $methodCall[0], $this->currentId, $k); |
68 $value->addError($msg); | 68 $value->addError($msg); |
69 if ($this->throwExceptions) { | 69 if ($this->throwExceptions) { |
70 throw new RuntimeException($msg); | 70 throw new RuntimeException($msg); |
71 } | 71 } |