File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,11 +140,9 @@ public function translateOrNew($locale)
140140 */
141141 public function checkTranslation ($ translation )
142142 {
143- if (!empty ($ translation ->getAttribute ( ' name ' )) || !empty ($ translation ->getAttribute ( ' title ' ))) {
143+ if ($ translation || ( !empty ($ translation ->name ) || !empty ($ translation ->title ))) {
144144 return true ;
145145 }
146-
147- return false ;
148146 }
149147
150148 /**
@@ -179,8 +177,8 @@ public function translations()
179177 /**
180178 * Get a translation.
181179 *
182- * @param null $locale
183- * @param bool|null $withFallback
180+ * @param null $locale
181+ * @param bool|null $withFallback
184182 * @return EloquentModel|null
185183 */
186184 public function getTranslation ($ locale = null , $ withFallback = true )
@@ -452,9 +450,9 @@ public function getLocaleKey()
452450 /**
453451 * Return if the entry is trashed or not.
454452 *
453+ * @return bool
455454 * @todo is this really used/needed?
456455 *
457- * @return bool
458456 */
459457 public function trashed ()
460458 {
You can’t perform that action at this time.
0 commit comments