@@ -45,11 +45,11 @@ discard block |
||
| 45 | 45 | array $vertexes, |
| 46 | 46 | array $edges |
| 47 | 47 | ) { |
| 48 | - foreach($vertexes as $vertex) { |
|
| 48 | + foreach ($vertexes as $vertex) { |
|
| 49 | 49 | $this->vertexMap[$vertex->getId()] = $vertex; |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | - foreach($edges as $edge) { |
|
| 52 | + foreach ($edges as $edge) { |
|
| 53 | 53 | $this->edgesMap[$edge->getId()] = $edge; |
| 54 | 54 | |
| 55 | 55 | NestedAccess::set( |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | */ |
| 73 | 73 | public function getVertexById(string $id): VertexInterface |
| 74 | 74 | { |
| 75 | - if(!isset($this->vertexMap[$id])) { |
|
| 75 | + if (!isset($this->vertexMap[$id])) { |
|
| 76 | 76 | throw new RepositoryException( |
| 77 | 77 | "vertex with id '{$id}' not exist", |
| 78 | 78 | RepositoryException::VERTEX_NOT_FOUND |
@@ -87,7 +87,7 @@ discard block |
||
| 87 | 87 | */ |
| 88 | 88 | public function getEdgeById(string $id): EdgeInterface |
| 89 | 89 | { |
| 90 | - if(!isset($this->edgesMap[$id])) { |
|
| 90 | + if (!isset($this->edgesMap[$id])) { |
|
| 91 | 91 | throw new RepositoryException( |
| 92 | 92 | "edge with id '{$id}' not exist", |
| 93 | 93 | RepositoryException::EDGE_NOT_FOUND |
@@ -140,11 +140,11 @@ discard block |
||
| 140 | 140 | ?FilterConditionInterface $condition |
| 141 | 141 | ): TraverseStepIteratorInterface { |
| 142 | 142 | $result = []; |
| 143 | - foreach($source[$vertex->getId()] ?? [] as $edgeId => [$edgeType, $targetId]) { |
|
| 143 | + foreach ($source[$vertex->getId()] ?? [] as $edgeId => [$edgeType, $targetId]) { |
|
| 144 | 144 | $edge = $this->getEdgeById($edgeId); |
| 145 | - if($this->isSuitableEdge($edge, $condition)) { |
|
| 145 | + if ($this->isSuitableEdge($edge, $condition)) { |
|
| 146 | 146 | $target = $this->getVertexById($targetId); |
| 147 | - if($this->isSuitableVertex($target, $condition)) { |
|
| 147 | + if ($this->isSuitableVertex($target, $condition)) { |
|
| 148 | 148 | $result[] = new TraverseStepItem($edge, $target); |
| 149 | 149 | } |
| 150 | 150 | } |