File tree Expand file tree Collapse file tree
src/Command/ErrorFormatter Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010use PHPStan \File \RelativePathHelper ;
1111use function count ;
1212use function htmlspecialchars ;
13- use function PHPStan \debugScope ;
1413use function sprintf ;
1514use const ENT_COMPAT ;
1615use const ENT_XML1 ;
@@ -125,20 +124,4 @@ private function groupByFile(AnalysisResult $analysisResult): array
125124 return $ files ;
126125 }
127126
128- /** @param 1 $i */
129- public function demoErrorAnnotations (int $ i ): array
130- {
131- if ($ i === 1 ) {
132- echo 1 ; // @phpstan-ignore variable.undefined
133- }
134-
135- debugScope ();
136- return [$ this ->demoWithoutTip ()];
137- }
138-
139- private function demoWithoutTip (): int
140- {
141- return 'not an int ' ;
142- }
143-
144127}
Original file line number Diff line number Diff line change 22
33namespace PHPStan \Command \ErrorFormatter ;
44
5- use Exception ;
65use PHPStan \Command \AnalysisResult ;
76use PHPStan \Command \Output ;
87use PHPStan \DependencyInjection \AutowiredService ;
@@ -50,20 +49,4 @@ public function formatErrors(
5049 return $ analysisResult ->hasErrors () ? 1 : 0 ;
5150 }
5251
53- public function demoErrorAnnotations (): void
54- {
55- $ this ->demoObjectShape (new Exception ());
56- $ rocket = '🚀 launch 😃 ' ;
57- if ($ rocket === '🐢 slow ' ) {
58- return ;
59- }
60- }
61-
62- /**
63- * @param object{foo: int, bar: string} $o
64- */
65- private function demoObjectShape (object $ o ): void
66- {
67- }
68-
6952}
You can’t perform that action at this time.
0 commit comments