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