Function __global->js_add_variable_reference
Definitions
sources/webstandards_js_lint.php
- Add a reference to a named variable.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $identifier | string | No | No | required parameter | N/A | N/A | The variable name |
| $first_mention | integer | No | No | required parameter | N/A | N/A | Where the first mention of the variable is |
| $instantiation | boolean | No | No | True | N/A | N/A | Whether this is an instantiation reference |
| $reference | boolean | No | No | False | N/A | N/A | Whether this is a reference (as opposed to instantiation/setting) |
| $function_return | ?string | No | No | Null | N/A | N/A | The result-type (null: not a function) |
| $is_call | boolean | No | No | False | N/A | N/A | Whether this is a function call |
Preview
Code (PHP)
/**
* Add a reference to a named variable.
*
* @param string $identifier The variable name
* @param integer $first_mention Where the first mention of the variable is
* @param boolean $instantiation Whether this is an instantiation reference
* @param boolean $reference Whether this is a reference (as opposed to instantiation/setting)
* @param ?string $function_return The result-type (null: not a function)
* @param boolean $is_call Whether this is a function call
*/
function js_add_variable_reference(string $identifier, int $first_mention, bool $instantiation = true, bool $reference = false, ?string $function_return = null, bool $is_call = false)
* Add a reference to a named variable.
*
* @param string $identifier The variable name
* @param integer $first_mention Where the first mention of the variable is
* @param boolean $instantiation Whether this is an instantiation reference
* @param boolean $reference Whether this is a reference (as opposed to instantiation/setting)
* @param ?string $function_return The result-type (null: not a function)
* @param boolean $is_call Whether this is a function call
*/
function js_add_variable_reference(string $identifier, int $first_mention, bool $instantiation = true, bool $reference = false, ?string $function_return = null, bool $is_call = false)
