original_string: private function applyFilters(array $settings): void
      {
          $data = $this->getSource();
          $data = array_filter(
              $data,
              function ($row) use ($settings) {
                  foreach ($settings as $column => $filters) {
                      foreach ($filters as $filter => $value) {
                          // switch statement for filter
                          switch ($filter) {
                              case Grid\Grid::FILTER_EQ:
                                  if ($row[$column] != $value) {
                                      return false;
                                  }
                                  break;
                              case Grid\Grid::FILTER_NE:
                                  if ($row[$column] == $value) {
                                      return false;
                                  }
                                  break;
                              case Grid\Grid::FILTER_GT:
                                  if ($row[$column] <= $value) {
                                      return false;
                                  }
                                  break;
                              case Grid\Grid::FILTER_GE:
                                  if ($row[$column] < $value) {
                                      return false;
                                  }
                                  break;
                              case Grid\Grid::FILTER_LT:
                                  if ($row[$column] >= $value) {
                                      return false;
                                  }
                                  break;
                              case Grid\Grid::FILTER_LE:
                                  if ($row[$column] > $value) {
                                      return false;
                                  }
                                  break;
                              case Grid\Grid::FILTER_LIKE:
                                  if (!preg_match('/' . $value . '/', $row[$column])) {
                                      return false;
                                  }
                                  break;
                          }
                      }
                  }
                  return true;
              }
          );
          $this->setSource($data);
      }
code: private function applyFilters(array $settings): void
      {
          $data = $this->getSource();
          $data = array_filter(
              $data,
              function ($row) use ($settings) {
                  foreach ($settings as $column => $filters) {
                      foreach ($filters as $filter => $value) {
                          // switch statement for filter
                          switch ($filter) {
                              case Grid\Grid::FILTER_EQ:
                                  if ($row[$column] != $value) {
                                      return false;
                                  }
                                  break;
                              case Grid\Grid::FILTER_NE:
                                  if ($row[$column] == $value) {
                                      return false;
                                  }
                                  break;
                              case Grid\Grid::FILTER_GT:
                                  if ($row[$column] <= $value) {
                                      return false;
                                  }
                                  break;
                              case Grid\Grid::FILTER_GE:
                                  if ($row[$column] < $value) {
                                      return false;
                                  }
                                  break;
                              case Grid\Grid::FILTER_LT:
                                  if ($row[$column] >= $value) {
                                      return false;
                                  }
                                  break;
                              case Grid\Grid::FILTER_LE:
                                  if ($row[$column] > $value) {
                                      return false;
                                  }
                                  break;
                              case Grid\Grid::FILTER_LIKE:
                                  if (!preg_match('/' . $value . '/', $row[$column])) {
                                      return false;
                                  }
                                  break;
                          }
                      }
                  }
                  return true;
              }
          );
          $this->setSource($data);
      }
code_tokens: private function applyFilters ( array $ settings ) : void { $ data = $ this -> getSource ( ) ; $ data = array_filter ( $ data , function ( $ row ) use ( $ settings ) { foreach ( $ settings as $ column => $ filters ) { foreach ( $ filters as $ filter => $ value ) { // switch statement for filter switch ( $ filter ) { case Grid \ Grid :: FILTER_EQ : if ( $ row [ $ column ] != $ value ) { return false ; } break ; case Grid \ Grid :: FILTER_NE : if ( $ row [ $ column ] == $ value ) { return false ; } break ; case Grid \ Grid :: FILTER_GT : if ( $ row [ $ column ] <= $ value ) { return false ; } break ; case Grid \ Grid :: FILTER_GE : if ( $ row [ $ column ] < $ value ) { return false ; } break ; case Grid \ Grid :: FILTER_LT : if ( $ row [ $ column ] >= $ value ) { return false ; } break ; case Grid \ Grid :: FILTER_LE : if ( $ row [ $ column ] > $ value ) { return false ; } break ; case Grid \ Grid :: FILTER_LIKE : if ( ! preg_match ( '/' . $ value . '/' , $ row [ $ column ] ) ) { return false ; } break ; } } } return true ; } ) ; $ this -> setSource ( $ data ) ; }
docstring: Apply filters to array
  
  @param  array $settings
  
  @return void
  @throws Grid\GridException
docstring_tokens: Apply filters to array