diff --git a/.phpstorm.meta.stub b/.phpstorm.meta.stub new file mode 100644 index 00000000000..02620a1b914 --- /dev/null +++ b/.phpstorm.meta.stub @@ -0,0 +1,10 @@ +tokenize($reflection->getDocComment())); +$phpDocNode = $phpDocParser->parse($tokens); + +$replacements = ''; +foreach ($phpDocNode->getTagsByName('@method') as $node) { + $replacements .= "\"{$node->value->methodName}\" => \Github\\{$node->value->returnType->name}::class,".PHP_EOL; +} + +$str = file_get_contents('./.phpstorm.meta.stub'); +$str = str_replace('$METHODS$', $replacements, $str); +file_put_contents('.phpstorm.meta.php', $str);