@@ -82,7 +82,7 @@ public function createVertex($id = NULL, $returnDuplicate = false)
8282 return $ this ->vertices ->getVertexId ($ id );
8383 }
8484
85- return new Vertex ($ id , $ this );
85+ return new Vertex ($ this , $ id );
8686 }
8787
8888 /**
@@ -98,7 +98,7 @@ public function createVertexClone(Vertex $originalVertex)
9898 if ($ this ->vertices ->hasVertexId ($ id )) {
9999 throw new RuntimeException ('Id of cloned vertex already exists ' );
100100 }
101- $ newVertex = new Vertex ($ id , $ this );
101+ $ newVertex = new Vertex ($ this , $ id );
102102 // TODO: properly set attributes of vertex
103103 $ newVertex ->setLayout ($ originalVertex ->getLayout ());
104104 $ newVertex ->setBalance ($ originalVertex ->getBalance ());
@@ -256,7 +256,7 @@ public function createVertices($n)
256256 $ vertices = array ();
257257 if (is_int ($ n ) && $ n >= 0 ) {
258258 for ($ id = $ this ->getNextId (), $ n += $ id ; $ id < $ n ; ++$ id ) {
259- $ vertices [$ id ] = new Vertex ($ id , $ this );
259+ $ vertices [$ id ] = new Vertex ($ this , $ id );
260260 }
261261 } elseif (is_array ($ n )) {
262262 // array given => check to make sure all given IDs are available (atomic operation)
@@ -275,7 +275,7 @@ public function createVertices($n)
275275
276276 // actually create all requested vertices
277277 foreach ($ n as $ id ) {
278- $ vertices [$ id ] = new Vertex ($ id , $ this );
278+ $ vertices [$ id ] = new Vertex ($ this , $ id );
279279 }
280280 } else {
281281 throw new InvalidArgumentException ('Invalid number of vertices given. Must be non-negative integer or an array of Vertex IDs ' );
0 commit comments