class DiffElem
Same name in this branch
- 11.1.x vendor/nikic/php-parser/lib/PhpParser/Internal/DiffElem.php \PhpParser\Internal\DiffElem
Inspired by https://github.com/nikic/PHP-Parser/tree/36a6dcd04e7b0285e8f0868f44bd49…
Copyright (c) 2011, Nikita Popov All rights reserved.
Implements the Myers diff algorithm.
@internal
Hierarchy
- class \PHPStan\PhpDocParser\Printer\DiffElem
Expanded class hierarchy of DiffElem
File
-
vendor/
phpstan/ phpdoc-parser/ src/ Printer/ DiffElem.php, line 15
Namespace
PHPStan\PhpDocParser\PrinterView source
class DiffElem {
public const TYPE_KEEP = 0;
public const TYPE_REMOVE = 1;
public const TYPE_ADD = 2;
public const TYPE_REPLACE = 3;
/** @var self::TYPE_* */
public $type;
/** @var mixed Is null for add operations */
public $old;
/** @var mixed Is null for remove operations */
public $new;
/**
* @param self::TYPE_* $type
* @param mixed $old Is null for add operations
* @param mixed $new Is null for remove operations
*/
public function __construct(int $type, $old, $new) {
$this->type = $type;
$this->old = $old;
$this->new = $new;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
DiffElem::$new | public | property | @var mixed Is null for remove operations |
DiffElem::$old | public | property | @var mixed Is null for add operations |
DiffElem::$type | public | property | @var self::TYPE_* |
DiffElem::TYPE_ADD | public | constant | |
DiffElem::TYPE_KEEP | public | constant | |
DiffElem::TYPE_REMOVE | public | constant | |
DiffElem::TYPE_REPLACE | public | constant | |
DiffElem::__construct | public | function | * |