original_string: public function validate(array $data) : bool
      {
          $passed = true;
          $this->invalidFields = [];
          $rules = $this->getRules();
          foreach ($rules as $validation => $fields) {
              foreach ($fields as $key => $value) {
                  $field = $this->getFieldInfo($key, $value);
                  $validationInstance = $this->getValidation($validation);
                  $validationStatus = $validationInstance->run($field, $data);
                  $passed = $passed && $validationStatus;
                  $this->invalidFields = array_merge_recursive(
                          $this->invalidFields, $validationInstance->getMessages()
                  );
              }
          }
          return $passed;
      }
code: public function validate(array $data) : bool
      {
          $passed = true;
          $this->invalidFields = [];
          $rules = $this->getRules();
          foreach ($rules as $validation => $fields) {
              foreach ($fields as $key => $value) {
                  $field = $this->getFieldInfo($key, $value);
                  $validationInstance = $this->getValidation($validation);
                  $validationStatus = $validationInstance->run($field, $data);
                  $passed = $passed && $validationStatus;
                  $this->invalidFields = array_merge_recursive(
                          $this->invalidFields, $validationInstance->getMessages()
                  );
              }
          }
          return $passed;
      }
code_tokens: public function validate ( array $ data ) : bool { $ passed = true ; $ this -> invalidFields = [ ] ; $ rules = $ this -> getRules ( ) ; foreach ( $ rules as $ validation => $ fields ) { foreach ( $ fields as $ key => $ value ) { $ field = $ this -> getFieldInfo ( $ key , $ value ) ; $ validationInstance = $ this -> getValidation ( $ validation ) ; $ validationStatus = $ validationInstance -> run ( $ field , $ data ) ; $ passed = $ passed && $ validationStatus ; $ this -> invalidFields = array_merge_recursive ( $ this -> invalidFields , $ validationInstance -> getMessages ( ) ) ; } } return $ passed ; }
docstring: Validate data according to validation rules that have been set into
  this validator.
  
  @param array $data The data to be validated
  @return bool
  @throws exceptions\ValidatorException
docstring_tokens: Validate data according to validation rules that have been set into this validator .