@@ -160,7 +160,10 @@ public function buildStatement(): string
160160 $ this ->code ->append ('for each row ' );
161161 $ this ->code ->append ('begin ' );
162162
163- if ($ this ->skipVariable !==null ) $ this ->code ->append (sprintf ('if (%s is null) then ' , $ this ->skipVariable ));
163+ if ($ this ->skipVariable !==null )
164+ {
165+ $ this ->code ->append (sprintf ('if (%s is null) then ' , $ this ->skipVariable ));
166+ }
164167
165168 $ this ->code ->append ($ this ->additionalSql );
166169
@@ -170,7 +173,10 @@ public function buildStatement(): string
170173 $ this ->createInsertStatement ($ rowState [1 ]);
171174 }
172175
173- if ($ this ->skipVariable !==null ) $ this ->code ->append ('end if; ' );
176+ if ($ this ->skipVariable !==null )
177+ {
178+ $ this ->code ->append ('end if; ' );
179+ }
174180 $ this ->code ->append ('end ' );
175181
176182 return $ this ->code ->getCode ();
@@ -199,14 +205,20 @@ private function createInsertStatementInto(): void
199205 // First the audit columns.
200206 foreach ($ this ->additionalAuditColumns ->getColumns () as $ column )
201207 {
202- if ($ columnNames ) $ columnNames .= ', ' ;
208+ if ($ columnNames !=='' )
209+ {
210+ $ columnNames .= ', ' ;
211+ }
203212 $ columnNames .= sprintf ('`%s` ' , $ column ->getName ());
204213 }
205214
206215 // Second the audit columns.
207216 foreach ($ this ->tableColumns ->getColumns () as $ column )
208217 {
209- if ($ columnNames ) $ columnNames .= ', ' ;
218+ if ($ columnNames !=='' )
219+ {
220+ $ columnNames .= ', ' ;
221+ }
210222 $ columnNames .= sprintf ('`%s` ' , $ column ->getName ());
211223 }
212224
@@ -227,7 +239,10 @@ private function createInsertStatementValues(string $rowState): void
227239 foreach ($ this ->additionalAuditColumns ->getColumns () as $ column )
228240 {
229241 $ column = $ column ->getProperties ();
230- if ($ values ) $ values .= ', ' ;
242+ if ($ values !=='' )
243+ {
244+ $ values .= ', ' ;
245+ }
231246
232247 switch (true )
233248 {
@@ -259,7 +274,10 @@ private function createInsertStatementValues(string $rowState): void
259274 // Second the values for the audit columns.
260275 foreach ($ this ->tableColumns ->getColumns () as $ column )
261276 {
262- if ($ values ) $ values .= ', ' ;
277+ if ($ values !=='' )
278+ {
279+ $ values .= ', ' ;
280+ }
263281 $ values .= sprintf ('%s.`%s` ' , $ rowState , $ column ->getName ());
264282 }
265283
0 commit comments