for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the bisarca/graph package.
*
* (c) Emanuele Minotto <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Bisarca\Graph\Vertex;
/**
* ...
trait SetTrait
{
abstract public function getVertexSet(): Set;
* Sets the contained vertices.
* @param VertexInterface[] $vertices
public function setVertices(VertexInterface ...$vertices)
$this
->getVertexSet()
->set(...$vertices);
}
* Adds some vertices.
public function addVertices(VertexInterface ...$vertices)
->add(...$vertices);
* Checks if all the vertices are contained.
* @return bool
public function hasVertices(VertexInterface ...$vertices): bool
return $this
->has(...$vertices);
* Removes some vertices.
public function removeVertices(VertexInterface ...$vertices)
->remove(...$vertices);
* Remove all contained elements.
public function clearVertices()
->clear();
* Checks if no elements are contained.
public function isEmptyVertices(): bool
->isEmpty();
* {@inheritdoc}
public function countVertices(): int
->count();