Code cleanup

This commit is contained in:
James Cole
2019-08-17 10:47:29 +02:00
parent 23479790fe
commit c2296c3ad5
95 changed files with 463 additions and 507 deletions

View File

@@ -79,8 +79,8 @@ trait AugumentData
*
* @return array
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*
*
*/
protected function earnedByCategory(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array // get data + augment with info
{
@@ -352,7 +352,7 @@ trait AugumentData
*
* @return array
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*
*/
protected function getExpensesForBudget(Collection $limits, Budget $budget, Carbon $start, Carbon $end): array // get data + augment with info
{
@@ -397,7 +397,7 @@ trait AugumentData
*
* @return array
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*
*
*/
protected function spentInPeriodMulti(Budget $budget, Collection $limits): array // get data + augment with info
@@ -586,8 +586,8 @@ trait AugumentData
* @param Carbon $end
*
* @return array
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*
*
*/
protected function spentByBudget(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array // get data + augment with info
{
@@ -647,8 +647,8 @@ trait AugumentData
*
* @return array
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*
*
*/
protected function spentByCategory(Collection $assets, Collection $opposing, Carbon $start, Carbon $end): array // get data + augment with info
{

View File

@@ -47,8 +47,8 @@ trait ChartGeneration
*
* @return array
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*
*
*/
protected function accountBalanceChart(Collection $accounts, Carbon $start, Carbon $end): array // chart helper method.
{

View File

@@ -88,7 +88,7 @@ trait GetConfigurationData
* Get config for date range.
*
* @return array
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*
*/
protected function getDateRangeConfig(): array // get configuration + get preferences.
{
@@ -177,7 +177,7 @@ trait GetConfigurationData
* @param string $specificPage
*
* @return array
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*
*/
protected function getSpecificSteps(string $route, string $specificPage): array // get config values
{

View File

@@ -28,7 +28,6 @@ use FireflyIII\Helpers\Collector\GroupCollectorInterface;
use FireflyIII\Models\Account;
use FireflyIII\Models\Category;
use FireflyIII\Models\Tag;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionType;
use FireflyIII\Support\CacheProperties;
use Illuminate\Support\Collection;
@@ -281,7 +280,7 @@ trait PeriodOverview
* @param Carbon $theDate
*
* @return array
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
*
*/
protected function getNoCategoryPeriodOverview(Carbon $theDate): array
{

View File

@@ -83,7 +83,7 @@ trait RenderPartialViews
*
* @return string
*
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*
*/
protected function balanceAmount(array $attributes): string // generate view for report.
{

View File

@@ -65,8 +65,8 @@ trait RequestInformation
* @param string $language
*
* @return string
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*
*
*/
protected function getHelpText(string $route, string $language): string // get from internet.
{
@@ -213,7 +213,7 @@ trait RequestInformation
* @param Carbon $date
*
* @return bool
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
*
*/
protected function notInSessionRange(Carbon $date): bool // Validate a preference
{

View File

@@ -109,8 +109,6 @@ trait TransactionCalculation
* @param Carbon $end
*
* @return array
*
*
*/
protected function getExpensesInCategories(Collection $accounts, Collection $categories, Carbon $start, Carbon $end): array
{
@@ -175,8 +173,6 @@ trait TransactionCalculation
* @param Carbon $end
*
* @return Collection
*
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
protected function getIncomeForTags(Collection $accounts, Collection $tags, Carbon $start, Carbon $end): array
{