File tree Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,14 @@ private function applyFilters()
60
60
if (count ($ this ->filters ) > 0 ) {
61
61
$ filtered_array = array_filter (
62
62
$ this ->getArrayCopy (),
63
- [$ this , 'filterItem ' ]
63
+ function ($ item ) {
64
+ foreach ($ this ->filters as $ callback ) {
65
+ if (call_user_func ($ callback , $ item ) === true ) {
66
+ return true ;
67
+ }
68
+ }
69
+ return false ;
70
+ }
64
71
);
65
72
$ this ->exchangeArray (array_values ($ filtered_array ));
66
73
}
@@ -75,22 +82,6 @@ private function applyFilters()
75
82
}
76
83
}
77
84
78
- /**
79
- * Callback for array_filter().
80
- *
81
- * @param mixed $item
82
- * @return boolean
83
- */
84
- private function filterItem ($ item )
85
- {
86
- foreach ($ this ->filters as $ callback ) {
87
- if (call_user_func ($ callback , $ item ) === true ) {
88
- return true ;
89
- }
90
- }
91
- return false ;
92
- }
93
-
94
85
/**
95
86
* Filter items by instance.
96
87
*
You can’t perform that action at this time.
0 commit comments