Completed
Push — develop ( 2af28f...95c40d )
by John
07:28
created
Alpha/Util/Graph/GraphNode.php 2 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
     /**
285 285
      * Get the node offset.
286 286
      *
287
-     * @return string
287
+     * @return integer
288 288
      *
289 289
      * @since 1.0
290 290
      */
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
     /**
461 461
      * Calculates and returns the midpoint X coordinate of the children of this node.
462 462
      *
463
-     * @return int
463
+     * @return double
464 464
      *
465 465
      * @since 1.0
466 466
      */
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
     /**
488 488
      * Add a new node to the children array of this node.
489 489
      *
490
-     * @param Alpha\Util\Graph\GraphNode $node
490
+     * @param GraphNode $node
491 491
      *
492 492
      * @throws ALpha\Exception\IllegalArguementException
493 493
      *
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -467,9 +467,9 @@  discard block
 block discarded – undo
467 467
     public function getChildrenCenter()
468 468
     {
469 469
         $node = $this->getChildAt(0);
470
-        $node1 = $this->getChildAt(count($this->children) - 1);
470
+        $node1 = $this->getChildAt(count($this->children)-1);
471 471
 
472
-        return $node->getOffset() + (($node1->getOffset() - $node->getOffset()) + $node1->getWidth()) / 2;
472
+        return $node->getOffset()+(($node1->getOffset()-$node->getOffset())+$node1->getWidth())/2;
473 473
     }
474 474
 
475 475
     /**
@@ -521,14 +521,14 @@  discard block
 block discarded – undo
521 521
      */
522 522
     public function setUpLinks()
523 523
     {
524
-        $xa = $this->x + ($this->width / 2);
525
-        $ya = $this->y + $this->height;
524
+        $xa = $this->x+($this->width/2);
525
+        $ya = $this->y+$this->height;
526 526
 
527 527
         foreach ($this->children as $child) {
528
-            $xd = $xc = $child->getX() + ($child->getWidth() / 2);
528
+            $xd = $xc = $child->getX()+($child->getWidth()/2);
529 529
             $yd = $child->getY();
530 530
             $xb = $xa;
531
-            $yb = $yc = $ya + ($yd - $ya) / 2;
531
+            $yb = $yc = $ya+($yd-$ya)/2;
532 532
             $this->links[$child->id]['xa'] = $xa;
533 533
             $this->links[$child->id]['ya'] = $ya;
534 534
             $this->links[$child->id]['xb'] = $xb;
Please login to merge, or discard this patch.