Refactoring IpHelper - #33
Conversation
…n - they are always present since PHP 5.1
|
I have been reading over the changes here and it all looks brilliant. Did not yet pull and test them manually. I have one question you are making changes to a number of public functions very dramatically... what back-porting, or warning of change, do we have for those who have used those. As they are public, and therefore it does have a measure of promise, right? |
|
There are more... but I think you get my question. Not that I don't agree the changes are valid. Just indeed going to break stuff. Besides the fact that the whole class has mutated... |
|
Those name changes do no harm, as method names are not case sensitive. The readability, though, is better with uppercase IP. |
|
The refactoring (and the added tests) changed the CRAP index from 8190 down to 53... Some parts of the original code were never able to run; it was trying to treat a netmask as an integer for IPv6 ranges... |
|
Yea, I get that... just trying to catch the guys like me who may have started using these methods directly... |
|
API was restricted to the public methods; the class originally was |
|
@nibra do you want to update the PR to 3.x or 4.x? If not we are going to close it. |
Pull Request for Issue #32
Summary of Changes
ATTN: This PR builds on PR #31
Testing Instructions
Run the tests (or just check Drone report).
Documentation Changes Required
No