Passed
Push — master ( 2b9f55...10a196 )
by Smoren
01:52
created
src/Store/SimpleGraphRepository.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
         array $vertexes,
40 40
         array $edges
41 41
     ) {
42
-        foreach($vertexes as $vertex) {
42
+        foreach ($vertexes as $vertex) {
43 43
             $this->vertexMap[$vertex->getId()] = $vertex;
44 44
         }
45 45
 
46
-        foreach($edges as $edge) {
46
+        foreach ($edges as $edge) {
47 47
             $this->edgesMap[$edge->getId()] = $edge;
48 48
 
49 49
             NestedHelper::set(
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      */
67 67
     public function getVertexById(string $id): VertexInterface
68 68
     {
69
-        if(!isset($this->vertexMap[$id])) {
69
+        if (!isset($this->vertexMap[$id])) {
70 70
             throw new RepositoryException(
71 71
                 "vertex with id '{$id}' not exist",
72 72
                 RepositoryException::VERTEX_NOT_FOUND
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function getEdgeById(string $id): EdgeInterface
83 83
     {
84
-        if(!isset($this->edgesMap[$id])) {
84
+        if (!isset($this->edgesMap[$id])) {
85 85
             throw new RepositoryException(
86 86
                 "edge with id '{$id}' not exist",
87 87
                 RepositoryException::EDGE_NOT_FOUND
@@ -133,11 +133,11 @@  discard block
 block discarded – undo
133 133
         ?FilterConditionInterface $condition
134 134
     ): TraverseStepIteratorInterface {
135 135
         $result = [];
136
-        foreach($source[$vertex->getId()] ?? [] as $edgeId => [$edgeType, $targetId]) {
136
+        foreach ($source[$vertex->getId()] ?? [] as $edgeId => [$edgeType, $targetId]) {
137 137
             $edge = $this->getEdgeById($edgeId);
138
-            if($this->isSuitableEdge($edge, $condition)) {
138
+            if ($this->isSuitableEdge($edge, $condition)) {
139 139
                 $target = $this->getVertexById($targetId);
140
-                if($this->isSuitableVertex($target, $condition)) {
140
+                if ($this->isSuitableVertex($target, $condition)) {
141 141
                     $result[] = new TraverseStepItem($edge, $target);
142 142
                 }
143 143
             }
Please login to merge, or discard this patch.