Replace Hungarian notation with PHP type delarations #35
Labels
documentation
Improvements or additions to documentation
good first issue
Good for newcomers
security
Anything with security implications
Milestone
Currently, variables are named using Hungarian notation (e.g.,
$l_str_foo
). This is both harder to read and provides no programmatic type guarantees (as as variable with$l_str
in the name can just as easily be assigned any type of value, not just a string).This should be refactored to use the type declarations introduced in PHP 7, ensuring that errors will be thrown if implicit type coercion is detected.
Note: I'm not sure if WP Plugins have to target a specific version of PHP, in which case we may not have access to type declarations
Related: #36
The text was updated successfully, but these errors were encountered: