Skip to content

Commit b990f4b

Browse files
committed
Update CmdTrait.php
1 parent 2a142e8 commit b990f4b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/Ubiquity/devtools/cmd/traits/CmdTrait.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,10 @@ protected static function answerModel($options, $option, $longOption, $part, $co
110110
}
111111

112112
protected static function getCompleteClassname($config, $classname, $type = 'models') {
113-
$prefix = $config["mvcNS"][$type] ?? null;
113+
$prefix = Startup::getNS($type);
114114
$classname = \ltrim($classname, "\\");
115-
if (isset($prefix)) {
116-
if (! UString::startswith($classname, $prefix)) {
117-
$classname = $prefix . "\\" . $classname;
118-
}
115+
if (! UString::startswith($classname, $prefix)) {
116+
$classname = $prefix . $classname;
119117
}
120118
return str_replace("\\\\", "\\", $classname);
121119
}

0 commit comments

Comments
 (0)