mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Move helpers to root
To get them in the namespace.
This commit is contained in:
@@ -193,23 +193,25 @@ class GeneratorCommand extends Command {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach ($output as $ns => $body){
|
||||
if ($ns == '__root') $ns = '';
|
||||
$outputString .= "namespace $ns{\n";
|
||||
$outputString .= $body;
|
||||
$outputString .= "}\n\n";
|
||||
}
|
||||
|
||||
|
||||
//Include the helper file, if requested
|
||||
if(!empty($this->helpers)){
|
||||
foreach($this->helpers as $helper){
|
||||
if (file_exists($helper)){
|
||||
$outputString .= str_replace(array('<?php', '?>'), '', \File::get($helper));
|
||||
$output['__root'] .= str_replace(array('<?php', '?>'), '', \File::get($helper));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($output as $ns => $body){
|
||||
if ($ns == '__root'){
|
||||
$ns = '';
|
||||
}
|
||||
$outputString .= "namespace $ns{\n";
|
||||
$outputString .= $body;
|
||||
$outputString .= "}\n\n";
|
||||
}
|
||||
|
||||
return $outputString;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user