File tree 1 file changed +32
-0
lines changed
1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ require 'vendor/autoload.php ' ;
6
+
7
+ use DG \BypassFinals ;
8
+ use Psalm \Internal \Analyzer \ProjectAnalyzer ;
9
+ use Psalm \Internal \Provider \FileProvider ;
10
+ use Psalm \Internal \Provider \Providers ;
11
+ use Psalm \Tests \TestConfig ;
12
+ use Psalm \Type ;
13
+
14
+ BypassFinals::enable ();
15
+
16
+ new ProjectAnalyzer (new TestConfig , new Providers (new FileProvider ));
17
+
18
+ $ codebase = ProjectAnalyzer::getInstance ()->getCodebase ();
19
+
20
+ chdir (__DIR__ .'/../ ' );
21
+
22
+ foreach (glob ("dictionaries/CallMap*.php " ) as $ file ) {
23
+ $ callMap = require $ file ;
24
+
25
+ array_walk_recursive ($ callMap , function (string &$ type ): void {
26
+ $ type = Type::parseString ($ type === '' ? 'mixed ' : $ type )->getId (true );
27
+ });
28
+
29
+ file_put_contents ($ file , '<?php // phpcs:ignoreFile
30
+
31
+ return ' .var_export ($ callMap , true ).'; ' );
32
+ }
You can’t perform that action at this time.
0 commit comments