mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Extend the facade class
Fixes Issue #1 Only extended when it is not the same as the root class (because of overriding static methods)
This commit is contained in:
@@ -139,7 +139,12 @@ class GeneratorCommand extends Command {
|
|||||||
if($sublime){
|
if($sublime){
|
||||||
$output .= " class $alias extends \\$root{\n";
|
$output .= " class $alias extends \\$root{\n";
|
||||||
}else{
|
}else{
|
||||||
$output .= " class $alias{\n";
|
//If the root class is not the same as the facade extend it.
|
||||||
|
if($root !== $facade){
|
||||||
|
$output .= " class $alias extends $facade{\n";
|
||||||
|
}else{
|
||||||
|
$output .= " class $alias{\n";
|
||||||
|
}
|
||||||
$output .= "\t/**\n\t * @var \\$root \$root\n\t */\n\t static private \$root;\n\n";
|
$output .= "\t/**\n\t * @var \\$root \$root\n\t */\n\t static private \$root;\n\n";
|
||||||
}
|
}
|
||||||
$methods = $d->getMethods();
|
$methods = $d->getMethods();
|
||||||
|
|||||||
Reference in New Issue
Block a user