@@ -795,7 +795,7 @@ protected function validateID($id, bool $allowArray = true): void
795795 // Check if arrays are allowed
796796 if (! $ allowArray ) {
797797 throw new InvalidArgumentException (
798- 'Invalid primary key: only a single value is allowed, not an array. '
798+ 'Invalid primary key: only a single value is allowed, not an array. ' ,
799799 );
800800 }
801801
@@ -808,7 +808,7 @@ protected function validateID($id, bool $allowArray = true): void
808808 foreach ($ id as $ key => $ valueId ) {
809809 if (is_array ($ valueId )) {
810810 throw new InvalidArgumentException (
811- sprintf ('Invalid primary key at index %s: nested arrays are not allowed. ' , $ key )
811+ sprintf ('Invalid primary key at index %s: nested arrays are not allowed. ' , $ key ),
812812 );
813813 }
814814
@@ -822,15 +822,16 @@ protected function validateID($id, bool $allowArray = true): void
822822 // Check for invalid single values
823823 if (in_array ($ id , [null , 0 , '0 ' , '' , true , false ], true )) {
824824 $ type = is_bool ($ id ) ? 'boolean ' . var_export ($ id , true ) : var_export ($ id , true );
825+
825826 throw new InvalidArgumentException (
826- sprintf ('Invalid primary key: %s is not allowed. ' , $ type )
827+ sprintf ('Invalid primary key: %s is not allowed. ' , $ type ),
827828 );
828829 }
829830
830831 // Only allow int and string at this point
831832 if (! is_int ($ id ) && ! is_string ($ id )) {
832833 throw new InvalidArgumentException (
833- sprintf ('Invalid primary key: must be int or string, %s given. ' , get_debug_type ($ id ))
834+ sprintf ('Invalid primary key: must be int or string, %s given. ' , get_debug_type ($ id )),
834835 );
835836 }
836837 }
@@ -1026,7 +1027,7 @@ public function update($id = null, $row = null): bool
10261027 {
10271028 if ($ id !== null ) {
10281029 if (! is_array ($ id )) {
1029- $ id = [$ id ];
1030+ $ id = [$ id ];
10301031 }
10311032
10321033 $ this ->validateID ($ id );
0 commit comments