2016-12-30 21:53:35 +01:00
|
|
|
<?php
|
|
|
|
namespace Psalm\Storage;
|
|
|
|
|
|
|
|
use Psalm\CodeLocation;
|
2017-05-19 06:48:26 +02:00
|
|
|
use Psalm\Type;
|
2016-12-30 21:53:35 +01:00
|
|
|
|
|
|
|
class FunctionLikeStorage
|
|
|
|
{
|
|
|
|
/**
|
2017-02-08 06:28:26 +01:00
|
|
|
* @var CodeLocation|null
|
2016-12-30 21:53:35 +01:00
|
|
|
*/
|
2017-02-08 06:28:26 +01:00
|
|
|
public $location;
|
2016-12-30 21:53:35 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @var array<int, FunctionLikeParameter>
|
|
|
|
*/
|
|
|
|
public $params = [];
|
|
|
|
|
2017-01-06 07:07:11 +01:00
|
|
|
/**
|
2017-09-02 17:18:56 +02:00
|
|
|
* @var array<string, Type\Union|null>
|
2017-01-06 07:07:11 +01:00
|
|
|
*/
|
|
|
|
public $param_types = [];
|
|
|
|
|
2016-12-30 21:53:35 +01:00
|
|
|
/**
|
|
|
|
* @var Type\Union|null
|
|
|
|
*/
|
|
|
|
public $return_type;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var CodeLocation|null
|
|
|
|
*/
|
|
|
|
public $return_type_location;
|
|
|
|
|
2017-07-25 22:11:02 +02:00
|
|
|
/**
|
|
|
|
* @var Type\Union|null
|
|
|
|
*/
|
|
|
|
public $signature_return_type;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var CodeLocation|null
|
|
|
|
*/
|
|
|
|
public $signature_return_type_location;
|
|
|
|
|
2016-12-30 21:53:35 +01:00
|
|
|
/**
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public $cased_name;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var array<int, string>
|
|
|
|
*/
|
|
|
|
public $suppressed_issues = [];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
public $deprecated;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
public $variadic;
|
2017-01-13 18:03:22 +01:00
|
|
|
|
2018-01-13 07:15:00 +01:00
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
public $returns_by_ref = false;
|
|
|
|
|
2017-01-13 18:03:22 +01:00
|
|
|
/**
|
|
|
|
* @var int
|
|
|
|
*/
|
|
|
|
public $required_param_count;
|
2017-01-15 22:43:49 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @var array<string, Type\Union>
|
|
|
|
*/
|
|
|
|
public $defined_constants = [];
|
2017-01-30 05:44:05 +01:00
|
|
|
|
2018-05-31 04:09:46 +02:00
|
|
|
/**
|
|
|
|
* @var array<string, bool>
|
|
|
|
*/
|
|
|
|
public $global_variables = [];
|
|
|
|
|
2018-06-08 15:31:21 +02:00
|
|
|
/**
|
|
|
|
* @var array<string, Type\Union>
|
|
|
|
*/
|
|
|
|
public $global_types = [];
|
|
|
|
|
2017-02-10 02:35:17 +01:00
|
|
|
/**
|
|
|
|
* @var array<string, string>|null
|
|
|
|
*/
|
|
|
|
public $template_types;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var array<int, string>|null
|
|
|
|
*/
|
|
|
|
public $template_typeof_params;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
public $has_template_return_type;
|
2017-02-27 05:09:18 +01:00
|
|
|
|
|
|
|
/**
|
2017-02-28 00:24:20 +01:00
|
|
|
* @var array<string, array<int, CodeLocation>>|null
|
2017-02-27 05:09:18 +01:00
|
|
|
*/
|
|
|
|
public $referencing_locations;
|
2017-09-21 21:36:26 +02:00
|
|
|
|
2018-05-28 21:07:42 +02:00
|
|
|
/**
|
|
|
|
* @var array<int, Assertion>
|
|
|
|
*/
|
2017-09-21 21:36:26 +02:00
|
|
|
public $assertions = [];
|
2018-05-28 21:07:42 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @var array<int, Assertion>
|
|
|
|
*/
|
|
|
|
public $if_true_assertions = [];
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var array<int, Assertion>
|
|
|
|
*/
|
|
|
|
public $if_false_assertions = [];
|
2018-05-29 16:13:26 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
public $has_visitor_issues = false;
|
2016-12-30 21:53:35 +01:00
|
|
|
}
|