phpactor / vscode-phpactor

Phpactor VS Code Extension
MIT License
119 stars 8 forks source link

Links to the help page for built-in functions in signature helper #14

Open BladeMF opened 3 years ago

BladeMF commented 3 years ago

These are really predictable - replace the underscores with dashes and voila - for file_put_contents() it would be https://www.php.net/manual/en/function.file-put-contents.php. Probably something in the twig template with a filter? Can I do it? Is it as simple as modifying the twig template?

dantleech commented 3 years ago

I don't think so:

BladeMF commented 3 years ago

How do you know the built-in functions' signatures then?

BladeMF commented 3 years ago

I noticed you are using jetbrains/phpstorm-stubs. They all have links and pretty well formatted comments, e.g:

/**
 * Opens a bzip2 compressed file
 * @link https://php.net/manual/en/function.bzopen.php
 * @param string $filename <p>
 * The name of the file to open, or an existing stream resource.
 * </p>
 * @param string $mode <p>
 * Similar to the <b>fopen</b> function, only 'r' (read)
 * and 'w' (write) are supported. Everything else will cause bzopen
 * to return <b>FALSE</b>.
 * </p>
 * @return resource|false If the open fails, <b>bzopen</b> returns <b>FALSE</b>, otherwise
 * it returns a pointer to the newly opened file.
 */
function bzopen ($filename, $mode) {}

Can you use those?

dantleech commented 3 years ago

We do use those?

image

or what do you mean?