@@ -37,7 +37,7 @@ class Fabricator
3737 /**
3838 * Array of counts for fabricated items
3939 *
40- * @var array
40+ * @var array<string, int>
4141 */
4242 protected static $ tableCounts = [];
4343
@@ -65,28 +65,28 @@ class Fabricator
6565 /**
6666 * Map of properties and their formatter to use
6767 *
68- * @var array|null
68+ * @var array<string, string> |null
6969 */
7070 protected $ formatters ;
7171
7272 /**
7373 * Date fields present in the model
7474 *
75- * @var array
75+ * @var list<string>
7676 */
7777 protected $ dateFields = [];
7878
7979 /**
8080 * Array of data to add or override faked versions
8181 *
82- * @var array
82+ * @var array<string, mixed>
8383 */
8484 protected $ overrides = [];
8585
8686 /**
8787 * Array of single-use data to override faked versions
8888 *
89- * @var array|null
89+ * @var array<string, mixed> |null
9090 */
9191 protected $ tempOverrides ;
9292
@@ -111,9 +111,9 @@ class Fabricator
111111 /**
112112 * Store the model instance and initialize Faker to the locale.
113113 *
114- * @param object|string $model Instance or classname of the model to use
115- * @param array|null $formatters Array of property => formatter
116- * @param string|null $locale Locale for Faker provider
114+ * @param object|string $model Instance or classname of the model to use
115+ * @param array<string, string> |null $formatters Array of property => formatter
116+ * @param string|null $locale Locale for Faker provider
117117 *
118118 * @throws InvalidArgumentException
119119 */
@@ -238,6 +238,8 @@ public function getFaker(): Generator
238238
239239 /**
240240 * Return and reset tempOverrides
241+ *
242+ * @return array<string, mixed>
241243 */
242244 public function getOverrides (): array
243245 {
@@ -251,8 +253,8 @@ public function getOverrides(): array
251253 /**
252254 * Set the overrides, once or persistent
253255 *
254- * @param array $overrides Array of [field => value]
255- * @param bool $persist Whether these overrides should persist through the next operation
256+ * @param array<string, mixed> $overrides Array of [field => value]
257+ * @param bool $persist Whether these overrides should persist through the next operation
256258 */
257259 public function setOverrides (array $ overrides = [], $ persist = true ): self
258260 {
@@ -307,6 +309,8 @@ public function setValid(string $field, ?Closure $validator = null, int $maxRetr
307309
308310 /**
309311 * Returns the current formatters
312+ *
313+ * @return array<string, string>|null
310314 */
311315 public function getFormatters (): ?array
312316 {
@@ -316,7 +320,7 @@ public function getFormatters(): ?array
316320 /**
317321 * Set the formatters to use. Will attempt to autodetect if none are available.
318322 *
319- * @param array|null $formatters Array of [field => formatter], or null to detect
323+ * @param array<string, string> |null $formatters Array of [field => formatter], or null to detect
320324 */
321325 public function setFormatters (?array $ formatters = null ): self
322326 {
@@ -399,7 +403,7 @@ protected function guessFormatter($field): string
399403 *
400404 * @param int|null $count Optional number to create a collection
401405 *
402- * @return array|object An array or object (based on returnType), or an array of returnTypes
406+ * @return array<string, mixed>|list<array<string, mixed>|object> |object An array or object (based on returnType), or an array of returnTypes
403407 */
404408 public function make (?int $ count = null )
405409 {
@@ -424,7 +428,7 @@ public function make(?int $count = null)
424428 /**
425429 * Generate an array of faked data
426430 *
427- * @return array An array of faked data
431+ * @return array<string, mixed> An array of faked data
428432 *
429433 * @throws RuntimeException
430434 */
@@ -534,7 +538,7 @@ public function makeObject(?string $className = null): object
534538 * @param int|null $count Optional number to create a collection
535539 * @param bool $mock Whether to execute or mock the insertion
536540 *
537- * @return array| object An array or object (based on returnType), or an array of returnTypes
541+ * @return array<string, mixed>|list<array<string, mixed>| object>|object|null An array or object (based on returnType), or an array of returnTypes
538542 *
539543 * @throws FrameworkException
540544 */
@@ -572,7 +576,7 @@ public function create(?int $count = null, bool $mock = false)
572576 *
573577 * @param int|null $count Optional number to create a collection
574578 *
575- * @return array|object An array or object (based on returnType), or an array of returnTypes
579+ * @return array<string, mixed>|list<array<string, mixed>|object> |object An array or object (based on returnType), or an array of returnTypes
576580 */
577581 protected function createMock (?int $ count = null )
578582 {
0 commit comments