Completed
Push — master ( b592b0...7a2d4e )
by Siro Díaz
02:02
created
DataStructures/Lists/CircularLinkedList.php 2 patches
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -89,7 +89,6 @@  discard block
 block discarded – undo
89 89
     /**
90 90
      * Add a new node in the specified index.
91 91
      *
92
-     * @param integer $index the position.
93 92
      * @param mixed $data the data to be stored.
94 93
      */
95 94
     private function insertEnd($data) {
@@ -133,7 +132,7 @@  discard block
 block discarded – undo
133 132
     /**
134 133
      * Adds at the beginning a node in the list.
135 134
      *
136
-     * @param mixed $data
135
+     * @param integer $data
137 136
      * @return mixed the data stored.
138 137
      */
139 138
     public function unshift($data) {
@@ -186,7 +185,7 @@  discard block
 block discarded – undo
186 185
     /**
187 186
      * Generator for retrieve all nodes stored.
188 187
      * 
189
-     * @return null if the head is null (or list is empty)
188
+     * @return \Generator if the head is null (or list is empty)
190 189
      */
191 190
     public function getAll() {
192 191
         if($this->head === null) {
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 use DataStructures\Lists\Nodes\SimpleLinkedListNode as Node;
12 12
 use DataStructures\Lists\Interfaces\ListInterface;
13 13
 use OutOfBoundsException;
14
-use Iterator;
15 14
 
16 15
 /**
17 16
  * CircularLinkedList
Please login to merge, or discard this patch.
DataStructures/Lists/DoublyLinkedList.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     /**
91 91
      * Generator for retrieve all nodes stored.
92 92
      * 
93
-     * @return null if the head is null (or list is empty)
93
+     * @return \Generator if the head is null (or list is empty)
94 94
      */
95 95
     public function getAll() {
96 96
         if($this->head === null) {
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     /**
212 212
      * Adds at the beginning a node in the list.
213 213
      *
214
-     * @param mixed $data
214
+     * @param integer $data
215 215
      * @return mixed the data stored.
216 216
      */
217 217
     public function unshift($data) {
Please login to merge, or discard this patch.
DataStructures/Trees/AVLTree.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 namespace DataStructures\Trees;
10 10
 
11 11
 use DataStructures\Trees\Interfaces\TreeInterface;
12
-use DataStructures\Trees\Nodes\AVLNode as Node;
13 12
 
14 13
 /**
15 14
  * AVLTree
Please login to merge, or discard this patch.
DataStructures/Trees/BinarySearchTree.php 1 patch
Doc Comments   +5 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,8 +74,8 @@  discard block
 block discarded – undo
74 74
     /**
75 75
      * Creates a new node or updates it if already exists.
76 76
      *
77
-     * @param int|string $key the key.
78
-     * @param mixed $data the data to be stored. 
77
+     * @param integer $key the key.
78
+     * @param string $data the data to be stored. 
79 79
      */
80 80
     public function putOrUpdate($key, $data) {
81 81
         $this->put($key, $data, true);
@@ -85,7 +85,8 @@  discard block
 block discarded – undo
85 85
      * Deletes the node with the maximum key and returns it. The most right and more bottom.
86 86
      * 
87 87
      * @param DataStructures\Trees\Nodes\BSTNode|null if null takes the root.
88
-     * @return DataStructures\Trees\Nodes\BSTNode|null the maximum node or
88
+     * @param integer $key
89
+     * @return BinaryNodeInterface|null the maximum node or
89 90
      *  null if the tree is empty.
90 91
      */
91 92
     public function delete($key) {
@@ -103,7 +104,7 @@  discard block
 block discarded – undo
103 104
      * that replaces the deleted node. Also decrease the size of tree.
104 105
      *
105 106
      * @param DataStructures\Trees\Nodes\BSTNode|null The node to be deleted.
106
-     * @return the node that replaces the deleted.
107
+     * @return DataStructures\Trees\Nodes\BSTNode|null node that replaces the deleted.
107 108
      */
108 109
     protected function _delete(BinaryNodeInterface &$node) {
109 110
         if($node !== null) {
Please login to merge, or discard this patch.
DataStructures/Trees/BinaryTreeAbstract.php 1 patch
Doc Comments   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     /**
34 34
      * Retrieve the data stored in the tree.
35 35
      *
36
-     * @param int|string $key the key to identify the data.
36
+     * @param integer $key the key to identify the data.
37 37
      * @return mixed
38 38
      */
39 39
     public function get($key){
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     /**
68 68
      * Looks for the node with the given key.
69 69
      *
70
-     * @param int|string $key the key used to look for.
70
+     * @param string $key the key used to look for.
71 71
      * @return bool true if was found.
72 72
      */
73 73
     public function exists($key){
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     /**
170 170
      * Returns the minimum node from a given node in position X.
171 171
      *
172
-     * @param DataStructures\Trees\Nodes\BSTNode $node the start point.
172
+     * @param BinaryNodeInterface $node the start point.
173 173
      * @return DataStructures\Trees\Nodes\BSTNode|null the minimum node.
174 174
      */
175 175
     private function getMinNode(BinaryNodeInterface $node = null) {
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
     /**
188 188
      * Returns the maximum node from a given node in position X.
189 189
      *
190
-     * @param DataStructures\Trees\Nodes\BSTNode $node the start point.
190
+     * @param BinaryNodeInterface $node the start point.
191 191
      * @return DataStructures\Trees\Nodes\BSTNode|null the maximum node.
192 192
      */
193 193
     private function getMaxNode(BinaryNodeInterface $node = null) {
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
      * Deletes the node with the minimum key and returns it. The most left and more bottom.
207 207
      * 
208 208
      * @param DataStructures\Trees\Nodes\BSTNode|null if null takes the root.
209
-     * @return DataStructures\Trees\Nodes\BSTNode|null the minimum node or
209
+     * @return BinaryNodeInterface|null the minimum node or
210 210
      *  null if the tree is empty.
211 211
      */
212 212
     public function deleteMin(BinaryNodeInterface $node = null) {
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
      * Deletes the node with the maximum key and returns it. The most right and more bottom.
223 223
      * 
224 224
      * @param DataStructures\Trees\Nodes\BSTNode|null if null takes the root.
225
-     * @return DataStructures\Trees\Nodes\BSTNode|null the maximum node or
225
+     * @return BinaryNodeInterface|null the maximum node or
226 226
      *  null if the tree is empty.
227 227
      */
228 228
     public function deleteMax(BinaryNodeInterface $node = null) {
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
      * Returns true if is leaf the node.
304 304
      *
305 305
      * @param DataStructures\Trees\Nodes\BSTNode|null $node default to null.
306
-     * @return true if is leaf the node, is not null and their subtrees has no
306
+     * @return boolean if is leaf the node, is not null and their subtrees has no
307 307
      *  pointers to successors.
308 308
      */
309 309
     public function isLeaf($node) { // BinaryTreeNode
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
      * also are called a root node.
316 316
      *
317 317
      * @param DataStructures\Trees\Nodes\BSTNode|null $node default to null.
318
-     * @return true if is root the node, is not null and their subtrees has no
318
+     * @return boolean if is root the node, is not null and their subtrees has no
319 319
      *  pointers to successors.
320 320
      */
321 321
     public function isRoot($node) {
Please login to merge, or discard this patch.