firefly-iii/app/Helpers/Collection/BalanceEntry.php

87 lines
1.8 KiB
PHP
Raw Normal View History

2015-05-16 07:51:23 -05:00
<?php
/**
* BalanceEntry.php
2017-10-21 01:40:00 -05:00
* Copyright (c) 2017 thegrumpydictator@gmail.com
*
2017-10-21 01:40:00 -05:00
* This file is part of Firefly III.
*
2017-10-21 01:40:00 -05:00
* Firefly III is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Firefly III is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
2017-12-17 07:41:58 -06:00
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
2015-05-16 07:51:23 -05:00
namespace FireflyIII\Helpers\Collection;
use FireflyIII\Models\Account as AccountModel;
/**
2017-11-15 05:25:49 -06:00
* Class BalanceEntry.
2015-05-16 07:51:23 -05:00
*/
class BalanceEntry
{
2017-11-15 05:25:49 -06:00
/** @var AccountModel */
2015-05-16 07:51:23 -05:00
protected $account;
2016-02-05 02:25:15 -06:00
/** @var string */
protected $left = '0';
/** @var string */
protected $spent = '0';
2015-05-16 07:51:23 -05:00
/**
* @return AccountModel
*/
2016-02-18 03:04:26 -06:00
public function getAccount(): AccountModel
2015-05-16 07:51:23 -05:00
{
return $this->account;
}
/**
* @param AccountModel $account
*/
2016-02-05 02:25:15 -06:00
public function setAccount(AccountModel $account)
2015-05-16 07:51:23 -05:00
{
$this->account = $account;
}
/**
2016-02-05 02:25:15 -06:00
* @return string
2015-05-16 07:51:23 -05:00
*/
2016-02-18 03:04:26 -06:00
public function getLeft(): string
2015-05-16 07:51:23 -05:00
{
2015-05-20 12:55:53 -05:00
return $this->left;
2015-05-16 07:51:23 -05:00
}
/**
2016-02-05 02:25:15 -06:00
* @param string $left
2015-05-16 07:51:23 -05:00
*/
2016-02-05 02:25:15 -06:00
public function setLeft(string $left)
2015-05-16 07:51:23 -05:00
{
2015-05-20 12:55:53 -05:00
$this->left = $left;
2015-05-16 07:51:23 -05:00
}
2015-05-17 05:49:09 -05:00
/**
2016-02-05 02:25:15 -06:00
* @return string
2015-05-17 05:49:09 -05:00
*/
2016-02-18 03:04:26 -06:00
public function getSpent(): string
2015-05-17 05:49:09 -05:00
{
2015-05-20 12:55:53 -05:00
return $this->spent;
2015-05-17 05:49:09 -05:00
}
/**
2016-02-05 02:25:15 -06:00
* @param string $spent
2015-05-17 05:49:09 -05:00
*/
2016-02-05 02:25:15 -06:00
public function setSpent(string $spent)
2015-05-17 05:49:09 -05:00
{
2015-05-20 12:55:53 -05:00
$this->spent = $spent;
2015-05-17 05:49:09 -05:00
}
2015-05-20 12:56:14 -05:00
}