1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00
psalm/src/Psalm/Internal/Scope/IfScope.php

91 lines
1.7 KiB
PHP
Raw Normal View History

<?php
2018-11-05 21:57:36 -05:00
namespace Psalm\Internal\Scope;
2017-12-02 18:28:18 -05:00
2018-06-16 20:01:33 -04:00
use Psalm\CodeLocation;
2018-11-05 21:57:36 -05:00
use Psalm\Internal\Clause;
2017-12-02 18:28:18 -05:00
use Psalm\Type;
class IfScope
{
/**
* @var array<string, Type\Union>|null
*/
public $new_vars = null;
/**
2017-12-02 13:32:20 -05:00
* @var array<string, bool>
*/
public $new_vars_possibly_in_scope = [];
2017-05-26 20:16:18 -04:00
/**
* @var array<string, Type\Union>|null
*/
public $redefined_vars = null;
/**
* @var array<string, bool>|null
*/
public $assigned_var_ids = null;
/**
* @var array<string, bool>
*/
public $possibly_assigned_var_ids = [];
/**
* @var array<string, Type\Union>
*/
public $possibly_redefined_vars = [];
/**
* @var array<string, bool>
*/
public $updated_vars = [];
/**
* @var array<string, array<int, array<int, string>>>
*/
public $negated_types = [];
2018-01-20 11:48:16 -05:00
/**
* @var array<mixed, string>
*/
public $if_cond_changed_var_ids = [];
/**
* @var array<string, string>|null
*/
public $negatable_if_types = null;
/**
* @var array<int, Clause>
*/
public $negated_clauses = [];
/**
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
*
* @var array<int, Clause>
*/
public $reasonable_clauses = [];
/**
* Variables that were mixed, but are no longer
*
2018-01-28 21:43:26 -05:00
* @var array<string, Type\Union>|null
*/
public $possible_param_types = null;
2017-12-02 18:28:18 -05:00
/**
* @var string[]
*/
public $final_actions = [];
2018-06-16 20:01:33 -04:00
/**
* @var array<string, array<string, CodeLocation>>
*/
public $new_unreferenced_vars = [];
}