Skip to content

Commit 502b465

Browse files
committed
fix template folder for ClassCreator
1 parent 9becabf commit 502b465

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Ubiquity/scaffolding/creators/ClassCreator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ClassCreator {
1616
private string $classContent;
1717

1818
private function getTemplateDir() {
19-
return \dirname(__DIR__) . "/scaffolding/templates/";
19+
return \dirname(__DIR__) . "/templates/";
2020
}
2121

2222
public function __construct($classname,$uses,$namespace,$extendsOrImplements='',$classContent=''){
@@ -44,7 +44,7 @@ public function generate():bool{
4444
$directory = UFileSystem::getDirFromNamespace($this->namespace);
4545
UFileSystem::safeMkdir($directory);
4646
$filename = UFileSystem::cleanFilePathname($directory . \DS . $this->classname . '.php');
47-
if (! file_exists($filename)) {
47+
if (! \file_exists($filename)) {
4848
UFileSystem::openReplaceWriteFromTemplateFile($templateDir . $this->template, $filename, $variables);
4949
return true;
5050
}

0 commit comments

Comments
 (0)