File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1818 */
1919final class Project extends Node
2020{
21+ private readonly string $ directory ;
22+
2123 /**
2224 * @phpstan-ignore constructor.missingParentCall
2325 */
@@ -29,7 +31,7 @@ public function __construct(string $directory)
2931
3032 public function projectSourceDirectory (): string
3133 {
32- return $ this ->contextNode ()-> getAttribute ( ' source ' ) ;
34+ return $ this ->directory ;
3335 }
3436
3537 public function buildInformation (): BuildInformation
@@ -76,6 +78,8 @@ public function tests(): Tests
7678
7779 public function asDom (): DOMDocument
7880 {
81+ $ this ->contextNode ()->setAttribute ('source ' , $ this ->directory );
82+
7983 return $ this ->dom ();
8084 }
8185
@@ -92,8 +96,8 @@ private function init(): void
9296 );
9397 }
9498
95- private function setProjectSourceDirectory (string $ name ): void
99+ private function setProjectSourceDirectory (string $ directory ): void
96100 {
97- $ this ->contextNode ()-> setAttribute ( ' source ' , $ name ) ;
101+ $ this ->directory = $ directory ;
98102 }
99103}
You can’t perform that action at this time.
0 commit comments