@@ 274-285 (lines=12) @@ | ||
271 | } |
|
272 | } |
|
273 | ||
274 | if ($traverse && $this->hasTraits()) { |
|
275 | ||
276 | /** |
|
277 | * @var TraitMetadata $trait |
|
278 | */ |
|
279 | foreach ($this->traits as $trait) { |
|
280 | ||
281 | if ($trait->hasPublicMethod($name, $traverse)) { |
|
282 | return $trait->getPublicMethod($name, $traverse); |
|
283 | } |
|
284 | } |
|
285 | } |
|
286 | ||
287 | if ($traverse && $this->hasParent() && $this->getParent()->hasPublicMethod($name, $traverse)) { |
|
288 | return $this->getParent()->getPublicMethod($name, $traverse); |
@@ 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 | } |