Clean up some code.

This commit is contained in:
James Cole 2024-01-20 07:04:19 +01:00
parent d8d8002f1e
commit e449395f3f
No known key found for this signature in database
GPG Key ID: B49A324B7EAD6D80
4 changed files with 27 additions and 40 deletions

View File

@ -226,16 +226,16 @@
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v3.47.1",
"version": "v3.48.0",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "173c60d1eff911c9c54322704623a45561d3241d"
"reference": "a92472c6fb66349de25211f31c77eceae3df024e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/173c60d1eff911c9c54322704623a45561d3241d",
"reference": "173c60d1eff911c9c54322704623a45561d3241d",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/a92472c6fb66349de25211f31c77eceae3df024e",
"reference": "a92472c6fb66349de25211f31c77eceae3df024e",
"shasum": ""
},
"require": {
@ -305,7 +305,7 @@
],
"support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.47.1"
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.48.0"
},
"funding": [
{
@ -313,7 +313,7 @@
"type": "github"
}
],
"time": "2024-01-16T18:54:21+00:00"
"time": "2024-01-19T21:44:39+00:00"
},
{
"name": "psr/container",

View File

@ -99,28 +99,28 @@ class Transaction extends Model
protected $casts
= [
'created_at' => 'datetime',
'updated_at' => 'datetime',
'deleted_at' => 'datetime',
'identifier' => 'int',
'encrypted' => 'boolean', // model does not have these fields though
'bill_name_encrypted' => 'boolean',
'reconciled' => 'boolean',
'date' => 'datetime',
];
'created_at' => 'datetime',
'updated_at' => 'datetime',
'deleted_at' => 'datetime',
'identifier' => 'int',
'encrypted' => 'boolean', // model does not have these fields though
'bill_name_encrypted' => 'boolean',
'reconciled' => 'boolean',
'date' => 'datetime',
];
protected $fillable
= [
'account_id',
'transaction_journal_id',
'description',
'amount',
'identifier',
'transaction_currency_id',
'foreign_currency_id',
'foreign_amount',
'reconciled',
];
'account_id',
'transaction_journal_id',
'description',
'amount',
'identifier',
'transaction_currency_id',
'foreign_currency_id',
'foreign_amount',
'reconciled',
];
protected $hidden = ['encrypted'];

View File

@ -299,6 +299,7 @@ class SearchRuleEngine implements RuleEngineInterface
app('log')->debug(sprintf('Now at rule trigger #%d: %s:"%s" (%s).', $ruleTrigger->id, $ruleTrigger->trigger_type, $ruleTrigger->trigger_value, var_export($ruleTrigger->stop_processing, true)));
if (false === $ruleTrigger->active) {
app('log')->debug('Trigger is not active, continue.');
continue;
}
if ('user_action' === $ruleTrigger->trigger_type) {

View File

@ -342,21 +342,7 @@ class FireflyValidator extends Validator
// these triggers need just the word "true":
// TODO create a helper to automatically return these.
$needTrue = [
'reconciled',
'has_attachments',
'has_any_category',
'has_any_budget',
'has_any_bill',
'has_any_tag',
'any_notes',
'any_external_url',
'has_no_attachments',
'has_no_category',
'has_no_budget',
'has_no_bill',
'has_no_tag',
'no_notes',
'no_external_url',
'reconciled', 'has_attachments', 'has_any_category', 'has_any_budget', 'has_any_bill', 'has_any_tag', 'any_notes', 'any_external_url', 'has_no_attachments', 'has_no_category', 'has_no_budget', 'has_no_bill', 'has_no_tag', 'no_notes', 'no_external_url',
'source_is_cash',
'destination_is_cash',
'account_is_cash',