mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 09:22:33 +00:00
PHP 7.2 specific code.
This commit is contained in:
@@ -182,13 +182,17 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
/**
|
||||
* Save attachments that get uploaded with models, through the app.
|
||||
*
|
||||
* @param Model $model
|
||||
* @param object $model
|
||||
* @param array|null $files
|
||||
*
|
||||
* @return bool
|
||||
* @throws \Illuminate\Contracts\Encryption\EncryptException
|
||||
*/
|
||||
public function saveAttachmentsForModel(Model $model, ?array $files): bool
|
||||
public function saveAttachmentsForModel(object $model, ?array $files): bool
|
||||
{
|
||||
if(!($model instanceof Model)) {
|
||||
return false;
|
||||
}
|
||||
Log::debug(sprintf('Now in saveAttachmentsForModel for model %s', \get_class($model)));
|
||||
if (\is_array($files)) {
|
||||
Log::debug('$files is an array.');
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Helpers\Attachments;
|
||||
|
||||
use FireflyIII\Models\Attachment;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\MessageBag;
|
||||
|
||||
@@ -84,10 +83,10 @@ interface AttachmentHelperInterface
|
||||
/**
|
||||
* Save attachments that got uploaded.
|
||||
*
|
||||
* @param Model $model
|
||||
* @param object $model
|
||||
* @param null|array $files
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function saveAttachmentsForModel(Model $model, ?array $files): bool;
|
||||
public function saveAttachmentsForModel(object $model, ?array $files): bool;
|
||||
}
|
||||
|
Reference in New Issue
Block a user