File tree Expand file tree Collapse file tree 3 files changed +5
-13
lines changed
src/Structural/Composite/Html Expand file tree Collapse file tree 3 files changed +5
-13
lines changed Original file line number Diff line number Diff line change 66
77class 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
Original file line number Diff line number Diff line change 66
77abstract 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 ' );
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments