Conditions | 4 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
45 | private function filterBootableTraits(string $class, Closure $buildFunctionName): array |
||
46 | { |
||
47 | $booted = []; |
||
48 | |||
49 | foreach (class_uses_recursive($class) as $trait) { |
||
50 | $method = $buildFunctionName(class_basename($trait)); |
||
51 | if (method_exists($class, $method) && ! in_array($method, $booted)) { |
||
52 | $booted[] = $method; |
||
53 | } |
||
54 | } |
||
55 | |||
56 | return $booted; |
||
57 | } |
||
64 |