mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	Various code cleanup.
This commit is contained in:
		| @@ -265,8 +265,8 @@ class CreateImport extends Command | ||||
|      */ | ||||
|     private function validArguments(): bool | ||||
|     { | ||||
|         $file          = $this->argument('file'); | ||||
|         $configuration = $this->argument('configuration'); | ||||
|         $file          = (string)$this->argument('file'); | ||||
|         $configuration = (string)$this->argument('configuration'); | ||||
|         $cwd           = getcwd(); | ||||
|         $validTypes    = config('import.options.file.import_formats'); | ||||
|         $type          = strtolower($this->option('type')); | ||||
|   | ||||
| @@ -63,8 +63,8 @@ class DecryptAttachment extends Command | ||||
|         $repository     = app(AttachmentRepositoryInterface::class); | ||||
|         $attachmentId   = (int)$this->argument('id'); | ||||
|         $attachment     = $repository->findWithoutUser($attachmentId); | ||||
|         $attachmentName = trim($this->argument('name')); | ||||
|         $storagePath    = realpath(trim($this->argument('directory'))); | ||||
|         $attachmentName = trim((string)$this->argument('name')); | ||||
|         $storagePath    = realpath(trim((string)$this->argument('directory'))); | ||||
|         if (null === $attachment) { | ||||
|             $this->error(sprintf('No attachment with id #%d', $attachmentId)); | ||||
|             Log::error(sprintf('DecryptAttachment: No attachment with id #%d', $attachmentId)); | ||||
|   | ||||
| @@ -62,7 +62,7 @@ class Import extends Command | ||||
|     public function handle(): int | ||||
|     { | ||||
|         Log::debug('Start start-import command'); | ||||
|         $jobKey = $this->argument('key'); | ||||
|         $jobKey = (string)$this->argument('key'); | ||||
|         $job    = ImportJob::where('key', $jobKey)->first(); | ||||
|         if (null === $job) { | ||||
|             $this->errorLine(sprintf('No job found with key "%s"', $jobKey)); | ||||
|   | ||||
| @@ -48,10 +48,10 @@ class UpgradeFireflyInstructions extends Command | ||||
|      */ | ||||
|     public function handle(): int | ||||
|     { | ||||
|         if ('update' === $this->argument('task')) { | ||||
|         if ('update' === (string)$this->argument('task')) { | ||||
|             $this->updateInstructions(); | ||||
|         } | ||||
|         if ('install' === $this->argument('task')) { | ||||
|         if ('install' === (string)$this->argument('task')) { | ||||
|             $this->installInstructions(); | ||||
|         } | ||||
|         return 0; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user