@@ 258-269 (lines=12) @@ | ||
255 | } |
|
256 | } |
|
257 | ||
258 | if ($traverse && $this->hasTraits()) { |
|
259 | ||
260 | /** |
|
261 | * @var TraitMetadata $trait |
|
262 | */ |
|
263 | foreach ($this->traits as $trait) { |
|
264 | ||
265 | if ($trait->hasPublicMethod($name, $traverse)) { |
|
266 | return $trait->getPublicMethod($name, $traverse); |
|
267 | } |
|
268 | } |
|
269 | } |
|
270 | ||
271 | if ($traverse && $this->hasParent() && $this->getParent()->hasPublicMethod($name, $traverse)) { |
|
272 | return $this->getParent()->getPublicMethod($name, $traverse); |
@@ 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 | } |