-
-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update view generators/crud/default/controller
#469
base: master
Are you sure you want to change the base?
Conversation
Fix return type in PhpDoc Add Php 7 features (optional) Use `Yii::createObject()` instead `new className()`
@@ -184,10 +190,11 @@ protected function findModel(<?= $actionParams ?>) | |||
} | |||
$condition = '[' . implode(', ', $condition) . ']'; | |||
?> | |||
if (($model = <?= $modelClass ?>::findOne(<?= $condition ?>)) !== null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was OK as is. No need for change here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@samdark it's less readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's not. That's more of personal preferences. I'd not change it for that reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than that, you've changed early return to late return complicating the code a bit. With this assign in condition I agree.
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Fix return type in PhpDoc
Add Php 7 features (optional)