Add support for factory()->create() return types (#758)

* Revert "Forked release"

* Initial factory builder support

* Oops — fixed tabs

* Revert "Forked release"

* Whitespace

* Reverted more code

* Whitespace

* More whitespace

* Fixed PHPCS line
This commit is contained in:
Chris Morrell
2019-10-01 20:18:19 +02:00
committed by Barry vd. Heuvel
parent 25b61c56fe
commit 6c8e847430
8 changed files with 82 additions and 1 deletions
+10
View File
@@ -105,3 +105,13 @@ namespace Illuminate\Support {
class Fluent {}
}
<?php endif ?>
<?php foreach ($factories as $factory): ?>
namespace <?=$factory->getNamespaceName()?> {
/**
* @method \Illuminate\Database\Eloquent\Collection|<?=$factory->getShortName()?>[]|<?=$factory->getShortName()?> create($attributes = [])
* @method \Illuminate\Database\Eloquent\Collection|<?=$factory->getShortName()?>[]|<?=$factory->getShortName()?> make($attributes = [])
*/
class <?=$factory->getShortName()?>FactoryBuilder extends \Illuminate\Database\Eloquent\FactoryBuilder {}
}
<?php endforeach; ?>