Skip to content

Commit 8bebb1b

Browse files
committed
Fix code style
1 parent ec82f2a commit 8bebb1b

File tree

6 files changed

+16
-4
lines changed

6 files changed

+16
-4
lines changed

src/Interval/DateTimeInterval.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace Danon\IntervalTree\Interval;
56

67
use DateTimeInterface;
78
use InvalidArgumentException;
9+
810
use function count;
911

1012
final class DateTimeInterval implements IntervalInterface

src/Interval/IntervalInterface.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace Danon\IntervalTree\Interval;

src/Interval/NumericInterval.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace Danon\IntervalTree\Interval;
56

67
use InvalidArgumentException;
8+
79
use function count;
810

911
final class NumericInterval implements IntervalInterface
@@ -19,7 +21,7 @@ final class NumericInterval implements IntervalInterface
1921
private $high;
2022

2123
/**
22-
* IntegerInterval constructor
24+
* NumericInterval constructor
2325
* @param int|float $low
2426
* @param int|float $high
2527
*/

src/IntervalTree.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace Danon\IntervalTree;
@@ -167,8 +168,10 @@ private function treeInsert(Node $insertNode): void
167168
}
168169

169170
/**
170-
* After insertion insert_node may have red-colored parent, and this is a single possible violation
171+
* After insertion insert_node may have red-colored parent
172+
* And this is a single possible violation
171173
* Go upwards to the root and re-color until violation will be resolved
174+
*
172175
* @param Node $insertNode
173176
*/
174177
private function insertFixup(Node $insertNode): void
@@ -259,9 +262,11 @@ private function treeDelete(Node $deleteNode): void
259262
private function deleteFixup(Node $fixNode): void
260263
{
261264
$currentNode = $fixNode;
262-
while ($currentNode !== $this->root
265+
while (
266+
$currentNode !== $this->root
263267
&& $currentNode->getParent() !== null
264-
&& $currentNode->getColor()->isBlack()) {
268+
&& $currentNode->getColor()->isBlack()
269+
) {
265270
if ($currentNode === $currentNode->getParent()->getLeft()) {
266271
$brotherNode = $currentNode->getParent()->getRight();
267272
if ($brotherNode->getColor()->isRed()) {

src/NodeColor.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace Danon\IntervalTree;

src/Pair.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
declare(strict_types=1);
34

45
namespace Danon\IntervalTree;

0 commit comments

Comments
 (0)