Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
49 | public function hasTerms() { |
||
50 | $empty = true; |
||
51 | // if there's any leaf element in terms then it's not empty, otherwise we consider |
||
52 | // the terms array empty even if it had some sub-arrays that are also empty by |
||
53 | // this definition |
||
54 | array_walk_recursive( |
||
55 | $this->terms, |
||
56 | function ( $element ) use ( &$empty ) { |
||
|
|||
57 | $empty = false; |
||
58 | } |
||
59 | ); |
||
60 | |||
61 | return !$empty; |
||
62 | } |
||
63 | |||
65 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.