Fix php 7.3 bug (#772)

This commit is contained in:
neoteknic
2019-03-02 15:15:16 +01:00
committed by Barry vd. Heuvel
parent 0fad511954
commit 881f77156c
+1 -1
View File
@@ -453,7 +453,7 @@ class ModelsCommand extends Command
//Use reflection to inspect the code, based on Illuminate/Support/SerializableClosure.php
$reflection = new \ReflectionMethod($model, $method);
// php 7.x type or fallback to docblock
$type = (string) $reflection->getReturnType() ?: $this->getReturnTypeFromDocBlock($reflection);
$type = (string) $reflection->getReturnType() ?: (string)$this->getReturnTypeFromDocBlock($reflection);
$file = new \SplFileObject($reflection->getFileName());
$file->seek($reflection->getStartLine() - 1);