Reformat various code.

This commit is contained in:
James Cole
2022-03-29 15:10:05 +02:00
parent 60786461a9
commit 123693096c
134 changed files with 336 additions and 141 deletions

View File

@@ -65,6 +65,7 @@ class Amount
*
* @return string
*
* @throws FireflyException
* @noinspection MoreThanThreeArgumentsInspection
*/
public function formatFlat(string $symbol, int $decimalPlaces, string $amount, bool $coloured = null): string
@@ -112,7 +113,8 @@ class Amount
/**
* @return string
* @throws FireflyException
* @throws JsonException
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
public function getCurrencyCode(): string
{
@@ -136,6 +138,8 @@ class Amount
/**
* @return TransactionCurrency
* @throws FireflyException
* @throws JsonException
*/
public function getDefaultCurrency(): TransactionCurrency
{
@@ -150,7 +154,6 @@ class Amount
*
* @return TransactionCurrency
* @throws FireflyException
* @throws JsonException
*/
public function getDefaultCurrencyByUser(User $user): TransactionCurrency
{
@@ -221,6 +224,7 @@ class Amount
/**
* @return array
* @throws FireflyException
*/
private function getLocaleInfo(): array
{

View File

@@ -220,6 +220,7 @@ class FrontpageChartGenerator
* A basic setter for the user. Also updates the repositories with the right user.
*
* @param User $user
* @throws \FireflyIII\Exceptions\FireflyException
*/
public function setUser(User $user): void
{

View File

@@ -36,6 +36,8 @@ class BillWarningCronjob extends AbstractCronjob
{
/**
* @throws FireflyException
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
public function fire(): void
{

View File

@@ -36,6 +36,8 @@ class RecurringCronjob extends AbstractCronjob
{
/**
* @throws FireflyException
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
public function fire(): void
{

View File

@@ -590,6 +590,8 @@ class ExportDataGenerator
/**
* @return string
* @throws FireflyException
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
private function exportTags(): string
{

View File

@@ -191,7 +191,6 @@ trait AugumentData
* @param Carbon $end
*
* @return Collection
* @throws JsonException
*/
protected function getLimits(Budget $budget, Carbon $start, Carbon $end): Collection // get data + augment with info
{

View File

@@ -88,6 +88,8 @@ trait GetConfigurationData
*
* @return array
* @throws FireflyException
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
protected function getDateRangeConfig(): array // get configuration + get preferences.
{

View File

@@ -79,7 +79,8 @@ trait PeriodOverview
*
* @return array
* @throws FireflyException
* @throws JsonException
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
protected function getAccountPeriodOverview(Account $account, Carbon $start, Carbon $end): array
{
@@ -271,7 +272,8 @@ trait PeriodOverview
*
* @return array
* @throws FireflyException
* @throws JsonException
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
protected function getCategoryPeriodOverview(Category $category, Carbon $start, Carbon $end): array
{
@@ -350,7 +352,8 @@ trait PeriodOverview
*
* @return array
* @throws FireflyException
* @throws JsonException
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
protected function getNoBudgetPeriodOverview(Carbon $start, Carbon $end): array
{
@@ -404,7 +407,8 @@ trait PeriodOverview
*
* @return array
* @throws FireflyException
* @throws JsonException
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
protected function getNoCategoryPeriodOverview(Carbon $theDate): array
{
@@ -485,7 +489,8 @@ trait PeriodOverview
*
* @return array
* @throws FireflyException
* @throws JsonException
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
protected function getTagPeriodOverview(Tag $tag, Carbon $start, Carbon $end): array // period overview for tags.
{
@@ -560,7 +565,8 @@ trait PeriodOverview
*
* @return array
* @throws FireflyException
* @throws JsonException
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
protected function getTransactionPeriodOverview(string $transactionType, Carbon $start, Carbon $end): array
{

View File

@@ -86,6 +86,8 @@ trait RequestInformation
*
* @return bool
* @throws FireflyException
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
final protected function hasSeenDemo(): bool // get request info + get preference
{

View File

@@ -333,6 +333,7 @@ class Navigation
* @param Carbon $end
*
* @return array
* @throws FireflyException
*/
public function listOfPeriods(Carbon $start, Carbon $end): array
{
@@ -436,6 +437,7 @@ class Navigation
* @param Carbon $end
*
* @return string
* @throws FireflyException
*/
public function preferredCarbonLocalizedFormat(Carbon $start, Carbon $end): string
{

View File

@@ -363,6 +363,8 @@ class BudgetReportGenerator
/**
* @param User $user
* @throws \FireflyIII\Exceptions\FireflyException
* @throws \JsonException
*/
public function setUser(User $user): void
{

View File

@@ -56,7 +56,6 @@ class AccountSearch implements GenericSearchInterface
/**
* @return Collection
* @throws JsonException
*/
public function search(): Collection
{

View File

@@ -1360,7 +1360,8 @@ class OperatorQuerySearch implements SearchInterface
}
/**
* @param array $range
* @param string $field
* @param array $range
*
* @throws FireflyException
*/
@@ -1398,7 +1399,8 @@ class OperatorQuerySearch implements SearchInterface
}
/**
* @param array $range
* @param string $field
* @param array $range
*
* @throws FireflyException
*/

View File

@@ -48,7 +48,6 @@ class Steam
* @param Carbon $date
*
* @return string
* @throws JsonException
*/
public function balanceIgnoreVirtual(Account $account, Carbon $date): string
{
@@ -203,6 +202,7 @@ class Steam
* @param TransactionCurrency|null $currency
*
* @return string
* @throws FireflyException
* @throws JsonException
*/
public function balance(Account $account, Carbon $date, ?TransactionCurrency $currency = null): string
@@ -252,7 +252,6 @@ class Steam
* @param Carbon $date
*
* @return array
* @throws FireflyException
* @throws JsonException
*/
public function balancesByAccounts(Collection $accounts, Carbon $date): array
@@ -317,7 +316,6 @@ class Steam
* @param Carbon $date
*
* @return array
* @throws JsonException
*/
public function balancePerCurrency(Account $account, Carbon $date): array
{
@@ -431,6 +429,8 @@ class Steam
*
* @return string
* @throws FireflyException
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
public function getLocale(): string // get preference
{
@@ -452,6 +452,8 @@ class Steam
*
* @return string
* @throws FireflyException
* @throws \Psr\Container\ContainerExceptionInterface
* @throws \Psr\Container\NotFoundExceptionInterface
*/
public function getLanguage(): string // get preference
{
@@ -547,6 +549,7 @@ class Steam
* Additionally fixed a problem with PHP <= 5.2.x with big integers
*
* @param string $value
* @return string
*/
public function floatalize(string $value): string
{

View File

@@ -119,6 +119,9 @@ class OAuthKeys
/**
* @return bool
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public static function restoreKeysFromDB(): bool
{