From e8b1c367d0d7f50fa71a6ad98c35a6f486415026 Mon Sep 17 00:00:00 2001 From: "Barry vd. Heuvel" Date: Sat, 22 Jun 2013 12:56:00 +0200 Subject: [PATCH] Remove namespaces As they aren't used. If anyone does use them, let me know! --- .../LaravelIdeHelper/GeneratorCommand.php | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php b/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php index 11f6681..7a47c76 100755 --- a/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php +++ b/src/Barryvdh/LaravelIdeHelper/GeneratorCommand.php @@ -144,24 +144,13 @@ namespace {\n\tdie('Only to be used as an helper for your IDE');\n}\n\n"; continue; } - //Get the namespace from the alias. - if(strpos($alias, '\\') !== false){ - $parts = explode('\\', $alias); - $alias = array_pop($parts); - $namespace = implode($parts, '\\'); - }else{ - $namespace = ''; - } - try{ - $output .= "namespace $namespace {\n"; - //Some classes extend the facade if(class_exists($facade)){ - $output .= " class $alias extends $facade{\n"; + $output .= "class $alias extends $facade{\n"; }else{ - $output .= " class $alias{\n"; + $output .= "class $alias{\n"; } $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 .= " }\n}\n\n"; + $output .= "}\n\n"; }catch(\Exception $e){ $this->error("Exception: ".$e->getMessage()."\nCould not analyze $root.");