@@ -38,14 +38,14 @@ final class ConfigTest extends TestCase
3838{
3939 public function testImplementsInterface (): void
4040 {
41- $ this -> assertInstanceOf (ConfigInterface::class, new Config ());
41+ self :: assertInstanceOf (ConfigInterface::class, new Config ());
4242 }
4343
4444 public function testValues (): void
4545 {
4646 $ config = new Config ();
4747
48- $ this -> assertSame ('narrowspark ' , $ config ->getName ());
48+ self :: assertSame ('narrowspark ' , $ config ->getName ());
4949 }
5050
5151 public function testHasPsr2Rules (): void
@@ -90,20 +90,20 @@ public function testIfAllRulesAreTested(): void
9090 $ rules = (new Config ())->getRules ();
9191
9292 foreach ($ rules as $ key => $ value ) {
93- $ this -> assertTrue (isset ($ testRules [$ key ]), '[ ' . $ key . '] Rule is missing. ' );
93+ self :: assertTrue (isset ($ testRules [$ key ]), '[ ' . $ key . '] Rule is missing. ' );
9494 }
9595
96- $ this -> assertCount (\count ($ testRules ), $ rules );
96+ self :: assertCount (\count ($ testRules ), $ rules );
9797 }
9898
9999 public function testDoesNotHaveHeaderCommentFixerByDefault (): void
100100 {
101101 $ rules = (new Config ())->getRules ();
102102
103- $ this -> assertArrayHasKey ('header_comment ' , $ rules );
104- $ this -> assertFalse ($ rules ['header_comment ' ]);
105- $ this -> assertTrue ($ rules ['no_blank_lines_before_namespace ' ]);
106- $ this -> assertFalse ($ rules ['single_blank_line_before_namespace ' ]);
103+ self :: assertArrayHasKey ('header_comment ' , $ rules );
104+ self :: assertFalse ($ rules ['header_comment ' ]);
105+ self :: assertTrue ($ rules ['no_blank_lines_before_namespace ' ]);
106+ self :: assertFalse ($ rules ['single_blank_line_before_namespace ' ]);
107107 }
108108
109109 public function testHasHeaderCommentFixerIfProvided (): void
@@ -112,17 +112,17 @@ public function testHasHeaderCommentFixerIfProvided(): void
112112 $ config = new Config ($ header );
113113 $ rules = $ config ->getRules ();
114114
115- $ this -> assertArrayHasKey ('header_comment ' , $ rules );
115+ self :: assertArrayHasKey ('header_comment ' , $ rules );
116116
117117 $ expected = [
118118 'comment_type ' => 'PHPDoc ' ,
119119 'header ' => $ header ,
120120 'location ' => 'after_declare_strict ' ,
121121 'separate ' => 'both ' ,
122122 ];
123- $ this -> assertSame ($ expected , $ rules ['header_comment ' ]);
124- $ this -> assertTrue ($ rules ['no_blank_lines_before_namespace ' ]);
125- $ this -> assertFalse ($ rules ['single_blank_line_before_namespace ' ]);
123+ self :: assertSame ($ expected , $ rules ['header_comment ' ]);
124+ self :: assertTrue ($ rules ['no_blank_lines_before_namespace ' ]);
125+ self :: assertFalse ($ rules ['single_blank_line_before_namespace ' ]);
126126 }
127127
128128 public function testAllConfiguredRulesAreBuiltIn (): void
@@ -148,7 +148,7 @@ public function testAllConfiguredRulesAreBuiltIn(): void
148148 \array_merge ($ this ->builtInFixers (), $ pedroTrollerRules , $ kubawerlosRules )
149149 );
150150
151- $ this -> assertEmpty ($ fixersNotBuiltIn , \sprintf (
151+ self :: assertEmpty ($ fixersNotBuiltIn , \sprintf (
152152 'Failed to assert that fixers for the rules "%s" are built in ' ,
153153 \implode ('", " ' , $ fixersNotBuiltIn )
154154 ));
@@ -168,13 +168,13 @@ public function testDoesNotHaveRulesEnabled(string $fixer, $reason): void
168168 ];
169169
170170 if ($ fixer === 'array_syntax ' ) {
171- $ this -> assertNotSame (['syntax ' => 'long ' ], $ config ->getRules ()['array_syntax ' ], \sprintf (
171+ self :: assertNotSame (['syntax ' => 'long ' ], $ config ->getRules ()['array_syntax ' ], \sprintf (
172172 'Fixer "%s" should not be enabled, because "%s" ' ,
173173 $ fixer ,
174174 $ reason ['long ' ]
175175 ));
176176 } else {
177- $ this -> assertArraySubset ($ rule , $ config ->getRules (), true , \sprintf (
177+ self :: assertArraySubset ($ rule , $ config ->getRules (), true , \sprintf (
178178 'Fixer "%s" should not be enabled, because "%s" ' ,
179179 $ fixer ,
180180 $ reason
@@ -426,7 +426,7 @@ private function getPHPUnitRules(): array
426426 'use_class_const ' => true ,
427427 ],
428428 'php_unit_test_case_static_method_calls ' => [
429- 'call_type ' => 'this ' ,
429+ 'call_type ' => 'self ' ,
430430 ],
431431 'php_unit_internal_class ' => [
432432 'types ' => [
@@ -629,12 +629,12 @@ private function getSymfonyRules(): array
629629 private function assertHasRules (array $ expected , array $ actual , string $ set ): void
630630 {
631631 foreach ($ expected as $ fixer => $ isEnabled ) {
632- $ this -> assertArrayHasKey ($ fixer , $ actual , \sprintf (
632+ self :: assertArrayHasKey ($ fixer , $ actual , \sprintf (
633633 'Failed to assert that a rule for fixer "%s" (in set "%s") exists., ' ,
634634 $ fixer ,
635635 $ set
636636 ));
637- $ this -> assertSame ($ isEnabled , $ actual [$ fixer ], \sprintf (
637+ self :: assertSame ($ isEnabled , $ actual [$ fixer ], \sprintf (
638638 'Failed to assert that fixer "%s" (in set "%s") is %s. ' ,
639639 $ fixer ,
640640 $ set ,
0 commit comments