1 | <?php |
||
7 | class Environment extends ConfigurationContainer |
||
8 | { |
||
9 | /** |
||
10 | * Find if there are some overrides for a configuration |
||
11 | * |
||
12 | * @param string $key |
||
13 | * @return bool |
||
14 | */ |
||
15 | 27 | protected function hasOverrides($key) |
|
23 | |||
24 | 27 | public function getSource() |
|
25 | { |
||
26 | 27 | $source = $this->getValueOrFail('source', 'no source specified'); |
|
27 | |||
28 | 24 | $resolvedSource = $this->manager->get('source', $source); |
|
29 | |||
30 | 21 | if (!$this->hasOverrides('source')) { |
|
31 | 15 | return $resolvedSource; |
|
32 | } |
||
33 | |||
34 | 6 | return Source::make('override', $this->data['overrides']['source'], $this->manager, $resolvedSource); |
|
|
|||
35 | } |
||
36 | |||
37 | 15 | public function getServers() |
|
38 | { |
||
39 | 15 | $servers = $this->getValueOrFail('servers', 'no servers specified'); |
|
40 | |||
41 | 15 | $resolvedServers = []; |
|
42 | 15 | foreach ($servers as $server) { |
|
43 | 15 | $resolvedServers[] = $this->manager->get('server', $server); |
|
44 | 10 | } |
|
45 | |||
46 | 15 | return $resolvedServers; |
|
47 | } |
||
48 | |||
49 | 21 | public function getDirectories() |
|
59 | |||
60 | 12 | public function getTasks($event) |
|
61 | { |
||
88 | |||
89 | /** |
||
90 | * {@inheritdoc} |
||
91 | */ |
||
92 | 24 | public function checkValidity() |
|
113 | |||
114 | 3 | public function getSubstitutions($binary) |
|
124 | } |
||
125 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: