Use decimal format for numeric constants #7985
jonasraoni
started this conversation in
Proposals
Replies: 1 comment
-
👍 it'd be nice to change this in the code base. In the meantime, there's a little tool available to help: https://github.com/pkp/pkp-lib/blob/main/tools/constants.php Get all defined constants and their values:
Get the name of all constants defined with a specific value:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the problem you would like to solve
Searching for numeric values in the code is a bit complex sometimes, given that constants might be expressed in a hexadecimal format, and everywhere else (logs, database, XML, etc.) they are written in decimal.
Describe the solution you'd like
Replace the hexadecimal constants by decimal values or leave a comment with an alternative format.
From:
To (as they are probably part of a binary set, maybe the binary format provides a better visualization):
Who is asking for this feature?
Developer
Beta Was this translation helpful? Give feedback.
All reactions