Some ideas to make VS.PHP even better
Hello VS.PHP programmer, I just want to say in the beginning, WHAT a great editor, by far the best on the market.
I have been using VS.PHP for larger projects lately, which is OOP. Generally a great experience, but there are a few things witched VS.PHP supported, it would make my life much easier.
1: phpDoc arrays
I know you support arrays by doing this.
$a = array();
$a[1] = new foo();
$a[1]->addBut this is really not that useful when you are programming OOP. An example would normally look like this
class SomeClass
{
/**
* This is method someGetMethod
*
* @return array[int]OUser
*
*/
public function someGetMethod()
{
$a = array();
//Some get $query code her
foreach($query as $userData)
{
$a[] = new OUser($userData);
}
return $a;
}
}
I know that this problem roots in phpDoc, that it doesn’t support returning array objects.
But this is a huge problem not having intelesens when returning an object array. So this is on the highest spot on my “Wish-List”
2: phpDoc Throws
Then I type /** over a method now days will it automatic generate
/**
* This is method someGetMethod
*
* @return mixed This is the return value description
*
*/Here would it be GREAT if it also could see witch Expections was thown in the given method. That should be pritty simple :D
On a second node, maby it could also see if I hav $this->secondGetMethod() withing the method, that it also will copy it’s “thows” to it own throws.
On a thrid node, maby we could implement something from Java here, when if you don’t take care of an expections or throw it further, that it will tell you that
XXXXXXExpection was unhandled.
3: Intelesens
The intelesen gows out the window if it do some inline editing.
Example
public function someGetMethod()
{
$someclass = SomeClass();
$somevar = someMethod("Test Name", $someclass->count());
return $somevar;
}So if I now want to make the $someclass->count() a var for itself and divide it by a divider from “$someclass”. I normally do it copy paste like this.
But this time there are no intelesens, only the “common” or “All” I shown, all my own function/classes and method are not in the list
$someclass = SomeClass();
$count = $someclass->count();
$count = $count / $someclass->
$somevar = someMethod("Test Name", );
return $somevar;I hope that this can help you to make VS.PHP even better