1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-14 18:36:58 +01:00
psalm/src/Psalm/Internal/Scope/IfScope.php

94 lines
1.7 KiB
PHP
Raw Normal View History

<?php
2018-11-06 03:57:36 +01:00
namespace Psalm\Internal\Scope;
2017-12-03 00:28:18 +01:00
2021-12-04 03:37:19 +01:00
use Psalm\Context;
2018-11-06 03:57:36 +01:00
use Psalm\Internal\Clause;
2017-12-03 00:28:18 +01:00
use Psalm\Type;
/**
* @internal
*/
class IfScope
{
/**
* @var array<string, Type\Union>|null
*/
2021-09-26 23:24:07 +02:00
public $new_vars;
/**
2017-12-02 19:32:20 +01:00
* @var array<string, bool>
*/
public $new_vars_possibly_in_scope = [];
2017-05-27 02:16:18 +02:00
/**
* @var array<string, Type\Union>|null
*/
2021-09-26 23:24:07 +02:00
public $redefined_vars;
/**
* @var array<string, int>|null
*/
2021-09-26 23:24:07 +02:00
public $assigned_var_ids;
/**
* @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 17:48:16 +01:00
/**
* @var array<string, bool>
2018-01-20 17:48:16 +01:00
*/
public $if_cond_changed_var_ids = [];
/**
* @var array<string, string>|null
*/
2021-09-26 23:24:07 +02:00
public $negatable_if_types;
/**
* @var list<Clause>
*/
public $negated_clauses = [];
/**
2018-05-14 22:29:51 +02:00
* These are the set of clauses that could be applied after the `if`
* statement, if the `if` statement contains branches with leaving statements,
2018-05-14 22:29:51 +02:00
* and the else leaves too
*
2020-10-16 17:17:52 +02:00
* @var list<Clause>
*/
public $reasonable_clauses = [];
/**
* Variables that were mixed, but are no longer
*
2018-01-29 03:43:26 +01:00
* @var array<string, Type\Union>|null
*/
2021-09-26 23:24:07 +02:00
public $possible_param_types;
2017-12-03 00:28:18 +01:00
/**
* @var string[]
*/
public $final_actions = [];
/**
2021-12-04 03:37:19 +01:00
* @var ?Context
*/
public $post_leaving_if_context;
}