Code cleanup.

This commit is contained in:
James Cole
2016-04-26 21:40:15 +02:00
parent 1d2a4e707e
commit da202317c0
41 changed files with 167 additions and 197 deletions

View File

@@ -18,10 +18,10 @@ use FireflyIII\Models\Account;
*/
class EntryAccount
{
/** @var int */
public $accountId;
/** @var string */
public $iban;
/** @var int */
public $id;
/** @var string */
public $name;
/** @var int */
@@ -36,10 +36,10 @@ class EntryAccount
*/
public function __construct(Account $account)
{
$this->id = $account->id;
$this->name = $account->name;
$this->iban = $account->iban;
$this->type = $account->accountType->type;
$this->number = $account->getMeta('accountNumber');
$this->accountId = $account->id;
$this->name = $account->name;
$this->iban = $account->iban;
$this->type = $account->accountType->type;
$this->number = $account->getMeta('accountNumber');
}
}

View File

@@ -19,7 +19,7 @@ use FireflyIII\Models\Bill;
class EntryBill
{
/** @var string */
public $id = '';
public $billId = '';
/** @var string */
public $name = '';
@@ -31,8 +31,8 @@ class EntryBill
public function __construct(Bill $bill = null)
{
if (!is_null($bill)) {
$this->id = $bill->id;
$this->name = $bill->name;
$this->billId = $bill->id;
$this->name = $bill->name;
}
}

View File

@@ -19,7 +19,7 @@ use FireflyIII\Models\Budget;
class EntryBudget
{
/** @var string */
public $id = '';
public $budgetId = '';
/** @var string */
public $name = '';
@@ -31,8 +31,8 @@ class EntryBudget
public function __construct(Budget $budget = null)
{
if (!is_null($budget)) {
$this->id = $budget->id;
$this->name = $budget->name;
$this->budgetId = $budget->id;
$this->name = $budget->name;
}
}

View File

@@ -19,7 +19,7 @@ use FireflyIII\Models\Category;
class EntryCategory
{
/** @var string */
public $id = '';
public $categoryId = '';
/** @var string */
public $name = '';
@@ -31,8 +31,8 @@ class EntryCategory
public function __construct(Category $category = null)
{
if (!is_null($category)) {
$this->id = $category->id;
$this->name = $category->name;
$this->categoryId = $category->id;
$this->name = $category->name;
}
}
}