original_string: public function array_filter($inputArray, $model)
      {
          $outputArray = array();
          foreach ($inputArray as $key => $value) {
              // Null and empty string are skipped
              if (is_null($value) || $value === '') {
                  continue;
              }
              // Maybe do a check on multiOptions for checkboxes etc. to disable some 0 values $model->get($key, 'multiOptions');
              if ($value == '0' && $options = $model->get($key, 'multiOptions')) {
                  if (count($options) == 2) {
                      // Probably a checkbox (multi flexi in limesurvey)
                      continue;
                  }
              }
              $outputArray[$key] = $value;
          }
          return $outputArray;
      }
code: public function array_filter($inputArray, $model)
      {
          $outputArray = array();
          foreach ($inputArray as $key => $value) {
              // Null and empty string are skipped
              if (is_null($value) || $value === '') {
                  continue;
              }
              // Maybe do a check on multiOptions for checkboxes etc. to disable some 0 values $model->get($key, 'multiOptions');
              if ($value == '0' && $options = $model->get($key, 'multiOptions')) {
                  if (count($options) == 2) {
                      // Probably a checkbox (multi flexi in limesurvey)
                      continue;
                  }
              }
              $outputArray[$key] = $value;
          }
          return $outputArray;
      }
code_tokens: public function array_filter ( $ inputArray , $ model ) { $ outputArray = array ( ) ; foreach ( $ inputArray as $ key => $ value ) { // Null and empty string are skipped if ( is_null ( $ value ) || $ value === '' ) { continue ; } // Maybe do a check on multiOptions for checkboxes etc. to disable some 0 values $model->get($key, 'multiOptions'); if ( $ value == '0' && $ options = $ model -> get ( $ key , 'multiOptions' ) ) { if ( count ( $ options ) == 2 ) { // Probably a checkbox (multi flexi in limesurvey) continue ; } } $ outputArray [ $ key ] = $ value ; } return $ outputArray ; }
docstring: Strip elements from the array that are considered empty
  
  Empty is NULL or empty string, values of 0 are NOT empty unless they are a checkbox
  
  @param type $inputArray
  @param type $model
  @return boolean
docstring_tokens: Strip elements from the array that are considered empty