2019-08-27 04:16:06 +02:00
|
|
|
<?php
|
|
|
|
namespace Psalm\Internal\Scope;
|
|
|
|
|
|
|
|
use Psalm\Context;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @internal
|
|
|
|
*/
|
|
|
|
class IfConditionalScope
|
|
|
|
{
|
|
|
|
public $if_context;
|
|
|
|
|
|
|
|
public $original_context;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var array<string, bool>
|
|
|
|
*/
|
|
|
|
public $cond_referenced_var_ids;
|
|
|
|
|
|
|
|
/**
|
2020-11-01 17:26:42 +01:00
|
|
|
* @var array<string, int>
|
2019-08-27 04:16:06 +02:00
|
|
|
*/
|
2020-11-07 06:58:20 +01:00
|
|
|
public $assigned_in_conditional_var_ids;
|
2019-08-27 04:16:06 +02:00
|
|
|
|
2019-10-17 03:55:11 +02:00
|
|
|
/** @var list<\Psalm\Internal\Clause> */
|
2019-08-27 04:54:54 +02:00
|
|
|
public $entry_clauses;
|
|
|
|
|
2019-08-27 04:16:06 +02:00
|
|
|
/**
|
|
|
|
* @param array<string, bool> $cond_referenced_var_ids
|
2020-11-07 06:58:20 +01:00
|
|
|
* @param array<string, int> $assigned_in_conditional_var_ids
|
2019-10-17 03:55:11 +02:00
|
|
|
* @param list<\Psalm\Internal\Clause> $entry_clauses
|
2019-08-27 04:16:06 +02:00
|
|
|
*/
|
|
|
|
public function __construct(
|
|
|
|
Context $if_context,
|
|
|
|
Context $original_context,
|
|
|
|
array $cond_referenced_var_ids,
|
2020-11-07 06:58:20 +01:00
|
|
|
array $assigned_in_conditional_var_ids,
|
2019-08-27 04:54:54 +02:00
|
|
|
array $entry_clauses
|
2019-08-27 04:16:06 +02:00
|
|
|
) {
|
|
|
|
$this->if_context = $if_context;
|
|
|
|
$this->original_context = $original_context;
|
|
|
|
$this->cond_referenced_var_ids = $cond_referenced_var_ids;
|
2020-11-07 06:58:20 +01:00
|
|
|
$this->assigned_in_conditional_var_ids = $assigned_in_conditional_var_ids;
|
2019-08-27 04:54:54 +02:00
|
|
|
$this->entry_clauses = $entry_clauses;
|
2019-08-27 04:16:06 +02:00
|
|
|
}
|
|
|
|
}
|