| 
| Subject: | it can be done with one method... | 
|---|
 | Summary: | Package rating comment | 
|---|
 | Messages: | 3 | 
|---|
 | Author: | adriano ghezzi | 
|---|
 | Date: | 2015-03-01 15:55:02 | 
|---|
 |  |  |  | 
adriano ghezzi rated this package as follows:
| Utility: | Insufficient | 
|---|
| Consistency: | Not sure | 
|---|
|  | 
  adriano ghezzi - 2015-03-01 15:55:02it can be done with one method construct(allowedIPlist,currentIP)
 return T|F
 
 it should have a method to get current IP from http request
  Ovidiu Bokar - 2015-03-01 16:04:42 - In reply to message 1 from adriano ghezziYou are right, all this can be done in one single method (not the constructor though), however, it is a bad practice to build everything in a single method, instead of having everything divided, if the code is organised any developer can extend the class and functionality faster without any hacks to the code.
  adriano ghezzi - 2015-03-01 16:24:51 - In reply to message 2 from Ovidiu Bokaropinions are opinions.
 generally speaking I agree with you
 
 but normally a function with a single functionality is just a function
 PHP self has a lot of cunctions coded as function
 
 don't overhead implementation when not needed.
 
 I don't see anything that can be extended or further implementation
 
 all private variables don't need to store any value.
 code is just one call.
 
 |