Passed
Push — master ( 7d3520...28b042 )
by Sebastian
24:23 queued 16:06
created
src/Visitor/PostOrderVisitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     {
34 34
         $resultList = new ArrayList();
35 35
         if ($node !== null) {
36
-            foreach($node->getChildren() as $child) {
36
+            foreach ($node->getChildren() as $child) {
37 37
                 $resultList->merge($child->accept($this));
38 38
             }
39 39
             $resultList->append($node->getItem());
Please login to merge, or discard this patch.
src/Visitor/PreOrderVisitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         $resultList = new ArrayList();
34 34
         if ($node !== null) {
35 35
             $resultList->append($node->getItem());
36
-            foreach($node->getChildren() as $child) {
36
+            foreach ($node->getChildren() as $child) {
37 37
                 $resultList->merge($child->accept($this));
38 38
             }
39 39
         }
Please login to merge, or discard this patch.
src/Item/StringItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
     public function __toString()
49 49
     {
50
-        return (string)$this->value;
50
+        return (string) $this->value;
51 51
     }
52 52
 
53 53
     /**
Please login to merge, or discard this patch.
src/Visitor/InOrderVisitor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
     public function visit(TreeNodeInterface $node): ArrayListInterface
32 32
     {
33 33
         if (!$node instanceof BinaryNodeInterface) {
34
-            throw new InvalidArgumentException(BinaryNodeInterface::class . " expected, got " . get_class($node) . ".");
34
+            throw new InvalidArgumentException(BinaryNodeInterface::class." expected, got ".get_class($node).".");
35 35
         }
36 36
         $resultList = new ArrayList();
37 37
         if ($node !== null) {
Please login to merge, or discard this patch.
examples/generalTree.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
             ->child(5)
29 29
             ->child(6)
30 30
         ->endSubTree();
31
-echo $tree->count() . " items added to tree\n";
31
+echo $tree->count()." items added to tree\n";
32 32
 
33 33
 $rootNode = $tree->getRoot();
34 34
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     echo "no leaf node\n";
40 40
 }
41 41
 
42
-echo "2. child of root has a height of " . $rootNode->getChildren()[1]->getHeight() . "\n";
42
+echo "2. child of root has a height of ".$rootNode->getChildren()[1]->getHeight()."\n";
43 43
 
44 44
 echo "Values of level 3 nodes: ";
45 45
 foreach ($rootNode->getChildren() as $lev1) {
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         foreach ($lev1->getChildren() as $lev2) {
48 48
             if (count($lev2->getChildren()) > 0) {
49 49
                 foreach ($lev2->getChildren() as $lev3) {
50
-                    echo $lev3->getItem()->getValue() . " ";
50
+                    echo $lev3->getItem()->getValue()." ";
51 51
                 }
52 52
             }
53 53
         }
Please login to merge, or discard this patch.
examples/bst/AddressBookEntry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 
42 42
     public function getCompareValue()
43 43
     {
44
-        return $this->lastName . "," . $this->firstName;
44
+        return $this->lastName.",".$this->firstName;
45 45
     }
46 46
 
47 47
     /**
Please login to merge, or discard this patch.
examples/bst/addressBookSearch.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,8 +47,8 @@
 block discarded – undo
47 47
     echo "No entry found\n";
48 48
 } else {
49 49
     $searchResultItem = $result->getItem();
50
-    echo $searchResultItem->getLastName() . ", " . $searchResultItem->getFirstName() . "\n";
51
-    echo $searchResultItem->getAddress() . "\n";
52
-    echo "Phone No.: " . $searchResultItem->getPhoneNumber() . "\n";
50
+    echo $searchResultItem->getLastName().", ".$searchResultItem->getFirstName()."\n";
51
+    echo $searchResultItem->getAddress()."\n";
52
+    echo "Phone No.: ".$searchResultItem->getPhoneNumber()."\n";
53 53
 }
54
-echo "Time to search with $dataStructure: " . sprintf("%1.2E", $time) . "\n";
54
+echo "Time to search with $dataStructure: ".sprintf("%1.2E", $time)."\n";
Please login to merge, or discard this patch.
src/BinaryTree.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         $tmp = $node;
203 203
         $cmp = $node->getItem()->compareTo($item);
204 204
         $child = null;
205
-        switch($cmp) {
205
+        switch ($cmp) {
206 206
             case -1:
207 207
                 $child = $node->getRight();
208 208
                 break;
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
             } else { // left and right?
243 243
                 $tmp = $node->getRight(); //keep right in mind
244 244
                 $leftMostLeaf = $this->getLeftMostLeaf($tmp); // get the leftmost leaf of the right subtree
245
-                $leftMostLeaf->setLeft($node->getLeft());  // append the left subtree to the leftmost leaf of the right subtree
245
+                $leftMostLeaf->setLeft($node->getLeft()); // append the left subtree to the leftmost leaf of the right subtree
246 246
                 $node = $tmp;
247 247
             }
248 248
         }
Please login to merge, or discard this patch.
src/AVLTree.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
                 $tmp = $node->getRight(); //keep right in mind
126 126
                 $this->rebalance($node->getItem(), $tmp);
127 127
                 $leftMostLeaf = $this->getLeftMostLeaf($tmp); // get the leftmost leaf of the right subtree
128
-                $leftMostLeaf->setLeft($node->getLeft());  // append the left subtree to the leftmost leaf of the right subtree
128
+                $leftMostLeaf->setLeft($node->getLeft()); // append the left subtree to the leftmost leaf of the right subtree
129 129
                 $node = $tmp;
130 130
             }
131 131
         }
Please login to merge, or discard this patch.