mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Replace magic facades
This commit is contained in:
@@ -26,6 +26,7 @@ namespace FireflyIII\Console\Commands\Correction;
|
||||
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CorrectsDatabase extends Command
|
||||
{
|
||||
@@ -40,7 +41,7 @@ class CorrectsDatabase extends Command
|
||||
public function handle(): int
|
||||
{
|
||||
// if table does not exist, return false
|
||||
if (!\Schema::hasTable('users')) {
|
||||
if (!Schema::hasTable('users')) {
|
||||
$this->friendlyError('No "users"-table, will not continue.');
|
||||
|
||||
return 1;
|
||||
|
@@ -26,6 +26,7 @@ namespace FireflyIII\Console\Commands\Integrity;
|
||||
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class ReportsIntegrity extends Command
|
||||
{
|
||||
@@ -41,7 +42,7 @@ class ReportsIntegrity extends Command
|
||||
public function handle(): int
|
||||
{
|
||||
// if table does not exist, return false
|
||||
if (!\Schema::hasTable('users')) {
|
||||
if (!Schema::hasTable('users')) {
|
||||
return 1;
|
||||
}
|
||||
$commands = [
|
||||
|
@@ -31,6 +31,7 @@ use FireflyIII\Models\TransactionJournal;
|
||||
use FireflyIII\Repositories\Journal\JournalCLIRepositoryInterface;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Database\QueryException;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddsTransactionIdentifiers extends Command
|
||||
{
|
||||
@@ -65,7 +66,7 @@ class AddsTransactionIdentifiers extends Command
|
||||
}
|
||||
|
||||
// if table does not exist, return false
|
||||
if (!\Schema::hasTable('transaction_journals')) {
|
||||
if (!Schema::hasTable('transaction_journals')) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user