mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-09 20:11:22 +00:00
Improve code quality and add documentation in folder "Generator"
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** @noinspection PhpUndefinedMethodInspection */
|
||||
/** @noinspection PhpUndefinedMethodInspection */
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Generator\Report;
|
||||
@@ -31,6 +33,8 @@ use Illuminate\Support\Collection;
|
||||
class Support
|
||||
{
|
||||
/**
|
||||
* Get the top expenses.
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getTopExpenses(): Collection
|
||||
@@ -39,6 +43,8 @@ class Support
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the top income.
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function getTopIncome(): Collection
|
||||
@@ -47,6 +53,8 @@ class Support
|
||||
}
|
||||
|
||||
/**
|
||||
* Get averages from a collection.
|
||||
*
|
||||
* @param Collection $collection
|
||||
* @param int $sortFlag
|
||||
*
|
||||
@@ -89,6 +97,8 @@ class Support
|
||||
}
|
||||
|
||||
/**
|
||||
* Summarize collection by earned and spent data.
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.CyclomaticComplexity) // it's exactly five.
|
||||
*
|
||||
* @param array $spent
|
||||
@@ -117,7 +127,6 @@ class Support
|
||||
$return[$objectId]['spent'] = $entry;
|
||||
$return['sum']['spent'] = bcadd($return['sum']['spent'], $entry);
|
||||
}
|
||||
unset($entry);
|
||||
|
||||
/**
|
||||
* @var int
|
||||
@@ -136,6 +145,8 @@ class Support
|
||||
}
|
||||
|
||||
/**
|
||||
* Summarize the data by account.
|
||||
*
|
||||
* @param Collection $collection
|
||||
*
|
||||
* @return array
|
||||
|
||||
Reference in New Issue
Block a user