Skip to content

Commit f4369a4

Browse files
committed
remove unnecessary code
1 parent dd2d489 commit f4369a4

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

src/Structural/Composite/Html/Tag.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
class Tag extends TagComponent
88
{
9-
public function __construct(
10-
private string $name,
11-
private ?string $content = null
12-
) {
13-
parent::__construct($name, $content);
9+
private string $name;
10+
11+
public function __construct(string $name, private ?string $content = null)
12+
{
13+
$this->name = $name;
1414
}
1515

1616
public function display(): void

src/Structural/Composite/Html/TagComponent.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@
66

77
abstract class TagComponent
88
{
9-
private string $name;
10-
11-
public function __construct(string $name)
12-
{
13-
$this->name = $name;
14-
}
15-
169
public function add(TagComponent $tagComponent): void
1710
{
1811
throw new \BadMethodCallException('Method not implemented');

src/Structural/Composite/Html/TagComposite.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ class TagComposite extends TagComponent
1212

1313
public function __construct(private string $name)
1414
{
15-
parent::__construct($name);
1615
$this->components = new SplObjectStorage();
1716
}
1817

0 commit comments

Comments
 (0)