mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-19 10:33:11 +00:00
Remove namespaces
As they aren't used. If anyone does use them, let me know!
This commit is contained in:
@@ -144,24 +144,13 @@ namespace {\n\tdie('Only to be used as an helper for your IDE');\n}\n\n";
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Get the namespace from the alias.
|
|
||||||
if(strpos($alias, '\\') !== false){
|
|
||||||
$parts = explode('\\', $alias);
|
|
||||||
$alias = array_pop($parts);
|
|
||||||
$namespace = implode($parts, '\\');
|
|
||||||
}else{
|
|
||||||
$namespace = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
try{
|
try{
|
||||||
|
|
||||||
$output .= "namespace $namespace {\n";
|
|
||||||
|
|
||||||
//Some classes extend the facade
|
//Some classes extend the facade
|
||||||
if(class_exists($facade)){
|
if(class_exists($facade)){
|
||||||
$output .= " class $alias extends $facade{\n";
|
$output .= "class $alias extends $facade{\n";
|
||||||
}else{
|
}else{
|
||||||
$output .= " class $alias{\n";
|
$output .= "class $alias{\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$usedMethods = array();
|
$usedMethods = array();
|
||||||
@@ -179,7 +168,7 @@ namespace {\n\tdie('Only to be used as an helper for your IDE');\n}\n\n";
|
|||||||
$output .= $this->getMethods($this->extra[$alias], $alias, $usedMethods, false);
|
$output .= $this->getMethods($this->extra[$alias], $alias, $usedMethods, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
$output .= " }\n}\n\n";
|
$output .= "}\n\n";
|
||||||
|
|
||||||
}catch(\Exception $e){
|
}catch(\Exception $e){
|
||||||
$this->error("Exception: ".$e->getMessage()."\nCould not analyze $root.");
|
$this->error("Exception: ".$e->getMessage()."\nCould not analyze $root.");
|
||||||
|
|||||||
Reference in New Issue
Block a user