File tree Expand file tree Collapse file tree 1 file changed +3
-24
lines changed Expand file tree Collapse file tree 1 file changed +3
-24
lines changed Original file line number Diff line number Diff line change @@ -372,14 +372,7 @@ public function removeModifier($modifier)
372
372
*/
373
373
public function withAnyCase ($ enable = true )
374
374
{
375
- if ($ enable ) {
376
- $ this ->addModifier ('i ' );
377
- }
378
- else {
379
- $ this ->removeModifier ('i ' );
380
- }
381
-
382
- return $ this ;
375
+ return $ enable ? $ this ->addModifier ('i ' ) : $ this ->removeModifier ('i ' );
383
376
}
384
377
385
378
/**
@@ -393,14 +386,7 @@ public function withAnyCase($enable = true)
393
386
*/
394
387
public function stopAtFirst ($ enable = true )
395
388
{
396
- if ($ enable ) {
397
- $ this ->addModifier ('g ' );
398
- }
399
- else {
400
- $ this ->removeModifier ('g ' );
401
- }
402
-
403
- return $ this ;
389
+ return $ enable ? $ this ->addModifier ('g ' ) : $ this ->removeModifier ('g ' );
404
390
}
405
391
406
392
/**
@@ -414,14 +400,7 @@ public function stopAtFirst($enable = true)
414
400
*/
415
401
public function searchOneLine ($ enable = true )
416
402
{
417
- if ($ enable ===true ) {
418
- $ this ->addModifier ('m ' );
419
- }
420
- else {
421
- $ this ->removeModifier ('m ' );
422
- }
423
-
424
- return $ this ;
403
+ return $ enable ? $ this ->addModifier ('m ' ) : $ this ->removeModifier ('m ' );
425
404
}
426
405
427
406
/**
You can’t perform that action at this time.
0 commit comments