Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / league / container / src / Definition / CallableDefinition.php
1 <?php
2
3 namespace League\Container\Definition;
4
5 class CallableDefinition extends AbstractDefinition
6 {
7     /**
8      * {@inheritdoc}
9      */
10     public function build(array $args = [])
11     {
12         $args     = (empty($args)) ? $this->arguments : $args;
13         $resolved = $this->resolveArguments($args);
14
15         if (is_array($this->concrete) && is_string($this->concrete[0])) {
16             $this->concrete[0] = ($this->getContainer()->has($this->concrete[0]))
17                                ? $this->getContainer()->get($this->concrete[0])
18                                : $this->concrete[0];
19         }
20
21         return call_user_func_array($this->concrete, $resolved);
22     }
23 }