@@ 179-190 (lines=12) @@ | ||
176 | } |
|
177 | } |
|
178 | ||
179 | if ($traverse && $this->hasTraits()) { |
|
180 | ||
181 | /** |
|
182 | * @var TraitMetadata $trait |
|
183 | */ |
|
184 | foreach ($this->traits as $trait) { |
|
185 | ||
186 | if ($trait->hasPublicMethod($name, $traverse)) { |
|
187 | return $trait->getPublicMethod($name, $traverse); |
|
188 | } |
|
189 | } |
|
190 | } |
|
191 | ||
192 | throw new RuntimeException(sprintf('Method "%s()" for trait "%s" does not exists.', $name, $this->name)); |
|
193 | } |
@@ 266-277 (lines=12) @@ | ||
263 | } |
|
264 | } |
|
265 | ||
266 | if ($traverse && $this->hasTraits()) { |
|
267 | ||
268 | /** |
|
269 | * @var TraitMetadata $trait |
|
270 | */ |
|
271 | foreach ($this->traits as $trait) { |
|
272 | ||
273 | if ($trait->hasPublicMethod($name, $traverse)) { |
|
274 | return $trait->getPublicMethod($name, $traverse); |
|
275 | } |
|
276 | } |
|
277 | } |
|
278 | ||
279 | if ($traverse && $this->hasParent() && $this->getParent()->hasPublicMethod($name, $traverse)) { |
|
280 | return $this->getParent()->getPublicMethod($name, $traverse); |