nette/nette — pull request #1328 by enumag (2014-01-03 13:13:03+00:00)
Title: Factories

First commit is just to unify behaviour with comments in return annotations.

Second comit fixes the fact that https://github.com/nette/nette/commit/40e7b8f40054d5db2d4a08b23bff6361fec1dd1c only works for generated factories but not for non-generated factories. Example (throws exception class App\Application\IRouter not found):

```
namespace App\Application;

use Nette\Application\IRouter;
use Nette\Application\Routers\Route;
use Nette\Application\Routers\RouteList;
use Nette\Object;

/**
* Router factory.
*/
final class RouterFactory extends Object
{

/**
* @return IRouter
*/
public function create()
{
$router = new RouteList('Front');
$router[] = new Route('/[/]', 'Homepage:default');

return $router;
}

}
```