Chore: Add phpdocs

This commit is contained in:
James Cole
2023-07-04 13:29:19 +02:00
parent 7840e37e1a
commit 775504acb6
121 changed files with 471 additions and 84 deletions

View File

@@ -97,6 +97,9 @@ class DeleteEmptyJournals extends Command
}
}
/**
* @return void
*/
private function deleteEmptyJournals(): void
{
$count = 0;

View File

@@ -65,6 +65,9 @@ class DeleteOrphanedTransactions extends Command
return 0;
}
/**
* @return void
*/
private function deleteOrphanedJournals(): void
{
$set = TransactionJournal::leftJoin('transaction_groups', 'transaction_journals.transaction_group_id', 'transaction_groups.id')

View File

@@ -89,6 +89,7 @@ class FixAccountTypes extends Command
* @param TransactionJournal $journal
*
* @throws FireflyException
* @throws JsonException
*/
private function inspectJournal(TransactionJournal $journal): void
{

View File

@@ -29,6 +29,9 @@ class TriggerCreditCalculation extends Command
return 0;
}
/**
* @return void
*/
private function processAccounts(): void
{
$accounts = Account::leftJoin('account_types', 'accounts.account_type_id', 'account_types.id')

View File

@@ -38,6 +38,8 @@ use Illuminate\Console\Command;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log;
use InvalidArgumentException;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class ExportData
@@ -83,6 +85,8 @@ class ExportData extends Command
*
* @return int
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{

View File

@@ -73,6 +73,10 @@ class UpdateGroupInformation extends Command
return 0;
}
/**
* @param User $user
* @return void
*/
private function updateGroupInfo(User $user): void
{
$group = $user->userGroup;

View File

@@ -92,7 +92,6 @@ class ForceDecimalSize extends Command
/**
* Execute the console command.
*
* @throws FireflyException
*/
public function handle(): int
{
@@ -110,6 +109,9 @@ class ForceDecimalSize extends Command
return 0;
}
/**
* @return void
*/
private function determineDatabaseType(): void
{
// switch stuff based on database connection:
@@ -155,6 +157,7 @@ class ForceDecimalSize extends Command
* This method loops all enabled currencies and then calls the method that will fix all objects in this currency.
*
* @return void
* @throws FireflyException
*/
private function correctAmountsByCurrency(): void
{

View File

@@ -32,6 +32,9 @@ use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Schema;
/**
* Class ForceMigration
*/
class ForceMigration extends Command
{
use ShowsFriendlyMessages;
@@ -79,6 +82,9 @@ class ForceMigration extends Command
return 0;
}
/**
* @return void
*/
private function forceMigration(): void
{
DB::commit();

View File

@@ -64,6 +64,8 @@ class Cron extends Command
/**
* @return int
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{

View File

@@ -35,6 +35,8 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\User;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class AccountCurrencies
@@ -94,6 +96,8 @@ class AccountCurrencies extends Command
/**
* @return bool
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
private function isExecuted(): bool
{

View File

@@ -31,6 +31,9 @@ use Illuminate\Support\Facades\Log;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class AppendBudgetLimitPeriods
*/
class AppendBudgetLimitPeriods extends Command
{
use ShowsFriendlyMessages;
@@ -54,7 +57,6 @@ class AppendBudgetLimitPeriods extends Command
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int

View File

@@ -61,7 +61,6 @@ class BackToJournals extends Command
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int

View File

@@ -51,6 +51,8 @@ class DecryptDatabase extends Command
* Execute the console command.
*
* @return int
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{

View File

@@ -58,7 +58,6 @@ class MigrateJournalNotes extends Command
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int

View File

@@ -60,7 +60,6 @@ class MigrateRecurrenceMeta extends Command
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws JsonException
* @throws NotFoundExceptionInterface
*/

View File

@@ -59,7 +59,6 @@ class MigrateRecurrenceType extends Command
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int

View File

@@ -58,7 +58,6 @@ class MigrateTagLocations extends Command
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int
@@ -89,6 +88,9 @@ class MigrateTagLocations extends Command
return false;
}
/**
* @return void
*/
private function migrateTagLocations(): void
{
$tags = Tag::get();

View File

@@ -64,6 +64,8 @@ class MigrateToGroups extends Command
* Execute the console command.
*
* @return int
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{

View File

@@ -61,7 +61,6 @@ class OtherCurrenciesCorrections extends Command
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int

View File

@@ -62,6 +62,8 @@ class TransferCurrenciesCorrections extends Command
* Execute the console command.
*
* @return int
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function handle(): int
{

View File

@@ -53,7 +53,6 @@ class UpgradeLiabilities extends Command
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int

View File

@@ -56,7 +56,6 @@ class UpgradeLiabilitiesEight extends Command
*
* @return int
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
public function handle(): int