Change scope of methods, add some notes. Prep for refactoring.

This commit is contained in:
James Cole
2018-08-09 16:07:33 +02:00
parent 32e58d0a60
commit 7943164375
41 changed files with 189 additions and 147 deletions

View File

@@ -117,7 +117,7 @@ class BudgetController extends Controller
*
* @return array
*/
private function filterBudgetPeriodReport(array $data): array
protected function filterBudgetPeriodReport(array $data): array // helper function for period overview.
{
/**
* @var int

View File

@@ -173,7 +173,7 @@ class CategoryController extends Controller
*
* @return array
*/
private function filterReport(array $data): array
protected function filterReport(array $data): array // filter data from report.
{
foreach ($data as $categoryId => $set) {
$sum = '0';

View File

@@ -335,7 +335,7 @@ class ExpenseController extends Controller
*
* @return array
*/
protected function combineAccounts(Collection $accounts): array
protected function combineAccounts(Collection $accounts): array // filter + group data
{
$combined = [];
/** @var Account $expenseAccount */
@@ -367,7 +367,7 @@ class ExpenseController extends Controller
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
protected function earnedByCategory(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array
protected function earnedByCategory(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array // get data + augment with info
{
/** @var JournalCollectorInterface $collector */
$collector = app(JournalCollectorInterface::class);
@@ -431,7 +431,7 @@ class ExpenseController extends Controller
*
* @return array
*/
protected function earnedInPeriod(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array
protected function earnedInPeriod(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array // get data + augment with info
{
/** @var JournalCollectorInterface $collector */
$collector = app(JournalCollectorInterface::class);
@@ -478,7 +478,7 @@ class ExpenseController extends Controller
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
protected function spentByBudget(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array
protected function spentByBudget(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array // get data + augment with info
{
/** @var JournalCollectorInterface $collector */
$collector = app(JournalCollectorInterface::class);
@@ -545,7 +545,7 @@ class ExpenseController extends Controller
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*/
protected function spentByCategory(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array
protected function spentByCategory(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array // get data + augment with info
{
/** @var JournalCollectorInterface $collector */
$collector = app(JournalCollectorInterface::class);
@@ -609,7 +609,7 @@ class ExpenseController extends Controller
*
* @return array
*/
protected function spentInPeriod(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array
protected function spentInPeriod(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array // get data + augment with info
{
/** @var JournalCollectorInterface $collector */
$collector = app(JournalCollectorInterface::class);