mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-19 10:33:11 +00:00
Fix sublime root
Fixed the new roots for Sublime.
This commit is contained in:
@@ -174,7 +174,7 @@ namespace {\n\tdie('Only to be used as an helper for your IDE');\n}\n\n";
|
|||||||
foreach ($methods as $method)
|
foreach ($methods as $method)
|
||||||
{
|
{
|
||||||
if(!in_array($method->name, $skipMethods)){
|
if(!in_array($method->name, $skipMethods)){
|
||||||
$output .= $this->parseMethod($method, $alias, $sublime);
|
$output .= $this->parseMethod($method, $alias, $root, $sublime);
|
||||||
$skipMethods[] = $method->name;
|
$skipMethods[] = $method->name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -196,7 +196,7 @@ namespace {\n\tdie('Only to be used as an helper for your IDE');\n}\n\n";
|
|||||||
foreach ($methods as $method)
|
foreach ($methods as $method)
|
||||||
{
|
{
|
||||||
if(!in_array($method->name, $skipMethods)){
|
if(!in_array($method->name, $skipMethods)){
|
||||||
$output .= $this->parseMethod($method, $alias, $sublime, $rootParam);
|
$output .= $this->parseMethod($method, $alias, $extraClass, $sublime, $rootParam);
|
||||||
$skipMethods[] = $method->name;
|
$skipMethods[] = $method->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ namespace {\n\tdie('Only to be used as an helper for your IDE');\n}\n\n";
|
|||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function parseMethod($method, $alias, $sublime, $rootParam = 'root'){
|
protected function parseMethod($method, $alias, $root, $sublime, $rootParam = 'root'){
|
||||||
if($method->name === '__clone'){
|
if($method->name === '__clone'){
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -297,7 +297,7 @@ namespace {\n\tdie('Only to be used as an helper for your IDE');\n}\n\n";
|
|||||||
$return = $returnValue !== "void" ? 'return' : '';
|
$return = $returnValue !== "void" ? 'return' : '';
|
||||||
|
|
||||||
if($sublime){
|
if($sublime){
|
||||||
$output .= "\t\t\$root = new $root();\r\n";
|
$output .= "\t\t\$$rootParam = new $root();\r\n";
|
||||||
$output .= "\t\t$return \$$rootParam->";
|
$output .= "\t\t$return \$$rootParam->";
|
||||||
}else{
|
}else{
|
||||||
$output .= "\t\t$return static::\$$rootParam->";
|
$output .= "\t\t$return static::\$$rootParam->";
|
||||||
|
|||||||
Reference in New Issue
Block a user