Coming from an application development environment (Java, C#, C++);
Is there no limit specified by a PHP (Zend) coding standard which sets a guideline to how long the body of a method can be? When programming an application a method should only have one task, delegate everything else. And the body of a method should never be so long that you can't view it in one page (about 40-45 lines, the shorter the better).
Are there some similar guidelines in PHP. I've never seen a guideline concerning PHP for how long methods should be.
Here is an old thread which deals with the overall question -- OOP Methods
Ha, I just had to bring this up from that thread after reading it, too funny. From @lastcraft ; on post #8
Currently your class is a well topped cheesy pizza. If you try to separate pieces of it you will find the pieces remain joined with strands of melted cheese and some of your vegetables drop off. What we want to do is gather like vegetables together so that we can cut it cleanly without stringy bits.
Yeah, always class stuff from @lastcraft; I think I bookmarked half of his threads. I miss him a lot, but we never venture into anything dangerous on here any more.
What do you mean?
This topic is now closed. New replies are no longer allowed.