phpspec/phpspec — pull request #369 by carlosV2 (2014-06-12 13:38:18+00:00)
Title: Include the objects type, phpdoc and namespaces when creating a new method

I think it would be fantastic to let phpspec to do some work for you such:

Including the type on the arguments call:
Having this spec:
```php
function it_does_something(ObjectClass $obj)
{
$this->doSomething($obj, 'String', 0, true);
}
```

It should create:
```php
public function doSomething(ObjectClass $objectClass1, $string2, $integer3, $boolean4)
{
// TODO: write logic here
}
```

Including the phpdoc:
Having this spec:
```php
function it_does_something(ObjectClass $obj)
{
$this->doSomething($obj, 'String', 0, true);
}
```

It should create:
```php
/**
* [Description for doSomething function]
* @param ObjectClass $objectClass1
* @param string $string2
* @param integer $integer3
* @param boolean $boolean4
*/
public function doSomething(ObjectClass $objectClass1, $string2, $integer3, $boolean4)
{
// TODO: write logic here
}
```

Including the objects namespaces:
Having this spec:
```php
namespace spec\NS1\NS2;

use NS1\NS3\OtherClass;

class NewClassSpec extends ObjectBehavior
{
function it_can_store_property(OtherClass $obj)
{
$this->setOtherClass($obj);
}
}
```

And this class:
```php
namespace NS1\NS2;

class NewClass
{
}
```

It should finally be:
```php
namespace NS1\NS2;

use NS1\NS3\OtherClass;

class NewClass
{
/**
* [Description for doSomething function]
* @param OtherClass $otherClass1
*/
public function doSomething(OtherClass $otherClass1)
{
// TODO: write logic here
}
}
```