File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 66
77interface Anonymizable
88{
9+ /**
10+ * Get the key value used to ensure consistent fake data generation.
11+ */
12+ public function getAnonymizableKey (): ?string ;
13+
914 /**
1015 * Get the seed value used to ensure consistent fake data generation.
1116 */
Original file line number Diff line number Diff line change @@ -42,12 +42,20 @@ public function withoutAnonymization(callable $callback): mixed
4242 }
4343 }
4444
45+ /**
46+ * Get the key for the anonymizable instance.
47+ */
48+ public function getAnonymizableKey (): ?string
49+ {
50+ return $ this ->getKey ();
51+ }
52+
4553 /**
4654 * Get the seed for the anonymizable instance.
4755 */
4856 public function getAnonymizableSeed (): string
4957 {
50- return get_class ($ this ).': ' .$ this ->getKey ();
58+ return get_class ($ this ).': ' .$ this ->getAnonymizableKey ();
5159 }
5260
5361 /**
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public function getAnonymizedAttributes(Generator $faker): array
1919 ];
2020 }
2121
22- public function getAnonymizableSeed (): string
22+ public function getAnonymizableKey (): string
2323 {
2424 return 1 ;
2525 }
You can’t perform that action at this time.
0 commit comments