mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Add imports for facades
This commit is contained in:
@@ -36,7 +36,9 @@ use FireflyIII\Services\Internal\Update\CategoryUpdateService;
|
||||
use FireflyIII\Support\Repositories\UserGroup\UserGroupInterface;
|
||||
use FireflyIII\Support\Repositories\UserGroup\UserGroupTrait;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
|
||||
/**
|
||||
* Class CategoryRepository.
|
||||
@@ -83,8 +85,8 @@ class CategoryRepository implements CategoryRepositoryInterface, UserGroupInterf
|
||||
|
||||
/** @var Category $category */
|
||||
foreach ($categories as $category) {
|
||||
\DB::table('category_transaction')->where('category_id', $category->id)->delete();
|
||||
\DB::table('category_transaction_journal')->where('category_id', $category->id)->delete();
|
||||
DB::table('category_transaction')->where('category_id', $category->id)->delete();
|
||||
DB::table('category_transaction_journal')->where('category_id', $category->id)->delete();
|
||||
RecurrenceTransactionMeta::where('name', 'category_id')->where('value', $category->id)->delete();
|
||||
RuleAction::where('action_type', 'set_category')->where('action_value', $category->name)->delete();
|
||||
$category->delete();
|
||||
@@ -237,8 +239,7 @@ class CategoryRepository implements CategoryRepositoryInterface, UserGroupInterf
|
||||
{
|
||||
$set = $category->attachments()->get();
|
||||
|
||||
/** @var \Storage $disk */
|
||||
$disk = \Storage::disk('upload');
|
||||
$disk = Storage::disk('upload');
|
||||
|
||||
return $set->each(
|
||||
static function (Attachment $attachment) use ($disk) { // @phpstan-ignore-line
|
||||
|
||||
Reference in New Issue
Block a user