Skip to content

Commit 1f9f789

Browse files
committed
update CodeModel
add relativePath property and getRelativePath() accessor
1 parent 84fdabe commit 1f9f789

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Templating/CodeModel.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ class CodeModel
1313
{
1414
protected string $fileName;
1515
protected string $content;
16+
protected string $relativePath;
1617

17-
public function __construct(string $fileName, string $content)
18+
public function __construct(string $fileName, string $content, string $relativePath = '')
1819
{
1920
$this->fileName = $fileName;
2021
$this->content = $content;
22+
$this->relativePath = $relativePath;
2123
}
2224

2325
public function getFileName(): string
@@ -29,4 +31,9 @@ public function getContent(): string
2931
{
3032
return $this->content;
3133
}
34+
35+
public function getRelativePath(): string
36+
{
37+
return $this->relativePath;
38+
}
3239
}

0 commit comments

Comments
 (0)