original_string: public function required(Model $model, $data, $required = true) {
          foreach ($data as $value) {
              if ($required && $this->_isEmpty($value)) {
                  return false;
              }
          }
  
          return true;
      }
code: public function required(Model $model, $data, $required = true) {
          foreach ($data as $value) {
              if ($required && $this->_isEmpty($value)) {
                  return false;
              }
          }
  
          return true;
      }
code_tokens: public function required ( Model $ model , $ data , $ required = true ) { foreach ( $ data as $ value ) { if ( $ required && $ this -> _isEmpty ( $ value ) ) { return false ; } } return true ; }
docstring: Makes sure a file field is required and not optional.
  
  @param Model $model
  @param array $data
  @param bool $required
  @return bool
docstring_tokens: Makes sure a file field is required and not optional .