2 comments
Comment actions Permalink

Hi there,

Create a stub file for this library -- that's how it's done for all known to PhpStorm classes/functions:

  1. Create new empty php file and place it anywhere in the project -- it will be used by IDE only.
  2. Declare all required for you classes/functions as if they would have been done in actual PHP .. just with empty bodies.
  3. Add proper PHPDoc comments for better type hints and inspections


For examples just check any default PHP class or function: e.g. type "array_keys()" (without quotes, obviosuly) and Ctrl+Click on function name -- it will take you to it's definition -- see below.

/**
* (PHP 4, PHP 5)<br/>
* Return all the keys of an array
* @link http://php.net/manual/en/function.array-keys.php
* @param array $input <p>
* An array containing keys to return.
* </p>
* @param mixed $search_value [optional] <p>
* If specified, then only keys containing these values are returned.
* </p>
* @param bool $strict [optional] <p>
* Determines if strict comparison (===) should be used during the search.
* </p>
* @return array an array of all the keys in input.
*/
function array_keys (array $input, $search_value = null, $strict = null) {}
0
Comment actions Permalink

hm... Thanks! =)

0

Please sign in to leave a comment.