public function filter(array $data)
    {
        $filtered = [];

        foreach ($data as $row) {
            if ($this->passesFilter($row)) {
                $filtered[] = $row;
            }
        }

        return $filtered;
    }
public function filter(array $data)
    {
        $filtered = [];

        foreach ($data as $row) {
            if ($this->passesFilter($row)) {
                $filtered[] = $row;
            }
        }

        return $filtered;
    }
public function filter ( array $ data ) { $ filtered = [ ] ; foreach ( $ data as $ row ) { if ( $ this -> passesFilter ( $ row ) ) { $ filtered [ ] = $ row ; } } return $ filtered ; }
Applies filter on a given array and returns filtered data.

@param array $data data to filter
@return array filtered data
Applies filter on a given array and returns filtered data .