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