@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | |
293 | 293 | public function testPropertiesAccessor() |
294 | 294 | { |
295 | - $aSpecificRule = [ 'custom-validator' => 'email' ]; |
|
295 | + $aSpecificRule = ['custom-validator' => 'email']; |
|
296 | 296 | |
297 | 297 | $configurator = new Configurator( |
298 | 298 | 'email-resource', |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | 'resources' => [ |
392 | 392 | 'bar' => [ |
393 | 393 | 'constraints' => [ |
394 | - 'allowed' => [ 'allowed_property_name' ], |
|
394 | + 'allowed' => ['allowed_property_name'], |
|
395 | 395 | ] |
396 | 396 | ], |
397 | 397 | ], |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | ); |
401 | 401 | |
402 | 402 | $this->assertEquals( |
403 | - [ 'allowed_property_name' ], |
|
403 | + ['allowed_property_name'], |
|
404 | 404 | $resource->allowed('bar') |
405 | 405 | ); |
406 | 406 | } |
@@ -442,19 +442,19 @@ discard block |
||
442 | 442 | 'resources' => [ |
443 | 443 | 'foo' => [ |
444 | 444 | 'constraints' => [ |
445 | - 'allowed' => [ 'allowed_property_name' ], |
|
445 | + 'allowed' => ['allowed_property_name'], |
|
446 | 446 | ] |
447 | 447 | ], |
448 | 448 | 'unused_resource' => [ |
449 | 449 | 'constraints' => [ |
450 | - 'allowed' => [ 'bar' ], |
|
450 | + 'allowed' => ['bar'], |
|
451 | 451 | ] |
452 | 452 | ], |
453 | 453 | ], |
454 | 454 | ]); |
455 | 455 | |
456 | 456 | $this->assertEquals( |
457 | - [ 'allowed_property_name' ], |
|
457 | + ['allowed_property_name'], |
|
458 | 458 | $container->allowed('foo') |
459 | 459 | ); |
460 | 460 | } |
@@ -506,14 +506,14 @@ discard block |
||
506 | 506 | 'resources' => [ |
507 | 507 | 'foo' => [ |
508 | 508 | 'constraints' => [ |
509 | - 'mandatory' => [ 'mandatory_property' ], |
|
509 | + 'mandatory' => ['mandatory_property'], |
|
510 | 510 | ] |
511 | 511 | ], |
512 | 512 | ], |
513 | 513 | ]); |
514 | 514 | |
515 | 515 | $this->assertEquals( |
516 | - [ 'mandatory_property' ], |
|
516 | + ['mandatory_property'], |
|
517 | 517 | $container->allowed('foo') |
518 | 518 | ); |
519 | 519 | } |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | 'resources' => [ |
531 | 531 | 'foo' => [ |
532 | 532 | 'constraints' => [ |
533 | - 'allowed' => [ 'user_type' ], |
|
533 | + 'allowed' => ['user_type'], |
|
534 | 534 | 'allowedValues' => [ |
535 | 535 | 'user_type' => [ |
536 | 536 | 4, |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | ]) |
544 | 544 | ); |
545 | 545 | |
546 | - $properties = [ 'user_type' => 3 ]; |
|
546 | + $properties = ['user_type' => 3]; |
|
547 | 547 | |
548 | 548 | Resource::box( |
549 | 549 | $properties, |
@@ -632,7 +632,7 @@ discard block |
||
632 | 632 | ); |
633 | 633 | |
634 | 634 | Resource::box( |
635 | - [ 'age' => 2 ], |
|
635 | + ['age' => 2], |
|
636 | 636 | $configurator |
637 | 637 | ); |
638 | 638 | } |
@@ -732,7 +732,7 @@ discard block |
||
732 | 732 | 'first-email', |
733 | 733 | ], |
734 | 734 | 'rules' => [ |
735 | - 'first-email' => [ 'custom-validator' => 'email' ], |
|
735 | + 'first-email' => ['custom-validator' => 'email'], |
|
736 | 736 | ], |
737 | 737 | ] |
738 | 738 | ], |
@@ -759,8 +759,8 @@ discard block |
||
759 | 759 | 'resources' => [ |
760 | 760 | 'type-with-number' => [ |
761 | 761 | 'constraints' => [ |
762 | - 'mandatory' => [ 'a-magic-number' ], |
|
763 | - 'rules' => [ 'a-magic-number' => [ 'scalar' => 'integer' ] ], |
|
762 | + 'mandatory' => ['a-magic-number'], |
|
763 | + 'rules' => ['a-magic-number' => ['scalar' => 'integer']], |
|
764 | 764 | ] |
765 | 765 | ], |
766 | 766 | ], |
@@ -786,7 +786,7 @@ discard block |
||
786 | 786 | 'first-email', |
787 | 787 | ], |
788 | 788 | 'rules' => [ |
789 | - 'first-email' => [ 'custom-validator' => 'email' ], |
|
789 | + 'first-email' => ['custom-validator' => 'email'], |
|
790 | 790 | ], |
791 | 791 | ] |
792 | 792 | ], |
@@ -819,7 +819,7 @@ discard block |
||
819 | 819 | 'first-email', |
820 | 820 | ], |
821 | 821 | 'rules' => [ |
822 | - 'first-email' => [ 'custom-validator' => 'email' ], |
|
822 | + 'first-email' => ['custom-validator' => 'email'], |
|
823 | 823 | ], |
824 | 824 | ] |
825 | 825 | ], |
@@ -849,7 +849,7 @@ discard block |
||
849 | 849 | |
850 | 850 | public function testProvideRule() |
851 | 851 | { |
852 | - $aSpecificRule = [ 'custom-validator' => 'email' ]; |
|
852 | + $aSpecificRule = ['custom-validator' => 'email']; |
|
853 | 853 | |
854 | 854 | $configurator = new Configurator( |
855 | 855 | 'email-resource', |