Open King2500 opened 4 years ago
It's been in beta test for a while...
Should also allow for Attribute arguments (i.e. __construct
calls).
Add 'http_statuscode'
Completion list:
xAdvancedCompletion(\My\Class::method(), 1, 'http_statuscode');
Also add:
namespace PHPSTORM_META {
function xAdvancedCompletionWithArg($functionReference, $matchArgumentIndex, $matchArgumentValue, $completionArgumentIndex, $completionList, $ignoreCase = false) {
$matchArgumentValue = \json_encode($matchArgumentValue);
return "xAdvancedCompletionWithArg $functionReference [with $matchArgumentValue at $matchArgumentIndex] at $completionArgumentIndex: $completionList";
}
function xAdvancedCompletionWithPrefix($functionReference, $argumentIndex, $prefix, $completionList, $ignoreCase = false) {
return "xAdvancedCompletionWithPrefix $functionReference [with prefix '$prefix'] at $argumentIndex: $completionList";
}
}
Examples:
xAdvancedCompletionWithArg(\Symfony\Component\HttpFoundation\ResponseHeaderBag::set(), 0, 'Content-Type', 1, 'mime_type', /*ignoreCase:*/ true);
xAdvancedCompletionWithPrefix(\header(), 0, 'Content-Type: ', 'mime_type', /*ignoreCase:*/ true);
.phpstorm.meta.php:
User code:
Plugin's built-in .phpstorm.meta.php:
Solves #19