@@ -149,7 +149,7 @@ public function beforeSave(EventInterface $event, EntityInterface $entity, Array
149149 $ this ->_sync (
150150 [$ orderField => $ this ->_getUpdateExpression ('+ ' )],
151151 [$ orderField . ' >= ' => $ newOrder ],
152- $ newScope
152+ $ newScope,
153153 );
154154 }
155155
@@ -176,15 +176,15 @@ public function beforeSave(EventInterface $event, EntityInterface $entity, Array
176176 $ this ->_sync (
177177 [$ orderField => $ this ->_getUpdateExpression ('- ' )],
178178 [$ orderField . ' > ' => $ oldOrder ],
179- $ oldScope
179+ $ oldScope,
180180 );
181181
182182 // Order not specified
183183 if ($ newOrder === null ) {
184184 // Insert at end of new scope
185185 $ entity ->set (
186186 $ orderField ,
187- $ this ->_getHighestOrder ($ newScope ) + 1
187+ $ this ->_getHighestOrder ($ newScope ) + 1 ,
188188 );
189189
190190 // Order specified
@@ -193,7 +193,7 @@ public function beforeSave(EventInterface $event, EntityInterface $entity, Array
193193 $ this ->_sync (
194194 [$ orderField => $ this ->_getUpdateExpression ('+ ' )],
195195 [$ orderField . ' >= ' => $ newOrder ],
196- $ newScope
196+ $ newScope,
197197 );
198198 }
199199 // Same scope
@@ -207,7 +207,7 @@ public function beforeSave(EventInterface $event, EntityInterface $entity, Array
207207 $ orderField . ' >= ' => $ newOrder ,
208208 $ orderField . ' < ' => $ oldOrder ,
209209 ],
210- $ newScope
210+ $ newScope,
211211 );
212212
213213 // Moving down
@@ -219,7 +219,7 @@ public function beforeSave(EventInterface $event, EntityInterface $entity, Array
219219 $ orderField . ' > ' => $ oldOrder ,
220220 $ orderField . ' <= ' => $ newOrder ,
221221 ],
222- $ newScope
222+ $ newScope,
223223 );
224224 }
225225 }
@@ -262,7 +262,7 @@ public function afterDelete(EventInterface $event, EntityInterface $entity): voi
262262 $ this ->_sync (
263263 [$ orderField => $ this ->_getUpdateExpression ('- ' )],
264264 [$ orderField . ' > ' => $ order ],
265- $ scope
265+ $ scope,
266266 );
267267
268268 $ this ->_oldValues = null ;
@@ -352,7 +352,7 @@ function ($connection) use ($table, $entity, $config, $scope, $direction) {
352352 $ entity ->set ($ orderField , $ newOrder );
353353
354354 return $ table ->save ($ entity , ['atomic ' => false , 'checkRules ' => false ]);
355- }
355+ },
356356 );
357357
358358 $ table ->addBehavior ('ADmad/Sequence.Sequence ' , $ config );
@@ -406,15 +406,15 @@ function ($connection) use ($table, $records) {
406406
407407 $ r = $ table ->save (
408408 $ record ,
409- ['atomic ' => false , 'checkRules ' => false ]
409+ ['atomic ' => false , 'checkRules ' => false ],
410410 );
411411 if ($ r === false ) {
412412 return false ;
413413 }
414414 }
415415
416416 return true ;
417- }
417+ },
418418 );
419419
420420 $ table ->addBehavior ('ADmad/Sequence.Sequence ' , $ config );
@@ -554,7 +554,7 @@ protected function _getUpdateExpression(string $direction = '+'): QueryExpressio
554554 {
555555 $ field = $ this ->_config ['sequenceField ' ];
556556
557- return $ this ->_table ->selectQuery ()->newExpr ()
557+ return $ this ->_table ->selectQuery ()->expr ()
558558 ->add (new IdentifierExpression ($ field ))
559559 ->add ('1 ' )
560560 ->setConjunction ($ direction );
0 commit comments