mirror of
https://github.com/nikic/PHP-Parser.git
synced 2025-01-17 15:18:17 +01:00
dd63ddbc24
The formatting in this project has become something of a mess, because it changed over time. Add a CS fixer config and reformat to the desired style, which is PSR-12, but with sane brace placement.
27 lines
584 B
PHP
27 lines
584 B
PHP
<?php declare(strict_types=1);
|
|
|
|
namespace PhpParser\Internal;
|
|
|
|
/**
|
|
* @internal
|
|
*/
|
|
class DiffElem {
|
|
public const TYPE_KEEP = 0;
|
|
public const TYPE_REMOVE = 1;
|
|
public const TYPE_ADD = 2;
|
|
public const TYPE_REPLACE = 3;
|
|
|
|
/** @var int One of the TYPE_* constants */
|
|
public $type;
|
|
/** @var mixed Is null for add operations */
|
|
public $old;
|
|
/** @var mixed Is null for remove operations */
|
|
public $new;
|
|
|
|
public function __construct(int $type, $old, $new) {
|
|
$this->type = $type;
|
|
$this->old = $old;
|
|
$this->new = $new;
|
|
}
|
|
}
|