PHP Classes

File: src/PasswordHelper/Validator.php

Recommend this page to a friend!
  Classes of John Conde   PHP Password Validation Helper   src/PasswordHelper/Validator.php  
File: src/PasswordHelper/Validator.php
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP Password Validation Helper
Generate and check a password according to rules
Author: By
Last change: refactor: minor code cleanup
refactor: update codebase for PHP 8.0 compatibility

- Updated test cases in PolicyTest, ValidatorTest, and GeneratorTest to match the new class interfaces and expectations.
- Added getter methods for minLength and maxLength in the Generator class.
- Updated assertions in GeneratorTest to use PHPUnit 8.5 compatible methods.
- Adjusted test expectations in ValidatorTest to align with the current validation logic.

This refactoring ensures that the codebase is fully compatible with PHP 8.0 while maintaining the intended functionality and test coverage.
Improve docblocks, restore Validator compatibility, and fix Generator return types

- Enhanced docblock comments for all classes in src/PasswordHelper to be more descriptive and PSR-12 compliant.
- Fixed Generator::getRandomCharacter() to always return a string, preventing type errors.
- Reintroduced protected meetsMinimum* methods in Validator to support legacy and test code.
Added PHP Documentor support
Date: 6 days ago
Size: 5,732 bytes

You need to be a registered user and login to get this file.

Login Immediately with your account on: