@@ -192,7 +192,7 @@ public function getCompiledTemplateData(): EntityInterface|array
192192 */
193193 public function compileEntity (
194194 array |callable |EntityInterface |string $ injectedData = [],
195- bool $ setPrimaryKey = false
195+ bool $ setPrimaryKey = false ,
196196 ): EntityInterface {
197197 if (is_string ($ injectedData )) {
198198 $ injectedData = $ this ->setDisplayFieldToInjectedString ($ injectedData );
@@ -238,7 +238,7 @@ private function patchEntity(EntityInterface $entity, array $data): EntityInterf
238238 return $ this ->getFactory ()->getTable ()->patchEntity (
239239 $ entity ,
240240 $ data ,
241- $ this ->getFactory ()->getMarshallerOptions ()
241+ $ this ->getFactory ()->getMarshallerOptions (),
242242 );
243243 }
244244
@@ -262,7 +262,7 @@ private function castArrayNotation(EntityInterface $entity, array $data): array
262262 $ entityValue = $ entityValue ?? ($ entity ->get ($ rootKey ) ?? []);
263263 if (!is_array ($ entityValue )) {
264264 throw new FixtureFactoryException (
265- "Value $ entityValue cannot be merged with array notation $ key => $ value "
265+ "Value $ entityValue cannot be merged with array notation $ key => $ value " ,
266266 );
267267 }
268268 $ data [$ rootKey ] = $ entityValue = array_replace_recursive ($ entityValue , $ subData [$ rootKey ]);
@@ -291,7 +291,7 @@ private function setDisplayFieldToInjectedString(string $data): array
291291 $ table = get_class ($ this ->getFactory ()->getTable ());
292292 throw new FixtureFactoryException (
293293 'The display field of a table must be a string when injecting a string into its factory. ' .
294- "You injected ' $ data' in $ factory but $ table's display field is not a string. "
294+ "You injected ' $ data' in $ factory but $ table's display field is not a string. " ,
295295 );
296296 }
297297
@@ -347,7 +347,7 @@ private function mergeWithInjectedData(EntityInterface $entity, array|callable|E
347347 if (is_callable ($ data )) {
348348 $ data = $ data (
349349 $ this ->getFactory (),
350- $ this ->getFactory ()->getFaker ()
350+ $ this ->getFactory ()->getFaker (),
351351 );
352352 } elseif (is_array ($ data )) {
353353 $ this ->addEnforcedFields ($ data );
@@ -561,7 +561,7 @@ public function generateArrayOfRandomPrimaryKeys(): array
561561 $ res = [];
562562 foreach ($ primaryKeys as $ pk ) {
563563 $ res [$ pk ] = $ this ->generateRandomPrimaryKey (
564- $ this ->getFactory ()->getTable ()->getSchema ()->getColumnType ($ pk )
564+ $ this ->getFactory ()->getTable ()->getSchema ()->getColumnType ($ pk ),
565565 );
566566 }
567567
@@ -618,7 +618,7 @@ public function setPrimaryKeyOffset(mixed $primaryKeyOffset): void
618618 $ primaryKey = $ this ->getFactory ()->getTable ()->getPrimaryKey ();
619619 if (!is_string ($ primaryKey )) {
620620 throw new FixtureFactoryException (
621- "The primary key assigned must be a string as $ primaryKeyOffset is a string or an integer. "
621+ "The primary key assigned must be a string as $ primaryKeyOffset is a string or an integer. " ,
622622 );
623623 }
624624 $ this ->primaryKeyOffset = [
@@ -628,7 +628,7 @@ public function setPrimaryKeyOffset(mixed $primaryKeyOffset): void
628628 $ this ->primaryKeyOffset = $ primaryKeyOffset ;
629629 } else {
630630 throw new FixtureFactoryException (
631- "$ primaryKeyOffset must be an integer, a string or an array of format ['primaryKey1' => value, ...] "
631+ "$ primaryKeyOffset must be an integer, a string or an array of format ['primaryKey1' => value, ...] " ,
632632 );
633633 }
634634 }
@@ -656,7 +656,7 @@ private function updatePostgresSequence(array $primaryKeys): void
656656 SELECT pg_get_serial_sequence(' $ tableName',' $ pk') " )->fetchAll ()[0 ][0 ];
657657 if ($ seq !== null ) {
658658 $ table ->getConnection ()->execute (
659- "SELECT setval(' $ seq', $ offset); "
659+ "SELECT setval(' $ seq', $ offset); " ,
660660 );
661661 }
662662 }
@@ -676,9 +676,9 @@ public function getModifiedUniqueFields(): array
676676 $ this ->getEnforcedFields (),
677677 array_merge (
678678 $ this ->getFactory ()->getUniqueProperties (),
679- (array )$ this ->getFactory ()->getTable ()->getPrimaryKey ()
680- )
681- )
679+ (array )$ this ->getFactory ()->getTable ()->getPrimaryKey (),
680+ ),
681+ ),
682682 );
683683 }
684684
@@ -727,7 +727,7 @@ public function addEnforcedFields(array $fields): void
727727 {
728728 $ this ->enforcedFields = array_merge (
729729 array_keys ($ fields ),
730- $ this ->enforcedFields
730+ $ this ->enforcedFields ,
731731 );
732732 }
733733
0 commit comments