for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* (c) Steve Nebes <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace SN\DaisyDiff\RangeDifferencer;
* Singly Linked RangeDifference
class LinkedRangeDifference extends RangeDifference
{
/** @const int */
const INSERT = 0;
const DELETE = 1;
/** @var LinkedRangeDifference|null */
private $next;
* @param LinkedRangeDifference|null $next
* @param int $operation
public function __construct(?LinkedRangeDifference $next = null, int $operation = RangeDifference::ERROR)
parent::__construct($operation);
$this->next = $next;
}
* @return LinkedRangeDifference|null
public function getNext(): ?LinkedRangeDifference
return $this->next;
public function setNext(?LinkedRangeDifference $next): void
* @return bool
public function isDelete(): bool
return $this->getKind() === self::DELETE;
public function isInsert(): bool
return $this->getKind() === self::INSERT;