Skip to content

Commit aaf6ab4

Browse files
committed
[bug] fix typo in Factory stub (fixes #52)
1 parent ecf674a commit aaf6ab4

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ final class PostFactory extends ModelFactory
210210
{
211211
// see https://github.com/zenstruck/foundry#initialization
212212
return $this
213-
// ->beforeInstantiate(function(Post $post) {})
213+
// ->afterInstantiate(function(Post $post) {})
214214
;
215215
}
216216

src/Bundle/Resources/skeleton/Factory.tpl.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected function initialize(): self
3232
{
3333
// see https://github.com/zenstruck/foundry#initialization
3434
return $this
35-
// ->beforeInstantiate(function(<?= $entity->getShortName() ?> $<?= \lcfirst($entity->getShortName()) ?>) {})
35+
// ->afterInstantiate(function(<?= $entity->getShortName() ?> $<?= \lcfirst($entity->getShortName()) ?>) {})
3636
;
3737
}
3838

tests/Functional/Bundle/Maker/MakeFactoryTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ protected function initialize(): self
5454
{
5555
// see https://github.com/zenstruck/foundry#initialization
5656
return \$this
57-
// ->beforeInstantiate(function(Category \$category) {})
57+
// ->afterInstantiate(function(Category \$category) {})
5858
;
5959
}
6060
@@ -114,7 +114,7 @@ protected function initialize(): self
114114
{
115115
// see https://github.com/zenstruck/foundry#initialization
116116
return \$this
117-
// ->beforeInstantiate(function(Category \$category) {})
117+
// ->afterInstantiate(function(Category \$category) {})
118118
;
119119
}
120120
@@ -171,7 +171,7 @@ protected function initialize(): self
171171
{
172172
// see https://github.com/zenstruck/foundry#initialization
173173
return \$this
174-
// ->beforeInstantiate(function(Category \$category) {})
174+
// ->afterInstantiate(function(Category \$category) {})
175175
;
176176
}
177177
@@ -231,7 +231,7 @@ protected function initialize(): self
231231
{
232232
// see https://github.com/zenstruck/foundry#initialization
233233
return \$this
234-
// ->beforeInstantiate(function(Category \$category) {})
234+
// ->afterInstantiate(function(Category \$category) {})
235235
;
236236
}
237237

0 commit comments

Comments
 (0)