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\Html\Dom\Helper;
use SN\DaisyDiff\Html\Dom\TagNode;
* When detecting the last common parent of two nodes, all results are stored as a LastCommonParentResult.
class LastCommonParentResult
{
/** @var TagNode */
private $parent;
/** @var bool */
private $splittingNeeded = false;
/** @var int */
private $lastCommonParentDepth = -1;
private $indexInLastCommonParent = -1;
* @return TagNode|null
public function getLastCommonParent(): ?TagNode
return $this->parent;
}
* @param TagNode $value
* @return void
public function setLastCommonParent(?TagNode $value): void
$this->parent = $value;
* @return bool
public function isSplittingNeeded(): bool
return $this->splittingNeeded;
public function setSplittingNeeded(): void
$this->splittingNeeded = true;
* @return int
public function getLastCommonParentDepth(): int
return $this->lastCommonParentDepth;
* @param int $value
public function setLastCommonParentDepth(int $value): void
$this->lastCommonParentDepth = $value;
public function getIndexInLastCommonParent(): int
return $this->indexInLastCommonParent;
public function setIndexInLastCommonParent(int $value): void
$this->indexInLastCommonParent = $value;