NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
code folding behind function declaration


Joined: 06 Sep 2007
Posts: 1
Reply with quote
Hello dmitri

First, I have to say that I'm using PHPED with delight at work as well as privately. You're doing an amazing work!
I'M LOVING IT! Cool

At the moment the code folding works fine if you write your function/method declaration this way
Code:
function getFoo () {
  return $this->foo;
}
it will return
Code:
function getFoo () { ... }


Thats how it should be.
But if the code looks like this: (and that's what it has to look like according to our company's guidelines)
Code:
function getBar()
{
  return $this->bar;
}
it folds to
Code:
function getFoo ()
{ ... }

what is very disturbing to read if you've got a class with a larger amount of get/set-functions.
To clarify what my point is, see this example:

Code:
GOOD CODE
function getFoo() { ... }
function setFoo( $value ) { ... }
function getBar() { ... }
function setBar( $value ) { ... }
function getMuesli () { ... }
function setMuesli ( $value ) { ... }
function getHello () { ... }
function setHello ( $value ) { ... }
function getWorld () { ... }
function setWorld ( $value ) { ... }
...

versus BAD CODE

function getFoo()
{ ... }
function setFoo( $value )
{ ... }
function getBar()
{ ... }
function setBar( $value )
{ ... }
function getMuesli ()
{ ... }
function setMuesli ( $value )
{ ... }
function getHello ()
{ ... }
function setHello ( $value )
{ ... }
function getWorld ()
{ ... }
function setWorld ( $value )
{ ... }
...


Nobody wants to see the bad one winning Wink

If this isn't possible or to much change to PHPED's code, it would be an alternative solution, if the color of the folded code could be changed from dark gray and black to what ever you want.

any of this would give a real neat look to the code!

Thanks allot
Tim
View user's profileFind all posts by timschochSend private message
code folding behind function declaration
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic