Reformat various code.

This commit is contained in:
James Cole
2022-03-29 15:01:12 +02:00
parent d04efb8325
commit 452b6d0e1b
19 changed files with 95 additions and 94 deletions

View File

@@ -200,7 +200,7 @@ class User extends Authenticatable
public static function routeBinder(string $value): User public static function routeBinder(string $value): User
{ {
if (auth()->check()) { if (auth()->check()) {
$userId = (int)$value; $userId = (int) $value;
$user = self::find($userId); $user = self::find($userId);
if (null !== $user) { if (null !== $user) {
return $user; return $user;
@@ -302,9 +302,9 @@ class User extends Authenticatable
/** /**
* Get the models LDAP domain. * Get the models LDAP domain.
* @return string
* @deprecated * @deprecated
* *
* @return string
*/ */
public function getLdapDomain() public function getLdapDomain()
{ {
@@ -313,9 +313,9 @@ class User extends Authenticatable
/** /**
* Get the database column name of the domain. * Get the database column name of the domain.
* @return string
* @deprecated * @deprecated
* *
* @return string
*/ */
public function getLdapDomainColumn() public function getLdapDomainColumn()
{ {
@@ -324,9 +324,9 @@ class User extends Authenticatable
/** /**
* Get the models LDAP GUID. * Get the models LDAP GUID.
* @return string
* @deprecated * @deprecated
* *
* @return string
*/ */
public function getLdapGuid() public function getLdapGuid()
{ {
@@ -335,9 +335,9 @@ class User extends Authenticatable
/** /**
* Get the models LDAP GUID database column name. * Get the models LDAP GUID database column name.
* @return string
* @deprecated * @deprecated
* *
* @return string
*/ */
public function getLdapGuidColumn() public function getLdapGuidColumn()
{ {
@@ -456,11 +456,11 @@ class User extends Authenticatable
/** /**
* Set the models LDAP domain. * Set the models LDAP domain.
* @deprecated
*
* @param string $domain * @param string $domain
* *
* @return void * @return void
* @deprecated
*
*/ */
public function setLdapDomain($domain) public function setLdapDomain($domain)
{ {
@@ -469,10 +469,10 @@ class User extends Authenticatable
/** /**
* Set the models LDAP GUID. * Set the models LDAP GUID.
* @deprecated
* @param string $guid * @param string $guid
* *
* @return void * @return void
* @deprecated
*/ */
public function setLdapGuid($guid) public function setLdapGuid($guid)
{ {

View File

@@ -21,7 +21,7 @@
declare(strict_types=1); 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.'); 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.');
} }

View File

@@ -45,7 +45,7 @@ return [
'basic_info' => ['element' => '#transaction-info', 'position' => 'right'], 'basic_info' => ['element' => '#transaction-info', 'position' => 'right'],
'amount_info' => ['element' => '#amount-info', 'position' => 'bottom'], 'amount_info' => ['element' => '#amount-info', 'position' => 'bottom'],
'optional_info' => ['element' => '#optional-info', 'position' => 'left'], 'optional_info' => ['element' => '#optional-info', 'position' => 'left'],
'split' => ['element' => '.split_add_btn','position' => 'top'], 'split' => ['element' => '.split_add_btn', 'position' => 'top'],
], ],
'transactions_create_withdrawal' => [ 'transactions_create_withdrawal' => [

View File

@@ -23,16 +23,16 @@ declare(strict_types=1);
return [ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Default Mailer | Default Mailer
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This option controls the default mailer that is used to send any email | This option controls the default mailer that is used to send any email
| messages sent by your application. Alternative mailers may be setup | messages sent by your application. Alternative mailers may be setup
| and used as needed; however, this mailer will be used by default. | and used as needed; however, this mailer will be used by default.
| |
*/ */
'default' => env('MAIL_MAILER', 'smtp'), 'default' => env('MAIL_MAILER', 'smtp'),
'mailers' => [ 'mailers' => [

View File

@@ -38,7 +38,7 @@ return [
| |
*/ */
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS','')), 'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', '')),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@@ -36,5 +36,5 @@ return [
'domain' => env('COOKIE_DOMAIN', null), 'domain' => env('COOKIE_DOMAIN', null),
'secure' => env('COOKIE_SECURE', null), 'secure' => env('COOKIE_SECURE', null),
'http_only' => true, 'http_only' => true,
'same_site' => env('COOKIE_SAMESITE','lax'), 'same_site' => env('COOKIE_SAMESITE', 'lax'),
]; ];

View File

@@ -51,6 +51,7 @@ declare(strict_types=1);
* For the full copyright and license information, please view the LICENSE * For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
use FireflyIII\Support\Twig\AmountFormat; use FireflyIII\Support\Twig\AmountFormat;
use FireflyIII\Support\Twig\General; use FireflyIII\Support\Twig\General;
use FireflyIII\Support\Twig\Rule; use FireflyIII\Support\Twig\Rule;
@@ -194,7 +195,7 @@ return [
'ExpandedForm' => [ 'ExpandedForm' => [
'is_safe' => [ 'is_safe' => [
'date', 'text', 'select', 'balance', 'optionsList', 'checkbox', 'amount', 'tags', 'integer', 'textarea', 'location', 'file', 'staticText', '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',
], ],
], ],

View File

@@ -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.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.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.', '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' => [ '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.', '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.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.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.', '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.',
], ],
], ],
]; ];

View File

@@ -31,6 +31,16 @@ use Illuminate\Support\Facades\Schema;
*/ */
class CreateLocalPersonalAccessTokensTable extends Migration class CreateLocalPersonalAccessTokensTable extends Migration
{ {
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('personal_access_tokens');
}
/** /**
* Run the migrations. * Run the migrations.
* *
@@ -50,14 +60,4 @@ class CreateLocalPersonalAccessTokensTable extends Migration
}); });
} }
} }
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('personal_access_tokens');
}
} }

View File

@@ -46,7 +46,7 @@ class AccountTypeSeeder extends Seeder
AccountType::RECONCILIATION, AccountType::RECONCILIATION,
AccountType::DEBT, AccountType::DEBT,
AccountType::MORTGAGE, AccountType::MORTGAGE,
AccountType::LIABILITY_CREDIT AccountType::LIABILITY_CREDIT,
]; ];
foreach ($types as $type) { foreach ($types as $type) {
try { try {

View File

@@ -49,7 +49,7 @@ class ConfigSeeder extends Seeder
); );
} }
if (null !== $entry) { if (null !== $entry) {
$version = (int)config('firefly.db_version'); $version = (int) config('firefly.db_version');
$entry->data = $version; $entry->data = $version;
$entry->save(); $entry->save();

View File

@@ -40,7 +40,7 @@ class TransactionTypeSeeder extends Seeder
TransactionType::OPENING_BALANCE, TransactionType::OPENING_BALANCE,
TransactionType::RECONCILIATION, TransactionType::RECONCILIATION,
TransactionType::INVALID, TransactionType::INVALID,
TransactionType::LIABILITY_CREDIT TransactionType::LIABILITY_CREDIT,
]; ];
foreach ($types as $type) { foreach ($types as $type) {