for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace HughCube\HTree;
class Index
{
/**
* @var int|string
*/
public $id;
* @var int
public $level;
public $left;
public $right;
public $parent;
* @var static[]
public $children = [];
public function __construct(array $properties)
foreach ($properties as $name => $property) {
$this->{$name} = $property;
}
public function addChild($index)
$this->children[] = $index;