Don't default return type to void

Should fix #17
This commit is contained in:
Barry vd. Heuvel
2013-05-21 18:40:07 +02:00
parent 12db549bd8
commit e20412534c
@@ -242,7 +242,7 @@ namespace {\n\tdie('Only to be used as an helper for your IDE');\n}\n\n";
$returnValue = $annotation->values[0]; $returnValue = $annotation->values[0];
} }
}else{ }else{
$returnValue = 'void'; $returnValue = null;
} }
$annotations = $method->getAnnotations(array("param")); $annotations = $method->getAnnotations(array("param"));
@@ -263,7 +263,7 @@ namespace {\n\tdie('Only to be used as an helper for your IDE');\n}\n\n";
$output .= "\t * @return static\n"; $output .= "\t * @return static\n";
}elseif(!$sublime and $alias == 'Eloquent' and in_array($method->name, array('all', 'get'))){ }elseif(!$sublime and $alias == 'Eloquent' and in_array($method->name, array('all', 'get'))){
$output .= "\t * @return array|Eloquent[]|static[]\n"; $output .= "\t * @return array|Eloquent[]|static[]\n";
}else{ }elseif($returnValue){
$output .= "\t * @return ".$returnValue."\n"; $output .= "\t * @return ".$returnValue."\n";
} }
$output .= "\t */\n\t public ".($static ? 'static' : '')." function ".$method->name."("; $output .= "\t */\n\t public ".($static ? 'static' : '')." function ".$method->name."(";