diff --git a/CHANGELOG.md b/CHANGELOG.md index f71af4451..a357239eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. ### Added - Fix phpdoc generate for custom cast with parameter [\#986 / artelkr](https://github.com/barryvdh/laravel-ide-helper/pull/986) - Created a possibility to add custom relation type [\#987 / efinder2](https://github.com/barryvdh/laravel-ide-helper/pull/987) +- Add model property types to magic where methods [\#989 / jpickwell](https://github.com/barryvdh/laravel-ide-helper/pull/989) 2020-09-07, 2.8.1 ----------------- diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 775a26dd1..19d7411c0 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -504,7 +504,7 @@ protected function getPropertiesFromTable($model) [ empty($truePropertyType) ? '$value' - : "{$truePropertyType} \$value", + : "$truePropertyType \$value", ] ); } @@ -722,8 +722,7 @@ protected function setProperty($name, $type = null, $read = null, $write = null, $this->properties[$name]['comment'] = (string) $comment; } if ($type !== null) { - $this->properties[$name]['type'] = - $this->getTruePropertyType($type, $nullable); + $this->properties[$name]['type'] = $this->getTruePropertyType($type, $nullable); } if ($read !== null) { $this->properties[$name]['read'] = $read;