@@ 187-198 (lines=12) @@ | ||
184 | } |
|
185 | } |
|
186 | ||
187 | if ($traverse && $this->hasTraits()) { |
|
188 | ||
189 | /** |
|
190 | * @var TraitMetadata $trait |
|
191 | */ |
|
192 | foreach ($this->traits as $trait) { |
|
193 | ||
194 | if ($trait->hasPublicMethod($name, $traverse)) { |
|
195 | return $trait->getPublicMethod($name, $traverse); |
|
196 | } |
|
197 | } |
|
198 | } |
|
199 | ||
200 | throw new RuntimeException(sprintf('Method "%s()" for trait "%s" does not exists.', $name, $this->name)); |
|
201 | } |
@@ 275-286 (lines=12) @@ | ||
272 | } |
|
273 | } |
|
274 | ||
275 | if ($traverse && $this->hasTraits()) { |
|
276 | ||
277 | /** |
|
278 | * @var TraitMetadata $trait |
|
279 | */ |
|
280 | foreach ($this->traits as $trait) { |
|
281 | ||
282 | if ($trait->hasPublicMethod($name, $traverse)) { |
|
283 | return $trait->getPublicMethod($name, $traverse); |
|
284 | } |
|
285 | } |
|
286 | } |
|
287 | ||
288 | if ($traverse && $this->hasParent() && $this->getParent()->hasPublicMethod($name, $traverse)) { |
|
289 | return $this->getParent()->getPublicMethod($name, $traverse); |