for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
namespace Everlution\Navigation;
/**
* Interface Navigation.
* @author Ivan Barlog <[email protected]>
*/
class RootNavigationItem implements Item
{
* @return string
public function getLabel(): string
return 'navigation root';
}
/** @var Item[] */
private $children;
/** @var array */
private $attributes;
* @return array
public function getChildren(): array
return $this->children;
public function getAttributes(): array
return $this->attributes;
* @param Item $item
* @return Item
public function addChild(Item $item)
$this->children[] = $item;
return $this;
* @param Item $parent
* @throws \Exception
public function setParent(Item $parent)
throw new \Exception(sprintf('%s cannot have parent', self::class));
* @return Item|null
public function getParent()
return null;