Skip to content
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

Fix: isEmpty() return true if it's empty #332

Merged
merged 11 commits into from
Oct 12, 2016
9 changes: 8 additions & 1 deletion src/Model/Translatable/TranslationMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ public function getLocale()
*/
public function isEmpty()
{
return false;
foreach (get_object_vars($this) as $var => $value) {
if (in_array($var, array('id', 'translatable', 'locale')))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use short syntax array

continue;

if (!empty($value))
return false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use enclosing brackets {}

}
return true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return statement should be separated by 1 space line

}
}