You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the `use <trait>` can be used anywhere in a class definition, but the method is available to be called in any function in the class so we find all the traits before processing the rest of the class.
216
+
In the below sample, if we execute `(Foo.new())->foo()` it executes the `traitFunc` even though the `use <trait>` is after the `foo` method
217
+
```php
218
+
trait TraitA {
219
+
function traitFunc() {}
220
+
}
221
+
class Foo {
222
+
function foo() {
223
+
$this->traitFunc();
224
+
}
225
+
use TraitA;
226
+
}
227
+
```
228
+
*/
229
+
valuseTraitNames= dynamicStmts.collect { casex: PhpTraitUseStmt=> x }.flatMap(_.traits)
0 commit comments