Skip to content

Commit

Permalink
Remove unsed methods. (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Jan 12, 2024
1 parent cf7c132 commit b3ae8b4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
17 changes: 0 additions & 17 deletions src/Attribute/Custom/HasContainer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use PHPForge\Html\Helper\CssClass;
use PHPForge\Html\Tag;

use function array_key_exists;
use function implode;

/**
Expand Down Expand Up @@ -87,22 +86,6 @@ public function containerTag(string $value): static
return $new;
}

/**
* Get the container id.
*
* @return string The container id.
*/
public function getContainerId(): string|null
{
$id = null;

if (array_key_exists('id', $this->containerAttributes) && is_string($this->containerAttributes['id'])) {
$id = $this->containerAttributes['id'];
}

return $id;
}

protected function renderContainerTag(string|null $id, string ...$content): string
{
return match ($this->container) {
Expand Down
13 changes: 0 additions & 13 deletions tests/Attribute/Custom/HasContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,6 @@ public function testException(): void
$instance->containerTag('');
}

public function testContainerGetId(): void
{
$instance = new class () {
use HasContainer;
};

$this->assertNull($instance->getContainerId());

$instance = $instance->containerAttributes(['id' => 'id']);

$this->assertSame('id', $instance->getContainerId());
}

public function testImmutability(): void
{
$instance = new class () {
Expand Down

0 comments on commit b3ae8b4

Please sign in to comment.