Skip to content

Commit fc22620

Browse files
linawolfjaapio
authored andcommitted
[TASK] add hasCurrentFileName to RenderContext
Right now I have to try querrying getCurrentFileName and then catch the Exception. I would like to know if there is one
1 parent f90995f commit fc22620

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/guides/src/RenderContext.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ public function getDirName(): string
142142

143143
return $dirname;
144144
}
145+
146+
public function hasCurrentFileName(): bool
147+
{
148+
return $this->currentFileName !== null;
149+
}
145150

146151
public function getCurrentFileName(): string
147152
{

0 commit comments

Comments
 (0)