Skip to content

Commit

Permalink
style: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
xiCO2k committed Jun 27, 2023
1 parent 3d178fa commit daf32d0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
18 changes: 13 additions & 5 deletions playground.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@
use function Termwind\render;

render(<<<'HTML'
<div class="mx-2 my-1">
<div class="flex space-x-1">
<span class="flex-1 truncate">Lorem ipsum dolor, sit amet consectetur adipisicing elit. Sunt illo et nisi omnis porro at, mollitia harum quas esse, aperiam dolorem ab recusandae fugiat nesciunt doloribus rem eaque nostrum itaque.</span>
<span class="text-green">DONE</span>
</div>
<div class="ml-2">
<pre>
─ ─ ─ ─
│ │ │ │ │ │ │ │
│ │ ──, │ │ ──, │ │ │ │ ─
│/ \ / │ │ │ │/ / │ │/ \─│/ │/
│ │─/\─/│─/ \─/│─/│──/\─/│─/\─/ │──/│──/
</pre>
<div class="px-1 bg-green-300 text-black">by ⚙️ Configured</div>
<div class="px-1 mt-1 bg-blue-300 text-black">{{ $version }}</div>
<em class="ml-1">
Create portable PHP CLI applications w/ PHP Micro
</em>
</div>
HTML);
10 changes: 5 additions & 5 deletions src/ValueObjects/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function getValue(): string
public function getChildNodes(): Generator
{
foreach ($this->node->childNodes as $node) {
yield new static($node);
yield new self($node);
}
}

Expand Down Expand Up @@ -106,7 +106,7 @@ public function getPreviousSibling(): static|null
$node = $this->node;

while ($node = $node->previousSibling) {
$node = new static($node);
$node = new self($node);

if ($node->isEmpty()) {
$node = $node->node;
Expand All @@ -121,7 +121,7 @@ public function getPreviousSibling(): static|null
$node = $node->node;
}

return is_null($node) ? null : new static($node);
return is_null($node) ? null : new self($node);
}

/**
Expand All @@ -132,7 +132,7 @@ public function getNextSibling(): static|null
$node = $this->node;

while ($node = $node->nextSibling) {
$node = new static($node);
$node = new self($node);

if ($node->isEmpty()) {
$node = $node->node;
Expand All @@ -147,7 +147,7 @@ public function getNextSibling(): static|null
$node = $node->node;
}

return is_null($node) ? null : new static($node);
return is_null($node) ? null : new self($node);
}

/**
Expand Down

0 comments on commit daf32d0

Please sign in to comment.