2016-11-11 17:13:13 -05:00
|
|
|
<?php
|
2017-12-02 18:28:18 -05:00
|
|
|
namespace Psalm\Scope;
|
|
|
|
|
|
|
|
use Psalm\Clause;
|
|
|
|
use Psalm\Type;
|
2016-11-11 17:13:13 -05:00
|
|
|
|
|
|
|
class IfScope
|
|
|
|
{
|
|
|
|
/**
|
2016-12-24 18:23:22 +00:00
|
|
|
* @var array<string, Type\Union>|null
|
2016-11-11 17:13:13 -05:00
|
|
|
*/
|
|
|
|
public $new_vars = null;
|
|
|
|
|
|
|
|
/**
|
2017-12-02 13:32:20 -05:00
|
|
|
* @var array<string, bool>
|
2016-11-11 17:13:13 -05:00
|
|
|
*/
|
|
|
|
public $new_vars_possibly_in_scope = [];
|
|
|
|
|
2017-05-26 20:16:18 -04:00
|
|
|
/**
|
2016-12-24 18:23:22 +00:00
|
|
|
* @var array<string, Type\Union>|null
|
2016-11-11 17:13:13 -05:00
|
|
|
*/
|
|
|
|
public $redefined_vars = null;
|
|
|
|
|
2018-01-28 17:28:34 -05:00
|
|
|
/**
|
|
|
|
* @var array<string, bool>|null
|
|
|
|
*/
|
|
|
|
public $assigned_var_ids = null;
|
|
|
|
|
2016-11-11 17:13:13 -05:00
|
|
|
/**
|
2016-12-24 18:23:22 +00:00
|
|
|
* @var array<string, Type\Union>
|
2016-11-11 17:13:13 -05:00
|
|
|
*/
|
|
|
|
public $possibly_redefined_vars = [];
|
|
|
|
|
|
|
|
/**
|
2017-02-23 19:36:51 -05:00
|
|
|
* @var array<string, bool>
|
2016-11-11 17:13:13 -05:00
|
|
|
*/
|
|
|
|
public $updated_vars = [];
|
|
|
|
|
|
|
|
/**
|
2018-05-12 19:38:43 -04:00
|
|
|
* @var array<string, array<int, array<int, string>>>
|
2016-11-11 17:13:13 -05:00
|
|
|
*/
|
|
|
|
public $negated_types = [];
|
|
|
|
|
2018-01-20 11:48:16 -05:00
|
|
|
/**
|
|
|
|
* @var array<mixed, string>
|
|
|
|
*/
|
|
|
|
public $if_cond_changed_var_ids = [];
|
|
|
|
|
2016-11-11 17:13:13 -05:00
|
|
|
/**
|
|
|
|
* @var array<string, string>|null
|
|
|
|
*/
|
|
|
|
public $negatable_if_types = null;
|
|
|
|
|
2017-03-16 14:45:45 -04:00
|
|
|
/**
|
2017-03-18 14:04:26 -04:00
|
|
|
* @var array<int, Clause>
|
2017-03-16 14:45:45 -04:00
|
|
|
*/
|
2018-05-03 11:38:27 -04:00
|
|
|
public $negated_clauses = [];
|
2017-03-16 14:45:45 -04:00
|
|
|
|
|
|
|
/**
|
2018-05-14 16:29:51 -04:00
|
|
|
* These are the set of clauses that could be applied after the `if`
|
|
|
|
* statement, if the `if` statement contains branches with leaving statments,
|
|
|
|
* and the else leaves too
|
|
|
|
*
|
2017-03-18 14:04:26 -04:00
|
|
|
* @var array<int, Clause>
|
2017-03-16 14:45:45 -04:00
|
|
|
*/
|
2017-03-18 13:37:00 -04:00
|
|
|
public $reasonable_clauses = [];
|
2017-09-02 18:15:52 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Variables that were mixed, but are no longer
|
|
|
|
*
|
2018-01-28 21:43:26 -05:00
|
|
|
* @var array<string, Type\Union>|null
|
2017-09-02 18:15:52 -04:00
|
|
|
*/
|
|
|
|
public $possible_param_types = null;
|
2017-12-02 18:28:18 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @var string[]
|
|
|
|
*/
|
|
|
|
public $final_actions = [];
|
2016-11-11 17:13:13 -05:00
|
|
|
}
|