@@ -80,7 +80,8 @@ protected function buildUrlPatternAliased(VerbalExpressions $regex)
80
80
}
81
81
82
82
83
- public function testTest (){
83
+ public function testTest ()
84
+ {
84
85
$ regex = new VerbalExpressions ();
85
86
$ regex ->find ('regex ' );
86
87
@@ -284,7 +285,8 @@ public function testAnyOf()
284
285
}
285
286
286
287
287
- public function testGetRegex (){
288
+ public function testGetRegex ()
289
+ {
288
290
$ regex = new VerbalExpressions ();
289
291
$ regex ->startOfLine ()
290
292
->range (0 , 9 , 'a ' , 'z ' , 'A ' , 'Z ' )
@@ -299,7 +301,8 @@ public function testGetRegex(){
299
301
/**
300
302
* @depends testGetRegex
301
303
*/
302
- public function testGetRegex_multiple (){
304
+ public function testGetRegex_multiple ()
305
+ {
303
306
$ regex = new VerbalExpressions ();
304
307
$ regex ->startOfLine ()
305
308
->multiple ('regex ' );
@@ -310,9 +313,10 @@ public function testGetRegex_multiple(){
310
313
/**
311
314
* @expectedException InvalidArgumentException
312
315
*/
313
- public function testRange_throwsException (){
314
- $ regex = new VerbalExpressions ();
315
- $ regex ->range (1 , 2 , 3 );
316
+ public function testRange_throwsException ()
317
+ {
318
+ $ regex = new VerbalExpressions ();
319
+ $ regex ->range (1 , 2 , 3 );
316
320
}
317
321
318
322
/**
@@ -420,7 +424,8 @@ public function testRange_hexadecimal()
420
424
/**
421
425
* @depends testRange_hexadecimal
422
426
*/
423
- public function testRange_md5 (){
427
+ public function testRange_md5 ()
428
+ {
424
429
$ md5 = new VerbalExpressions ();
425
430
$ md5 ->startOfLine ()
426
431
->range (0 , 9 , 'a ' , 'f ' )
@@ -438,7 +443,8 @@ public function testRange_md5(){
438
443
/*
439
444
* @depends testRange_hexadecimal
440
445
*/
441
- public function testRange_sha1 (){
446
+ public function testRange_sha1 ()
447
+ {
442
448
$ sha1 = new VerbalExpressions ();
443
449
$ sha1 ->startOfLine ()
444
450
->range (0 , 9 , 'a ' , 'f ' )
@@ -456,7 +462,8 @@ public function testRange_sha1(){
456
462
/**
457
463
* @depends testGetRegex
458
464
*/
459
- public function testRemoveModifier (){
465
+ public function testRemoveModifier ()
466
+ {
460
467
$ regex = new VerbalExpressions ();
461
468
$ regex ->range ('a ' , 'z ' );
462
469
@@ -470,7 +477,8 @@ public function testRemoveModifier(){
470
477
/**
471
478
* @depends testRemoveModifier
472
479
*/
473
- public function testWithAnyCase (){
480
+ public function testWithAnyCase ()
481
+ {
474
482
$ regex = new VerbalExpressions ();
475
483
$ regex ->range ('a ' , 'z ' )
476
484
->searchOneLine (false )
@@ -486,7 +494,8 @@ public function testWithAnyCase(){
486
494
/**
487
495
* @depends testGetRegex
488
496
*/
489
- public function testOr (){
497
+ public function testOr ()
498
+ {
490
499
$ regex = new VerbalExpressions ();
491
500
$ regex ->find ('foo ' )
492
501
->_or ('bar ' );
@@ -503,7 +512,8 @@ public function testOr(){
503
512
* @depends testGetRegex
504
513
* @todo fix VerbalExpressions::clean() so it matches initial state
505
514
*/
506
- public function testClean (){
515
+ public function testClean ()
516
+ {
507
517
$ regex = new VerbalExpressions ();
508
518
$ regex ->removeModifier ('m ' )
509
519
->stopAtFirst ()
@@ -524,7 +534,8 @@ public function testClean(){
524
534
/**
525
535
* @depends testGetRegex
526
536
*/
527
- public function testLimit (){
537
+ public function testLimit ()
538
+ {
528
539
$ regex = new VerbalExpressions ();
529
540
530
541
$ regex ->add ('a ' )
@@ -549,7 +560,8 @@ public function testLimit(){
549
560
/**
550
561
* @depends testGetRegex
551
562
*/
552
- public function testReplace (){
563
+ public function testReplace ()
564
+ {
553
565
$ regex = new VerbalExpressions ();
554
566
$ regex ->add ('foo ' );
555
567
@@ -563,38 +575,39 @@ public function testReplace(){
563
575
}
564
576
565
577
566
- public function testPsr2 (){
578
+ public function testPsr2 ()
579
+ {
567
580
$ pathToRoot = dirname (dirname (dirname (__DIR__ )));
568
581
$ pathToVendor = $ pathToRoot . '/vendor ' ;
569
582
$ pathToSrc = $ pathToRoot . '/src ' ;
570
583
$ pathToTests = $ pathToRoot . '/tests ' ;
571
584
572
- if (
585
+ if (
573
586
!is_dir ($ pathToVendor )
574
- ){
587
+ ) {
575
588
$ this ->markTestSkipped ('Vendor directory not found. ' );
576
589
return ;
577
- }else if (
590
+ } elseif (
578
591
!is_dir ($ pathToSrc )
579
- ){
592
+ ) {
580
593
$ this ->markTestSkipped ('Source directory not found. ' );
581
594
return ;
582
- }else if (
595
+ } elseif (
583
596
!is_dir ($ pathToTests )
584
- ){
597
+ ) {
585
598
$ this ->markTestSkipped ('Tests directory not found. ' );
586
599
return ;
587
600
}
588
601
589
- foreach (array (
602
+ foreach (array (
590
603
$ pathToTests ,
591
604
$ pathToSrc ,
592
- ) as $ dirToCheck ){
605
+ ) as $ dirToCheck ) {
593
606
$ cmd = escapeshellcmd (
594
607
'php-cs-fixer fix --level=psr2 --dry-run ' . $ dirToCheck
595
608
);
596
609
exec ($ cmd , $ output , $ return_var );
597
- if ($ output ){
610
+ if ($ output ) {
598
611
array_pop ($ output );
599
612
$ output = array_map ('trim ' , $ output );
600
613
}
0 commit comments