mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-25 18:30:55 -06:00
Clean up some code.
This commit is contained in:
parent
a0c98c7d9f
commit
115639a004
@ -42,16 +42,11 @@ use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||
*/
|
||||
class AttachmentHelper implements AttachmentHelperInterface
|
||||
{
|
||||
/** @var Collection All attachments */
|
||||
public $attachments;
|
||||
/** @var MessageBag All errors */
|
||||
public $errors;
|
||||
/** @var MessageBag All messages */
|
||||
public $messages;
|
||||
/** @var array Allowed mimes */
|
||||
protected $allowedMimes = [];
|
||||
/** @var int Max upload size. */
|
||||
protected $maxUploadSize = 0;
|
||||
public Collection $attachments;
|
||||
public MessageBag $errors;
|
||||
public MessageBag $messages;
|
||||
protected array $allowedMimes = [];
|
||||
protected int $maxUploadSize = 0;
|
||||
|
||||
/** @var Filesystem The disk where attachments are stored. */
|
||||
protected $uploadDisk;
|
||||
@ -204,7 +199,7 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
public function saveAttachmentsForModel(object $model, ?array $files): bool
|
||||
{
|
||||
if (!($model instanceof Model)) {
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
Log::debug(sprintf('Now in saveAttachmentsForModel for model %s', get_class($model)));
|
||||
@ -263,7 +258,7 @@ class AttachmentHelper implements AttachmentHelperInterface
|
||||
$fileObject->rewind();
|
||||
|
||||
if (0 === $file->getSize()) {
|
||||
throw new FireflyException('Cannot upload empty or non-existent file.');
|
||||
throw new FireflyException('Cannot upload empty or non-existent file.');
|
||||
}
|
||||
|
||||
$content = $fileObject->fread($file->getSize());
|
||||
|
@ -103,6 +103,9 @@ class InterestingMessage
|
||||
if ('deleted' === $message) {
|
||||
session()->flash('success', (string)trans('firefly.account_deleted', ['name' => $account->name]));
|
||||
}
|
||||
if('created' === $message) {
|
||||
session()->flash('success', (string)trans('firefly.stored_new_account', ['name' => $account->name]));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* @param Request $request
|
||||
|
@ -123,14 +123,13 @@ return [
|
||||
'login_provider' => envNonEmpty('LOGIN_PROVIDER', 'eloquent'),
|
||||
'authentication_guard' => envNonEmpty('AUTHENTICATION_GUARD', 'web'),
|
||||
'custom_logout_uri' => envNonEmpty('CUSTOM_LOGOUT_URI', ''),
|
||||
'cer_provider' => envNonEmpty('CER_PROVIDER', 'fixer'),
|
||||
'ipinfo_token' => env('IPINFO_TOKEN', ''),
|
||||
'update_endpoint' => 'https://version.firefly-iii.org/index.json',
|
||||
'send_telemetry' => env('SEND_TELEMETRY', false),
|
||||
'allow_webhooks' => env('ALLOW_WEBHOOKS', false),
|
||||
'telemetry_endpoint' => 'https://telemetry.firefly-iii.org',
|
||||
'layout' => envNonEmpty('FIREFLY_III_LAYOUT', 'v1'),
|
||||
'update_minimum_age' => 6,
|
||||
'update_minimum_age' => 7,
|
||||
'default_location' => [
|
||||
'longitude' => env('MAP_DEFAULT_LONG', '5.916667'),
|
||||
'latitude' => env('MAP_DEFAULT_LAT', '51.983333'),
|
||||
@ -208,7 +207,7 @@ return [
|
||||
'application/vnd.oasis.opendocument.database',
|
||||
'application/vnd.oasis.opendocument.image',
|
||||
],
|
||||
'list_length' => 10,
|
||||
'list_length' => 10, // to be removed if v1 is cancelled.
|
||||
'bill_periods' => ['weekly', 'monthly', 'quarterly', 'half-year', 'yearly'],
|
||||
'interest_periods' => ['weekly', 'monthly', 'quarterly', 'half-year', 'yearly'],
|
||||
'accountRoles' => ['defaultAsset', 'sharedAsset', 'savingAsset', 'ccAsset', 'cashWalletAsset'],
|
||||
@ -333,14 +332,6 @@ return [
|
||||
'zh_TW' => ['name_locale' => 'Chinese Traditional', 'name_english' => 'Chinese Traditional'],
|
||||
'zh_CN' => ['name_locale' => 'Chinese Simplified', 'name_english' => 'Chinese Simplified'],
|
||||
],
|
||||
'transactionTypesByWhat' => [
|
||||
'expenses' => ['Withdrawal'],
|
||||
'withdrawal' => ['Withdrawal'],
|
||||
'revenue' => ['Deposit'],
|
||||
'deposit' => ['Deposit'],
|
||||
'transfer' => ['Transfer'],
|
||||
'transfers' => ['Transfer'],
|
||||
],
|
||||
'transactionTypesByType' => [
|
||||
'expenses' => ['Withdrawal'],
|
||||
'withdrawal' => ['Withdrawal'],
|
||||
|
Loading…
Reference in New Issue
Block a user