@@ -44,7 +44,8 @@ of the time you will want to specify the formatters to use as the second paramet
4444
4545You can also change the formatters after a fabricator is initialized by using the ``setFormatters() `` method.
4646
47- **Advanced Formatting **
47+ Advanced Formatting
48+ -------------------
4849
4950Sometimes the default return of a formatter is not enough. Faker providers allow parameters to most formatters
5051to further limit the scope of random data. A fabricator will check its representative model for the ``fake() ``
@@ -162,29 +163,37 @@ Your model's fake method could look like this:
162163
163164Now creating a new user will ensure it is a part of a valid group: ``$user = fake(UserModel::class); ``
164165
166+ Methods
167+ -------
168+
165169``Fabricator `` handles the counts internally but you can also access these static methods
166170to assist with using them:
167171
168- **getCount(string $table): int **
172+ getCount(string $table): int
173+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
169174
170175Return the current value for a specific table (default: 0).
171176
172- **setCount(string $table, int $count): int **
177+ setCount(string $table, int $count): int
178+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
173179
174180Set the value for a specific table manually, for example if you create some test items
175181without using a fabricator that you still wanted factored into the final counts.
176182
177- **upCount(string $table): int **
183+ upCount(string $table): int
184+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
178185
179186Increment the value for a specific table by one and return the new value. (This is what is
180187used internally with ``Fabricator::create() ``).
181188
182- **downCount(string $table): int **
189+ downCount(string $table): int
190+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
183191
184192Decrement the value for a specific table by one and return the new value, for example if
185193you deleted a fake item but wanted to track the change.
186194
187- **resetCounts() **
195+ resetCounts()
196+ ^^^^^^^^^^^^^
188197
189198Resets all counts. Good idea to call this between test cases (though using
190199``CIUnitTestCase::$refresh = true `` does it automatically).
0 commit comments