Some code cleanup.

This commit is contained in:
James Cole
2015-05-25 07:14:04 +02:00
parent 4b687b9bdc
commit e19c44efbd
5 changed files with 122 additions and 79 deletions

View File

@@ -232,15 +232,15 @@ class ExpandedForm
$fields = ['title', 'name', 'description'];
/** @var Eloquent $entry */
foreach ($set as $entry) {
$id = intval($entry->id);
$title = null;
$entryId = intval($entry->id);
$title = null;
foreach ($fields as $field) {
if (isset($entry->$field)) {
$title = $entry->$field;
}
}
$selectList[$id] = $title;
$selectList[$entryId] = $title;
}
return $selectList;