On 15 Apr 2012, at 15:02, Lester Caine wrote:
> Stuart Dallas wrote:
>> No code duplication but clear separation between static and instantiated
>> usage. However, this is not the best way to structure this code IMO. The
>> better option would be to extract the static parts into a separate class,
>> and use that new class from the instantiated version.
> I've sort of got a problem with that since duplicating every content package
> class and then deciding which version I should be accessing does not make
I didn't suggest duplicating anything, just separating the elements so there's
a clear distinction between static and instantiated. This is basic software
engineering if you ask me. I was going to rant about defensive programming
here, but life's too short!
> I'm slowly pulling the 'static' elements into their own function and leaving
> the instantiated elements alone but it's slow work. Those people who kept
> telling me 'just fix the errors' simply don't understand how complex that CAN
> be :( I've only worked my way through half a dozen packages and I've 20 or so
> to go ... all just to bring things 'up to acceptable php code' ;)
It is as simple as that. Fix the errors. There may be a lot of them, and there
may be complex interplay between different parts of your code, but it's still
as simple as just fixing the errors.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php