mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-20 11:19:16 +00:00
Reformat various code.
This commit is contained in:
16
app/User.php
16
app/User.php
@@ -200,7 +200,7 @@ class User extends Authenticatable
|
||||
public static function routeBinder(string $value): User
|
||||
{
|
||||
if (auth()->check()) {
|
||||
$userId = (int)$value;
|
||||
$userId = (int) $value;
|
||||
$user = self::find($userId);
|
||||
if (null !== $user) {
|
||||
return $user;
|
||||
@@ -302,9 +302,9 @@ class User extends Authenticatable
|
||||
|
||||
/**
|
||||
* Get the models LDAP domain.
|
||||
* @return string
|
||||
* @deprecated
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLdapDomain()
|
||||
{
|
||||
@@ -313,9 +313,9 @@ class User extends Authenticatable
|
||||
|
||||
/**
|
||||
* Get the database column name of the domain.
|
||||
* @return string
|
||||
* @deprecated
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLdapDomainColumn()
|
||||
{
|
||||
@@ -324,9 +324,9 @@ class User extends Authenticatable
|
||||
|
||||
/**
|
||||
* Get the models LDAP GUID.
|
||||
* @return string
|
||||
* @deprecated
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLdapGuid()
|
||||
{
|
||||
@@ -335,9 +335,9 @@ class User extends Authenticatable
|
||||
|
||||
/**
|
||||
* Get the models LDAP GUID database column name.
|
||||
* @return string
|
||||
* @deprecated
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getLdapGuidColumn()
|
||||
{
|
||||
@@ -456,11 +456,11 @@ class User extends Authenticatable
|
||||
|
||||
/**
|
||||
* Set the models LDAP domain.
|
||||
* @deprecated
|
||||
*
|
||||
* @param string $domain
|
||||
*
|
||||
* @return void
|
||||
* @deprecated
|
||||
*
|
||||
*/
|
||||
public function setLdapDomain($domain)
|
||||
{
|
||||
@@ -469,10 +469,10 @@ class User extends Authenticatable
|
||||
|
||||
/**
|
||||
* Set the models LDAP GUID.
|
||||
* @deprecated
|
||||
* @param string $guid
|
||||
*
|
||||
* @return void
|
||||
* @deprecated
|
||||
*/
|
||||
public function setLdapGuid($guid)
|
||||
{
|
||||
|
@@ -144,9 +144,9 @@ return [
|
||||
'Google2FA' => PragmaRX\Google2FALaravel\Facade::class,
|
||||
'Twig' => TwigBridge\Facade\Twig::class,
|
||||
|
||||
'Arr' => Illuminate\Support\Arr::class,
|
||||
'Arr' => Illuminate\Support\Arr::class,
|
||||
'Http' => Illuminate\Support\Facades\Http::class,
|
||||
'Str' => Illuminate\Support\Str::class,
|
||||
'Str' => Illuminate\Support\Str::class,
|
||||
],
|
||||
|
||||
'asset_url' => env('ASSET_URL', null),
|
||||
|
@@ -21,7 +21,7 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
if('ldap' === strtolower((string) env('AUTHENTICATION_GUARD'))) {
|
||||
if ('ldap' === strtolower((string) env('AUTHENTICATION_GUARD'))) {
|
||||
die('LDAP is no longer supported by Firefly III v5.7+. Sorry about that. You will have to switch to "remote_user_guard", and use tools like Authelia or Keycloak to use LDAP together with Firefly III.');
|
||||
}
|
||||
|
||||
@@ -95,8 +95,8 @@ return [
|
||||
|
||||
'providers' => [
|
||||
'users' => [
|
||||
'driver' => 'eloquent',
|
||||
'model' => FireflyIII\User::class,
|
||||
'driver' => 'eloquent',
|
||||
'model' => FireflyIII\User::class,
|
||||
],
|
||||
'remote_user_provider' => [
|
||||
'driver' => 'remote_user_provider',
|
||||
|
@@ -61,7 +61,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'files' => base_path('routes/breadcrumbs.php'),
|
||||
'files' => base_path('routes/breadcrumbs.php'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -73,13 +73,13 @@ return [
|
||||
*/
|
||||
|
||||
// When route-bound breadcrumbs are used but the current route doesn't have a name (UnnamedRouteException)
|
||||
'unnamed-route-exception' => true,
|
||||
'unnamed-route-exception' => true,
|
||||
|
||||
// When route-bound breadcrumbs are used and the matching breadcrumb doesn't exist (InvalidBreadcrumbException)
|
||||
'missing-route-bound-breadcrumb-exception' => true,
|
||||
|
||||
// When a named breadcrumb is used but doesn't exist (InvalidBreadcrumbException)
|
||||
'invalid-named-breadcrumb-exception' => true,
|
||||
'invalid-named-breadcrumb-exception' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -91,9 +91,9 @@ return [
|
||||
*/
|
||||
|
||||
// Manager
|
||||
'manager-class' => Diglactic\Breadcrumbs\Manager::class,
|
||||
'manager-class' => Diglactic\Breadcrumbs\Manager::class,
|
||||
|
||||
// Generator
|
||||
'generator-class' => Diglactic\Breadcrumbs\Generator::class,
|
||||
'generator-class' => Diglactic\Breadcrumbs\Generator::class,
|
||||
|
||||
];
|
||||
|
@@ -26,7 +26,7 @@ use FireflyIII\Enums\ClauseType;
|
||||
|
||||
return [
|
||||
ClauseType::TRANSACTION => [
|
||||
ClauseType::WHERE => [
|
||||
ClauseType::WHERE => [
|
||||
'source_account_id' => 'required|numeric|belongsToUser:accounts,id',
|
||||
],
|
||||
ClauseType::UPDATE => [
|
||||
|
@@ -55,7 +55,7 @@ return [
|
||||
],
|
||||
|
||||
'array' => [
|
||||
'driver' => 'array',
|
||||
'driver' => 'array',
|
||||
'serialize' => false,
|
||||
],
|
||||
|
||||
@@ -89,16 +89,16 @@ return [
|
||||
],
|
||||
],
|
||||
|
||||
'redis' => [
|
||||
'redis' => [
|
||||
'driver' => 'redis',
|
||||
'connection' => 'default',
|
||||
],
|
||||
'dynamodb' => [
|
||||
'driver' => 'dynamodb',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
||||
'driver' => 'dynamodb',
|
||||
'key' => env('AWS_ACCESS_KEY_ID'),
|
||||
'secret' => env('AWS_SECRET_ACCESS_KEY'),
|
||||
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
|
||||
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
|
||||
'endpoint' => env('DYNAMODB_ENDPOINT'),
|
||||
],
|
||||
],
|
||||
|
@@ -52,35 +52,35 @@ return [
|
||||
*/
|
||||
|
||||
'disks' => [
|
||||
'local' => [
|
||||
'local' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app'),
|
||||
],
|
||||
|
||||
// local storage configuration for upload and export:
|
||||
'upload' => [
|
||||
'upload' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('upload'),
|
||||
],
|
||||
'export' => [
|
||||
'export' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('export'),
|
||||
],
|
||||
|
||||
// various other paths:
|
||||
'database' => [
|
||||
'database' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('database'),
|
||||
],
|
||||
'seeds' => [
|
||||
'seeds' => [
|
||||
'driver' => 'local',
|
||||
'root' => base_path('resources/seeds'),
|
||||
],
|
||||
'stubs' => [
|
||||
'stubs' => [
|
||||
'driver' => 'local',
|
||||
'root' => base_path('resources/stubs'),
|
||||
],
|
||||
'resources' => [
|
||||
'resources' => [
|
||||
'driver' => 'local',
|
||||
'root' => base_path('resources'),
|
||||
],
|
||||
|
@@ -45,7 +45,7 @@ return [
|
||||
'basic_info' => ['element' => '#transaction-info', 'position' => 'right'],
|
||||
'amount_info' => ['element' => '#amount-info', 'position' => 'bottom'],
|
||||
'optional_info' => ['element' => '#optional-info', 'position' => 'left'],
|
||||
'split' => ['element' => '.split_add_btn','position' => 'top'],
|
||||
'split' => ['element' => '.split_add_btn', 'position' => 'top'],
|
||||
],
|
||||
|
||||
'transactions_create_withdrawal' => [
|
||||
|
@@ -54,22 +54,22 @@ return [
|
||||
|
||||
'channels' => [
|
||||
// default channels for 'stack' and audit logs:
|
||||
'stack' => [
|
||||
'stack' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['daily', 'stdout'],
|
||||
],
|
||||
'audit' => [
|
||||
'audit' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['audit_daily', 'audit_stdout'],
|
||||
],
|
||||
'scoped' => [
|
||||
'scoped' => [
|
||||
'driver' => 'custom',
|
||||
'via' => FireflyIII\Logging\CreateCustomLogger::class,
|
||||
'via' => FireflyIII\Logging\CreateCustomLogger::class,
|
||||
],
|
||||
'papertrail' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
||||
'handler' => SyslogUdpHandler::class,
|
||||
'papertrail' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
||||
'handler' => SyslogUdpHandler::class,
|
||||
'handler_with' => [
|
||||
'host' => env('PAPERTRAIL_HOST'),
|
||||
'port' => env('PAPERTRAIL_PORT'),
|
||||
@@ -77,21 +77,21 @@ return [
|
||||
],
|
||||
|
||||
// single laravel log file:
|
||||
'single' => [
|
||||
'single' => [
|
||||
'driver' => 'single',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
||||
],
|
||||
|
||||
// stdout, used in stack 'stack' by default:
|
||||
'stdout' => [
|
||||
'stdout' => [
|
||||
'driver' => 'single',
|
||||
'path' => 'php://stdout',
|
||||
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
||||
],
|
||||
|
||||
// daily, used in stack 'stack' by default:
|
||||
'daily' => [
|
||||
'daily' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/ff3-' . PHP_SAPI . '.log'),
|
||||
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
||||
@@ -99,14 +99,14 @@ return [
|
||||
],
|
||||
|
||||
// the audit log destinations:
|
||||
'audit_daily' => [
|
||||
'audit_daily' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/ff3-audit.log'),
|
||||
'tap' => [AuditLogger::class],
|
||||
'level' => envNonEmpty('AUDIT_LOG_LEVEL', 'info'),
|
||||
'days' => 90,
|
||||
],
|
||||
'audit_stdout' => [
|
||||
'audit_stdout' => [
|
||||
'driver' => 'single',
|
||||
'path' => 'php://stdout',
|
||||
'tap' => [AuditLogger::class],
|
||||
@@ -114,13 +114,13 @@ return [
|
||||
],
|
||||
|
||||
// syslog destination
|
||||
'syslog' => [
|
||||
'syslog' => [
|
||||
'driver' => 'syslog',
|
||||
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
||||
],
|
||||
|
||||
// errorlog destination
|
||||
'errorlog' => [
|
||||
'errorlog' => [
|
||||
'driver' => 'errorlog',
|
||||
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
||||
],
|
||||
|
@@ -23,23 +23,23 @@ declare(strict_types=1);
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Mailer
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default mailer that is used to send any email
|
||||
| messages sent by your application. Alternative mailers may be setup
|
||||
| and used as needed; however, this mailer will be used by default.
|
||||
|
|
||||
*/
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Default Mailer
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the default mailer that is used to send any email
|
||||
| messages sent by your application. Alternative mailers may be setup
|
||||
| and used as needed; however, this mailer will be used by default.
|
||||
|
|
||||
*/
|
||||
'default' => env('MAIL_MAILER', 'smtp'),
|
||||
|
||||
'mailers' => [
|
||||
'smtp' => [
|
||||
'transport' => 'smtp',
|
||||
'host' => env('MAIL_HOST', 'smtp.mailtrap.io'),
|
||||
'port' => env('MAIL_PORT', 2525),
|
||||
'host' => env('MAIL_HOST', 'smtp.mailtrap.io'),
|
||||
'port' => env('MAIL_PORT', 2525),
|
||||
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
|
||||
'username' => env('MAIL_USERNAME'),
|
||||
'password' => env('MAIL_PASSWORD'),
|
||||
@@ -62,7 +62,7 @@ return [
|
||||
'transport' => 'sendmail',
|
||||
'path' => '/usr/sbin/sendmail -bs',
|
||||
],
|
||||
'log' => [
|
||||
'log' => [
|
||||
'transport' => 'log',
|
||||
'channel' => env('MAIL_LOG_CHANNEL', 'stack'),
|
||||
'level' => 'notice',
|
||||
@@ -73,7 +73,7 @@ return [
|
||||
],
|
||||
],
|
||||
|
||||
'from' => ['address' => envNonEmpty('MAIL_FROM', 'changeme@example.com'), 'name' => 'Firefly III Mailer'],
|
||||
'from' => ['address' => envNonEmpty('MAIL_FROM', 'changeme@example.com'), 'name' => 'Firefly III Mailer'],
|
||||
'markdown' => [
|
||||
'theme' => 'default',
|
||||
|
||||
|
@@ -38,7 +38,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS','')),
|
||||
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', '')),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@@ -36,5 +36,5 @@ return [
|
||||
'domain' => env('COOKIE_DOMAIN', null),
|
||||
'secure' => env('COOKIE_SECURE', null),
|
||||
'http_only' => true,
|
||||
'same_site' => env('COOKIE_SAMESITE','lax'),
|
||||
'same_site' => env('COOKIE_SAMESITE', 'lax'),
|
||||
];
|
||||
|
@@ -51,6 +51,7 @@ declare(strict_types=1);
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
use FireflyIII\Support\Twig\AmountFormat;
|
||||
use FireflyIII\Support\Twig\General;
|
||||
use FireflyIII\Support\Twig\Rule;
|
||||
@@ -78,15 +79,15 @@ use TwigBridge\Extension\Loader\Globals;
|
||||
return [
|
||||
|
||||
'twig' => [
|
||||
'extension' => 'twig',
|
||||
'environment' => [
|
||||
'debug' => env('APP_DEBUG', false),
|
||||
'charset' => 'utf-8',
|
||||
'cache' => null,
|
||||
'auto_reload' => true,
|
||||
'extension' => 'twig',
|
||||
'environment' => [
|
||||
'debug' => env('APP_DEBUG', false),
|
||||
'charset' => 'utf-8',
|
||||
'cache' => null,
|
||||
'auto_reload' => true,
|
||||
'strict_variables' => false,
|
||||
'autoescape' => 'html',
|
||||
'optimizations' => -1,
|
||||
'autoescape' => 'html',
|
||||
'optimizations' => -1,
|
||||
],
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -110,7 +111,7 @@ return [
|
||||
| NOTE: these will be overwritten if you pass data into the view with the same key.
|
||||
|
|
||||
*/
|
||||
'globals' => [],
|
||||
'globals' => [],
|
||||
],
|
||||
|
||||
'extensions' => [
|
||||
@@ -125,7 +126,7 @@ return [
|
||||
| `Twig\Extension\DebugExtension` is enabled automatically if twig.debug is TRUE.
|
||||
|
|
||||
*/
|
||||
'enabled' => [
|
||||
'enabled' => [
|
||||
Facades::class,
|
||||
Filters::class,
|
||||
Functions::class,
|
||||
@@ -175,7 +176,7 @@ return [
|
||||
| in order to be marked as safe.
|
||||
|
|
||||
*/
|
||||
'facades' => [
|
||||
'facades' => [
|
||||
'Breadcrumbs' => [
|
||||
'is_safe' => [
|
||||
'render',
|
||||
@@ -194,7 +195,7 @@ return [
|
||||
'ExpandedForm' => [
|
||||
'is_safe' => [
|
||||
'date', 'text', 'select', 'balance', 'optionsList', 'checkbox', 'amount', 'tags', 'integer', 'textarea', 'location', 'file', 'staticText',
|
||||
'password', 'nonSelectableAmount', 'number', 'amountNoCurrency', 'percentage','objectGroup'
|
||||
'password', 'nonSelectableAmount', 'number', 'amountNoCurrency', 'percentage', 'objectGroup',
|
||||
|
||||
],
|
||||
],
|
||||
@@ -283,7 +284,7 @@ return [
|
||||
| </code>
|
||||
|
|
||||
*/
|
||||
'filters' => [
|
||||
'filters' => [
|
||||
'get' => 'data_get',
|
||||
],
|
||||
],
|
||||
|
@@ -34,7 +34,7 @@ return [
|
||||
'4.7.10' => 'Firefly III no longer encrypts database values. To protect your data, make sure you use TDE or FDE. Read more: https://bit.ly/FF3-encryption',
|
||||
'4.8.0' => 'This is a huge upgrade for Firefly III. Please expect bugs and errors, and bear with me as I fix them. I tested a lot of things but pretty sure I missed some. Thanks for understanding.',
|
||||
'4.8.1' => 'This version of Firefly III requires PHP7.3.',
|
||||
'5.3.0' => 'This version of Firefly III requires PHP7.4.'
|
||||
'5.3.0' => 'This version of Firefly III requires PHP7.4.',
|
||||
],
|
||||
'install' => [
|
||||
'4.3' => 'Welcome to Firefly! Make sure you follow the installation guide. If you need more help, please check Github or the Firefly III website. The installation guide has a FAQ which you should check out as well.',
|
||||
@@ -47,7 +47,7 @@ return [
|
||||
'4.7.10' => 'Firefly III no longer encrypts database values. To protect your data, make sure you use TDE or FDE. Read more: https://bit.ly/FF3-encryption',
|
||||
'4.8.0' => 'This is a huge upgrade for Firefly III. Please expect bugs and errors, and bear with me as I fix them. I tested a lot of things but pretty sure I missed some. Thanks for understanding.',
|
||||
'4.8.1' => 'This version of Firefly III requires PHP7.3.',
|
||||
'5.3.0' => 'This version of Firefly III requires PHP7.4.'
|
||||
'5.3.0' => 'This version of Firefly III requires PHP7.4.',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
@@ -31,6 +31,16 @@ use Illuminate\Support\Facades\Schema;
|
||||
*/
|
||||
class CreateLocalPersonalAccessTokensTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('personal_access_tokens');
|
||||
}
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
@@ -50,14 +60,4 @@ class CreateLocalPersonalAccessTokensTable extends Migration
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('personal_access_tokens');
|
||||
}
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ class AccountTypeSeeder extends Seeder
|
||||
AccountType::RECONCILIATION,
|
||||
AccountType::DEBT,
|
||||
AccountType::MORTGAGE,
|
||||
AccountType::LIABILITY_CREDIT
|
||||
AccountType::LIABILITY_CREDIT,
|
||||
];
|
||||
foreach ($types as $type) {
|
||||
try {
|
||||
|
@@ -49,7 +49,7 @@ class ConfigSeeder extends Seeder
|
||||
);
|
||||
}
|
||||
if (null !== $entry) {
|
||||
$version = (int)config('firefly.db_version');
|
||||
$version = (int) config('firefly.db_version');
|
||||
$entry->data = $version;
|
||||
$entry->save();
|
||||
|
||||
|
@@ -40,7 +40,7 @@ class TransactionTypeSeeder extends Seeder
|
||||
TransactionType::OPENING_BALANCE,
|
||||
TransactionType::RECONCILIATION,
|
||||
TransactionType::INVALID,
|
||||
TransactionType::LIABILITY_CREDIT
|
||||
TransactionType::LIABILITY_CREDIT,
|
||||
];
|
||||
|
||||
foreach ($types as $type) {
|
||||
|
Reference in New Issue
Block a user