mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 10:07:12 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e9cbd7e732 | ||
|
|
ac6740f59f | ||
|
|
60ec740b15 |
+4
-4
@@ -11,11 +11,11 @@
|
|||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.3.0",
|
"php": ">=5.3.0",
|
||||||
"illuminate/support": "4.0.x",
|
"illuminate/support": "4.x",
|
||||||
"illuminate/console": "4.0.x",
|
"illuminate/console": "4.x",
|
||||||
"illuminate/filesystem": "4.0.x",
|
"illuminate/filesystem": "4.x",
|
||||||
"barryvdh/reflection-docblock": ">=2.0.1",
|
"barryvdh/reflection-docblock": ">=2.0.1",
|
||||||
"symfony/class-loader": "2.3.*"
|
"symfony/class-loader": "~2.3"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-0": {
|
"psr-0": {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ If you don't want to generate it, you can add a pre-generated file to the root f
|
|||||||
|
|
||||||
* Generated version: https://gist.github.com/barryvdh/5227822
|
* Generated version: https://gist.github.com/barryvdh/5227822
|
||||||
|
|
||||||
Note: You do need CodeIntel for Sublime Text: https://github.com/Kronuz/SublimeCodeIntel
|
Note: You do need CodeIntel for Sublime Text: https://github.com/SublimeCodeIntel/SublimeCodeIntel
|
||||||
|
|
||||||
### Automatic phpDoc generation for Laravel Facades
|
### Automatic phpDoc generation for Laravel Facades
|
||||||
|
|
||||||
|
|||||||
@@ -314,29 +314,17 @@ exit('Only to be used as an helper for your IDE');\n\n";
|
|||||||
$output .= "){\r\n";
|
$output .= "){\r\n";
|
||||||
|
|
||||||
//Only return when not a constructor and not void.
|
//Only return when not a constructor and not void.
|
||||||
$return = ($returnValue && $returnValue !== "void" && $method->name !== "__construct") ? 'return ' : '';
|
$return = ($returnValue && $returnValue !== "void" && $method->name !== "__construct") ? 'return' : '';
|
||||||
|
|
||||||
//Reference the 'real' function in the declaringclass
|
//Reference the 'real' function in the declaringclass
|
||||||
$declaringClass = $method->getDeclaringClass();
|
$declaringClass = $method->getDeclaringClass();
|
||||||
if($declaringClass->isAbstract()){
|
$root = $class->getName();
|
||||||
$declaringClass = $class;
|
|
||||||
|
if($declaringClass->name != $root){
|
||||||
|
$output .= "\t\t//Method inherited from $declaringClass->name\r\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$constructor = $declaringClass->getConstructor();
|
$output .= "\t\t$return $root::";
|
||||||
$root = $declaringClass->getName();
|
|
||||||
|
|
||||||
|
|
||||||
$output .= "\t\t\$root = new \\$root(";
|
|
||||||
if(!is_null($constructor)){
|
|
||||||
$constructorParams = array();
|
|
||||||
for($i=0;$i<$constructor->getNumberOfRequiredParameters();$i++){
|
|
||||||
$constructorParams[] = 'null';
|
|
||||||
}
|
|
||||||
$output .= implode($constructorParams, ',');
|
|
||||||
}
|
|
||||||
$output .= ");\n";
|
|
||||||
|
|
||||||
$output .= "\t\t$return\$root->";
|
|
||||||
|
|
||||||
//Write the default parameters in the function call
|
//Write the default parameters in the function call
|
||||||
$output .= $method->name."(".implode($params, ", ").");\r\n";
|
$output .= $method->name."(".implode($params, ", ").");\r\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user