| 1 |
<?php declare(strict_types=1); |
| 2 |
|
| 3 |
namespace PhpParser\Internal; |
| 4 |
|
| 5 |
/** |
| 6 |
* @internal |
| 7 |
*/ |
| 8 |
class DiffElem { |
| 9 |
public const TYPE_KEEP = 0; |
| 10 |
public const TYPE_REMOVE = 1; |
| 11 |
public const TYPE_ADD = 2; |
| 12 |
public const TYPE_REPLACE = 3; |
| 13 |
|
| 14 |
/** @var int One of the TYPE_* constants */ |
| 15 |
public int $type; |
| 16 |
/** @var mixed Is null for add operations */ |
| 17 |
public $old; |
| 18 |
/** @var mixed Is null for remove operations */ |
| 19 |
public $new; |
| 20 |
|
| 21 |
/** |
| 22 |
* @param int $type One of the TYPE_* constants |
| 23 |
* @param mixed $old Is null for add operations |
| 24 |
* @param mixed $new Is null for remove operations |
| 25 |
*/ |
| 26 |
public function __construct(int $type, $old, $new) { |
| 27 |
$this->type = $type; |
| 28 |
$this->old = $old; |
| 29 |
$this->new = $new; |
| 30 |
} |
| 31 |
} |