phpactor / vscode-phpactor

Phpactor VS Code Extension

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

BladeMF opened this issue · comments

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?

I don't think so:

  • We don't know if a function is built-in or not.
  • We have no guarantee that a built-in function is documented.

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

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?

We do use those?

image

or what do you mean?