-
Notifications
You must be signed in to change notification settings - Fork 0
passCodeMsg
Corey Avis edited this page Sep 23, 2026
·
2 revisions
Determines the descriptive status message for an individual password attribute score.
This is a helper method used within the password strength engine. The engine evaluates individual criteria (e.g., length, uppercase density, numeric count, and symbol presense), assigns a numeric score to each, and passes that score here to retrieve a user-friendly feedback string.
passCodeMsg(integer $code): string
code (integer)
: The numeric score generated by a specific password rule validation. (default: 'Undefined')
(string) : Returns a descriptive label representing the evaluation of the score.
| Score Code | Return Value | Context / Meaning |
|---|---|---|
| -2 | N/A | Not Applicable (e.g., does not apply). |
| -1 | Fail | Critical Failure (e.g., fails to meet standards). |
| 0 | Warning | Extremely Weak (e.g., does not meet minimums or requirements). |
| 1 | Good | Meets minimum requirements, but room for improvement. |
| 2 | Great | Strong metric (e.g. contains a highly diverse mix of characters). |
| 3 | Pass | Optimal strength achieved for this category. |
| Any other value | Undefined | Fallback safety net for unexpected scoring outputs. |
$sec->passCodeMsg(3) = Pass
- No debug errors.
Home | CoreySecurity | Helpers