private function validate($password): void {
    if(strlen($password) < $this->validationMinLength()) {
      throw new InvalidArgumentException("The password must be at least {$this->validationMinLength()} characters long");
    }

    if(strlen($password) > $this->validationMaxLength()) {
      throw new InvalidArgumentException("The password must be no more than {$this->validationMaxLength()} characters long");
    }
  }
private function validate($password): void {
    if(strlen($password) < $this->validationMinLength()) {
      throw new InvalidArgumentException("The password must be at least {$this->validationMinLength()} characters long");
    }

    if(strlen($password) > $this->validationMaxLength()) {
      throw new InvalidArgumentException("The password must be no more than {$this->validationMaxLength()} characters long");
    }
  }
private function validate ( $ password ) : void { if ( strlen ( $ password ) < $ this -> validationMinLength ( ) ) { throw new InvalidArgumentException ( "The password must be at least {$this->validationMinLength()} characters long" ) ; } if ( strlen ( $ password ) > $ this -> validationMaxLength ( ) ) { throw new InvalidArgumentException ( "The password must be no more than {$this->validationMaxLength()} characters long" ) ; } }
Ensures the password is valid

@throws  InvalidArgumentException  If the password is not valid

@param  string  $password  The password to validate

@return  void
Ensures the password is valid