mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
__toString function has been DEPRECATED (#801)
* __toString function has been DEPRECATED __toString function has been DEPRECATED as of PHP 7.1.0 * remove code remove code
This commit is contained in:
@@ -455,8 +455,13 @@ class ModelsCommand extends Command
|
||||
) {
|
||||
//Use reflection to inspect the code, based on Illuminate/Support/SerializableClosure.php
|
||||
$reflection = new \ReflectionMethod($model, $method);
|
||||
|
||||
if ($returnType = $reflection->getReturnType()) {
|
||||
$type = $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string)$returnType;
|
||||
} else {
|
||||
// php 7.x type or fallback to docblock
|
||||
$type = (string) ($reflection->getReturnType() ?: $this->getReturnTypeFromDocBlock($reflection));
|
||||
$type = (string)$this->getReturnTypeFromDocBlock($reflection);
|
||||
}
|
||||
|
||||
$file = new \SplFileObject($reflection->getFileName());
|
||||
$file->seek($reflection->getStartLine() - 1);
|
||||
|
||||
Reference in New Issue
Block a user