Skip to content

Commit 5f361a2

Browse files
committed
removed dogano/php-util dependency
1 parent 867e156 commit 5f361a2

File tree

5 files changed

+3
-31
lines changed

5 files changed

+3
-31
lines changed

composer.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,5 @@
1616
},
1717
"require-dev": {
1818
"phpunit/phpunit": "6.5"
19-
},
20-
"require": {
21-
"doganoo/php-util": "0.0.1"
2219
}
2320
}

src/Common/Abstracts/AbstractGraphSearch.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828

2929
use doganoo\PHPAlgorithms\Datastructure\Graph\Graph\Node;
3030
use doganoo\PHPAlgorithms\Datastructure\Lists\ArrayLists\ArrayList;
31-
use doganoo\PHPUtil\Log\Logger;
3231

3332
/**
3433
* Class AbstractTraverse
@@ -44,7 +43,7 @@ abstract class AbstractGraphSearch {
4443
public function __construct() {
4544
$this->visited = new ArrayList();
4645
$this->callable = function ($value) {
47-
Logger::debug($value);
46+
echo $value;
4847
};
4948
}
5049

@@ -62,7 +61,7 @@ public function visit($value) {
6261
if (null === $this->callable
6362
&& !\is_callable($this->callable)) {
6463
$callable = function ($otherValue) {
65-
Logger::debug($otherValue);
64+
echo $otherValue;
6665
};
6766
}
6867
$callable($value);

src/Common/Abstracts/AbstractTraverse.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828

2929
use doganoo\PHPAlgorithms\Common\Interfaces\IBinaryNode;
30-
use doganoo\PHPUtil\Log\Logger;
3130

3231
/**
3332
* Class AbstractTraverse
@@ -57,7 +56,7 @@ public function visit($value) {
5756
if (null === $this->callable
5857
&& !\is_callable($this->callable)) {
5958
$callable = function ($otherValue) {
60-
Logger::debug($otherValue);
59+
echo $otherValue;
6160
};
6261
}
6362
$callable($value);

src/Datastructure/Graph/Tree/Heap/MaxHeap.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
namespace doganoo\PHPAlgorithms\Datastructure\Graph\Tree\Heap;
2727

2828
use doganoo\PHPAlgorithms\Common\Util\Comparator;
29-
use doganoo\PHPUtil\Log\Logger;
3029

3130
/**
3231
* Class MaxHeap
@@ -63,16 +62,6 @@ public function clear(): bool {
6362
return \count($this->heap) === 1 && $this->heap[0] == \PHP_INT_MIN;
6463
}
6564

66-
/**
67-
* displays the heap
68-
*/
69-
public function display() {
70-
for ($i = 1; $i <= $this->length() / 2; $i++) {
71-
$string = "Parent Node: " . $this->heap[$i] . " Left Child: " . $this->heap[2 * $i] . " Right Child: " . $this->heap[2 * $i + 1];
72-
Logger::debug($string);
73-
}
74-
}
75-
7665
/**
7766
* returns the number of elements in the heap
7867
*

src/Datastructure/Graph/Tree/Heap/MinHeap.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
namespace doganoo\PHPAlgorithms\Datastructure\Graph\Tree\Heap;
2727

2828
use doganoo\PHPAlgorithms\Common\Util\Comparator;
29-
use doganoo\PHPUtil\Log\Logger;
30-
3129

3230
/**
3331
* Class MinHeap
@@ -64,16 +62,6 @@ public function clear(): bool {
6462
return \count($this->heap) === 1 && $this->heap[0] === \PHP_INT_MIN;
6563
}
6664

67-
/**
68-
* displays the heap
69-
*/
70-
public function display() {
71-
for ($i = 1; $i <= $this->length() / 2; $i++) {
72-
$string = "Parent Node: " . $this->heap[$i] . " Left Child: " . $this->heap[2 * $i] . " Right Child: " . $this->heap[2 * $i + 1];
73-
Logger::debug($string);
74-
}
75-
}
76-
7765
/**
7866
* returns the number of elements in the heap
7967
*

0 commit comments

Comments
 (0)