@@ -209,53 +209,6 @@ This command will generate a ``PostFactory`` class that looks like this:
209209 make_factory :
210210 add_hints : false
211211
212- .. note ::
213-
214- You can add the option ``--with-phpdoc `` in order to add the following ``@method `` docblocks.
215- This would ease autocompletion in your IDE (might be not useful anymore since Foundry v2, at least in PHPStorm):
216-
217- ::
218-
219- /**
220- * @method Post create(array|callable $attributes = [])
221- * @method static Post createOne(array $attributes = [])
222- * @method static Post find(object|array|mixed $criteria)
223- * @method static Post findOrCreate(array $attributes)
224- * @method static Post first(string $sortBy = 'id')
225- * @method static Post last(string $sortBy = 'id')
226- * @method static Post random(array $attributes = [])
227- * @method static Post randomOrCreate(array $attributes = []))
228- * @method static PostRepository|RepositoryProxy repository()
229- * @method static Post[] all()
230- * @method static Post[] createMany(int $number, array|callable $attributes = [])
231- * @method static Post[] createSequence(iterable|callable $sequence)
232- * @method static Post[] findBy(array $attributes)
233- * @method static Post[] randomRange(int $min, int $max, array $attributes = []))
234- * @method static Post[] randomRangeOrCreate(int $min, int $max, array $attributes = [])
235- * @method static Post[] randomSet(int $number, array $attributes = []))
236- *
237- * @phpstan-method Post create(array|callable $attributes = [])
238- * @phpstan-method static Post createOne(array $attributes = [])
239- * @phpstan-method static Post find(object|array|mixed $criteria)
240- * @phpstan-method static Post findOrCreate(array $attributes)
241- * @phpstan-method static Post first(string $sortBy = 'id')
242- * @phpstan-method static Post last(string $sortBy = 'id')
243- * @phpstan-method static Post random(array $attributes = [])
244- * @phpstan-method static Post randomOrCreate(array $attributes = [])
245- * @phpstan-method static list<Post> all()
246- * @phpstan-method static list<Post> createMany(int $number, array|callable $attributes = [])
247- * @phpstan-method static list<Post> createSequence(array|callable $sequence)
248- * @phpstan-method static list<Post> findBy(array $attributes)
249- * @phpstan-method static list<Post> randomRange(int $min, int $max, array $attributes = [])
250- * @phpstan-method static list<Post> randomRangeOrCreate(int $min, int $max, array $attributes = [])
251- * @phpstan-method static list<Post> randomSet(int $number, array $attributes = [])
252- * @phpstan-method static RepositoryDecorator<Post, ObjectRepository<Post>> repository()
253- */
254- final class PostFactory extends PersistentObjectFactory
255- {
256- // ...
257- }
258-
259212 .. _defaults :
260213
261214In the ``defaults() ``, you can return an array of all default values that any new object
0 commit comments