original_string: private function assertValid($object, int $code = 0)
      {
          $errors = $this->validator->validate($object);
          if (count($errors)) {
              throw ValidationException::becauseOfValidationErrors($errors, $code);
          }
      }
code: private function assertValid($object, int $code = 0)
      {
          $errors = $this->validator->validate($object);
          if (count($errors)) {
              throw ValidationException::becauseOfValidationErrors($errors, $code);
          }
      }
code_tokens: private function assertValid ( $ object , int $ code = 0 ) { $ errors = $ this -> validator -> validate ( $ object ) ; if ( count ( $ errors ) ) { throw ValidationException :: becauseOfValidationErrors ( $ errors , $ code ) ; } }
docstring: Assert that object is valid.
  
  @param mixed $object
  @param int $code
  
  @throws ValidationException
docstring_tokens: Assert that object is valid .