vscode-phpactor icon indicating copy to clipboard operation
vscode-phpactor copied to clipboard

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

Open BladeMF opened this issue 5 years ago • 4 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?

BladeMF avatar Dec 14 '20 08:12 BladeMF

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.

dantleech avatar Dec 14 '20 08:12 dantleech

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

BladeMF avatar Dec 14 '20 08:12 BladeMF

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?

BladeMF avatar Dec 22 '20 18:12 BladeMF

We do use those?

image

or what do you mean?

dantleech avatar Dec 22 '20 22:12 dantleech