mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-18 10:39:28 +00:00
Merge branch 'release/v6.0.17'
This commit is contained in:
@@ -301,7 +301,6 @@ PUSHER_ID=
|
||||
DEMO_USERNAME=
|
||||
DEMO_PASSWORD=
|
||||
USE_ENCRYPTION=false
|
||||
IS_HEROKU=false
|
||||
FIREFLY_III_LAYOUT=v1
|
||||
|
||||
#
|
||||
|
14
.ci/php-cs-fixer/composer.lock
generated
14
.ci/php-cs-fixer/composer.lock
generated
@@ -379,16 +379,16 @@
|
||||
},
|
||||
{
|
||||
"name": "friendsofphp/php-cs-fixer",
|
||||
"version": "v3.19.2",
|
||||
"version": "v3.21.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
|
||||
"reference": "210dd89560edb27a8e0d5086b734ac5b5fd4e0e4"
|
||||
"reference": "229b55b3eae4729a8e2a321441ba40fcb3720b86"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/210dd89560edb27a8e0d5086b734ac5b5fd4e0e4",
|
||||
"reference": "210dd89560edb27a8e0d5086b734ac5b5fd4e0e4",
|
||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/229b55b3eae4729a8e2a321441ba40fcb3720b86",
|
||||
"reference": "229b55b3eae4729a8e2a321441ba40fcb3720b86",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -398,7 +398,7 @@
|
||||
"doctrine/lexer": "^2 || ^3",
|
||||
"ext-json": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"php": "^7.4 || ^8.0",
|
||||
"php": "^8.0.1",
|
||||
"sebastian/diff": "^4.0 || ^5.0",
|
||||
"symfony/console": "^5.4 || ^6.0",
|
||||
"symfony/event-dispatcher": "^5.4 || ^6.0",
|
||||
@@ -463,7 +463,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.19.2"
|
||||
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.21.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -471,7 +471,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-06-25T16:42:58+00:00"
|
||||
"time": "2023-07-05T21:50:25+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/cache",
|
||||
|
@@ -1,13 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ruleset name="pcsg-generated-ruleset"
|
||||
xmlns="http://pmd.sf.net/ruleset/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
<!--
|
||||
~ phpmd.xml
|
||||
~ Copyright (c) 2023 james@firefly-iii.org
|
||||
~
|
||||
~ This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
~
|
||||
~ This program is free software: you can redistribute it and/or modify
|
||||
~ it under the terms of the GNU Affero General Public License as
|
||||
~ published by the Free Software Foundation, either version 3 of the
|
||||
~ License, or (at your option) any later version.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful,
|
||||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
~ GNU Affero General Public License for more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU Affero General Public License
|
||||
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ruleset name="pcsg-generated-ruleset"
|
||||
xmlns="http://pmd.sf.net/ruleset/1.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
|
||||
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
|
||||
<description>Bla bla</description>
|
||||
|
||||
<!--
|
||||
Commando vanuit firefly directory:
|
||||
<!--
|
||||
Commando vanuit firefly directory:
|
||||
phpmd database,app,tests html /gdrive-all/development/phpmd/phpmd.xml > public/report.html
|
||||
-->
|
||||
|
||||
@@ -15,7 +35,7 @@ phpmd database,app,tests html /gdrive-all/development/phpmd/phpmd.xml > public/r
|
||||
<rule ref="rulesets/controversial.xml">
|
||||
<exclude name="CamelCasePropertyName" />
|
||||
</rule>
|
||||
|
||||
|
||||
<!-- clean code -->
|
||||
<rule ref="rulesets/codesize.xml" />
|
||||
<rule ref="rulesets/design.xml" />
|
||||
@@ -49,4 +69,4 @@ phpmd database,app,tests html /gdrive-all/development/phpmd/phpmd.xml > public/r
|
||||
|
||||
<!-- no this one -->
|
||||
<!--<rule ref="rulesets/cleancode.xml/StaticAccess" />-->
|
||||
</ruleset>
|
||||
</ruleset>
|
||||
|
@@ -1,321 +0,0 @@
|
||||
# You can leave this on "local". If you change it to production most console commands will ask for extra confirmation.
|
||||
# Never set it to "testing".
|
||||
APP_ENV=heroku
|
||||
|
||||
# Set to true if you want to see debug information in error screens.
|
||||
APP_DEBUG=false
|
||||
|
||||
# This should be your email address.
|
||||
# If you use Docker or similar, you can set this variable from a file by using SITE_OWNER_FILE
|
||||
SITE_OWNER=heroku@example.com
|
||||
|
||||
# The encryption key for your sessions. Keep this very secure.
|
||||
# If you generate a new one all existing attachments must be considered LOST.
|
||||
# Change it to a string of exactly 32 chars or use something like `php artisan key:generate` to generate it.
|
||||
# If you use Docker or similar, you can set this variable from a file by using APP_KEY_FILE
|
||||
APP_KEY=7ahyYVPVsmxjdhsweWCauGeJfwc92NP2
|
||||
|
||||
#
|
||||
# Firefly III will launch using this language (for new users and unauthenticated visitors)
|
||||
# For a list of available languages: https://github.com/firefly-iii/firefly-iii/tree/main/resources/lang
|
||||
#
|
||||
# If text is still in English, remember that not everything may have been translated.
|
||||
DEFAULT_LANGUAGE=en_US
|
||||
|
||||
# The locale defines how numbers are formatted.
|
||||
# by default this value is the same as whatever the language is.
|
||||
DEFAULT_LOCALE=equal
|
||||
|
||||
# Change this value to your preferred time zone.
|
||||
# Example: Europe/Amsterdam
|
||||
# For a list of supported time zones, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
TZ=UTC
|
||||
|
||||
# TRUSTED_PROXIES is a useful variable when using Docker and/or a reverse proxy.
|
||||
# Set it to ** and reverse proxies work just fine.
|
||||
TRUSTED_PROXIES=**
|
||||
|
||||
# The log channel defines where your log entries go to.
|
||||
# Several other options exist. You can use 'single' for one big fat error log (not recommended).
|
||||
# Also available are 'syslog', 'errorlog' and 'stdout' which will log to the system itself.
|
||||
# A rotating log option is 'daily', creates 5 files that (surprise) rotate.
|
||||
# Default setting 'stack' will log to 'daily' and to 'stdout' at the same time.
|
||||
|
||||
# - Docker + versions <= 4.8.1.8 and before: use "stdout"
|
||||
# - Docker + versions > 4.8.1.8 : use "docker_out"
|
||||
# - Docker + versions >= 5.1.1 : use "stack"
|
||||
# - For everything else (als not Docker) : use 'stack'
|
||||
|
||||
LOG_CHANNEL=stdout
|
||||
|
||||
# Log level. You can set this from least severe to most severe:
|
||||
# debug, info, notice, warning, error, critical, alert, emergency
|
||||
# If you set it to debug your logs will grow large, and fast. If you set it to emergency probably
|
||||
# nothing will get logged, ever.
|
||||
APP_LOG_LEVEL=notice
|
||||
|
||||
# Database credentials. Make sure the database exists. I recommend a dedicated user for Firefly III
|
||||
# For other database types, please see the FAQ: https://docs.firefly-iii.org/support/faq
|
||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||
# Use "pgsql" for PostgreSQL
|
||||
# Use "mysql" for MySQL and MariaDB.
|
||||
# Use "sqlite" for SQLite.
|
||||
DB_CONNECTION=pgsql
|
||||
|
||||
|
||||
# MySQL supports SSL. You can configure it here.
|
||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||
MYSQL_USE_SSL=false
|
||||
MYSQL_SSL_VERIFY_SERVER_CERT=true
|
||||
# You need to set at least of these options
|
||||
MYSQL_SSL_CAPATH=/etc/ssl/certs/
|
||||
MYSQL_SSL_CA=
|
||||
MYSQL_SSL_CERT=
|
||||
MYSQL_SSL_KEY=
|
||||
MYSQL_SSL_CIPHER=
|
||||
|
||||
# PostgreSQL supports SSL. You can configure it here.
|
||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||
PGSQL_SSL_MODE=prefer
|
||||
PGSQL_SSL_ROOT_CERT=null
|
||||
PGSQL_SSL_CERT=null
|
||||
PGSQL_SSL_KEY=null
|
||||
PGSQL_SSL_CRL_FILE=null
|
||||
|
||||
# If you're looking for performance improvements, you could install memcached.
|
||||
CACHE_DRIVER=file
|
||||
SESSION_DRIVER=file
|
||||
|
||||
# If you set either of these to 'redis', you might want to update these settings too
|
||||
# If you use Docker or similar, you can set REDIS_HOST_FILE, REDIS_PASSWORD_FILE or
|
||||
# REDIS_PORT_FILE to set the value from a file instead of from an environment variable
|
||||
|
||||
# can be tcp, unix or http
|
||||
REDIS_SCHEME=tcp
|
||||
|
||||
# use only when using 'unix' for REDIS_SCHEME. Leave empty otherwise.
|
||||
REDIS_PATH=
|
||||
|
||||
# use only when using 'tcp' or 'http' for REDIS_SCHEME. Leave empty otherwise.
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PORT=6379
|
||||
|
||||
REDIS_PASSWORD=null
|
||||
# always use quotes and make sure redis db "0" and "1" exists. Otherwise change accordingly.
|
||||
REDIS_DB="0"
|
||||
REDIS_CACHE_DB="1"
|
||||
|
||||
# Cookie settings. Should not be necessary to change these.
|
||||
# If you use Docker or similar, you can set COOKIE_DOMAIN_FILE to set
|
||||
# the value from a file instead of from an environment variable
|
||||
COOKIE_PATH="/"
|
||||
COOKIE_DOMAIN=
|
||||
COOKIE_SECURE=false
|
||||
|
||||
# If you want Firefly III to mail you, update these settings
|
||||
# For instructions, see: https://docs.firefly-iii.org/advanced-installation/email
|
||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||
MAIL_MAILER=log
|
||||
MAIL_HOST=null
|
||||
MAIL_PORT=2525
|
||||
MAIL_FROM=changeme@example.com
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
|
||||
# Other mail drivers:
|
||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||
MAILGUN_DOMAIN=
|
||||
MAILGUN_SECRET=
|
||||
|
||||
|
||||
# If you are on EU region in mailgun, use api.eu.mailgun.net, otherwise use api.mailgun.net
|
||||
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
||||
MAILGUN_ENDPOINT=api.mailgun.net
|
||||
|
||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||
MANDRILL_SECRET=
|
||||
SPARKPOST_SECRET=
|
||||
|
||||
|
||||
# Firefly III can send you the following messages
|
||||
SEND_REGISTRATION_MAIL=true
|
||||
SEND_ERROR_MESSAGE=true
|
||||
|
||||
# These messages contain (sensitive) transaction information:
|
||||
SEND_REPORT_JOURNALS=true
|
||||
|
||||
# Set a Mapbox API key here (see mapbox.com) so there might be a map available at various places.
|
||||
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
||||
MAPBOX_API_KEY=
|
||||
|
||||
# The map will default to this location:
|
||||
MAP_DEFAULT_LAT=51.983333
|
||||
MAP_DEFAULT_LONG=5.916667
|
||||
MAP_DEFAULT_ZOOM=6
|
||||
|
||||
# Firefly III currently supports two provider for live Currency Exchange Rates:
|
||||
# "fixer", and "ratesapi".
|
||||
# RatesApi.IO (see https://ratesapi.io) is a FREE and OPEN SOURCE live currency exchange rates,
|
||||
# built compatible with Fixer.IO, based on data published by European Central Bank, and doesn't require API key.
|
||||
CER_PROVIDER=ratesapi
|
||||
|
||||
# If you have select "fixer" as default currency exchange rates,
|
||||
# set a Fixer IO API key here (see https://fixer.io) to enable live currency exchange rates.
|
||||
# Please note that this WILL ONLY WORK FOR PAID fixer.io accounts because they severely limited
|
||||
# the free API up to the point where you might as well offer nothing.
|
||||
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
||||
FIXER_API_KEY=
|
||||
|
||||
# Firefly III has two options for user authentication. "eloquent" is the default,
|
||||
# and "ldap" for LDAP servers.
|
||||
# For full instructions on these settings please visit:
|
||||
# https://docs.firefly-iii.org/advanced-installation/authentication
|
||||
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
||||
LOGIN_PROVIDER=eloquent
|
||||
|
||||
#
|
||||
# It's also possible to change the way users are authenticated. You could use Authelia for example.
|
||||
# Authentication via the REMOTE_USER header is supported. Change the value below to "remote_user_guard".
|
||||
#
|
||||
# If you do this please read the documentation for instructions and warnings:
|
||||
# https://docs.firefly-iii.org/advanced-installation/authentication
|
||||
#
|
||||
# This function is available in Firefly III v5.3.0 and higher.
|
||||
AUTHENTICATION_GUARD=web
|
||||
|
||||
#
|
||||
# Likewise, it's impossible to log out users who's authentication is handled by an external system.
|
||||
# Enter a custom URL here that will force a logout (your authentication provider can tell you).
|
||||
# Setting this variable only works when AUTHENTICATION_GUARD != web
|
||||
#
|
||||
CUSTOM_LOGOUT_URL=
|
||||
|
||||
# LDAP connection configuration
|
||||
# OpenLDAP, FreeIPA or ActiveDirectory
|
||||
# # If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
||||
ADLDAP_CONNECTION_SCHEME=OpenLDAP
|
||||
ADLDAP_AUTO_CONNECT=true
|
||||
|
||||
# LDAP connection settings
|
||||
# You can set the following variables from a file by appending them with _FILE:
|
||||
# ADLDAP_CONTROLLERS, ADLDAP_PORT, ADLDAP_BASEDN
|
||||
ADLDAP_CONTROLLERS=
|
||||
ADLDAP_PORT=389
|
||||
ADLDAP_TIMEOUT=5
|
||||
ADLDAP_BASEDN=""
|
||||
ADLDAP_FOLLOW_REFFERALS=false
|
||||
|
||||
# SSL/TLS settings
|
||||
ADLDAP_USE_SSL=false
|
||||
ADLDAP_USE_TLS=false
|
||||
ADLDAP_SSL_CACERTDIR=
|
||||
ADLDAP_SSL_CACERTFILE=
|
||||
ADLDAP_SSL_CERTFILE=
|
||||
ADLDAP_SSL_KEYFILE=
|
||||
ADLDAP_SSL_CIPHER_SUITE=
|
||||
ADLDAP_SSL_REQUIRE_CERT=
|
||||
|
||||
# You can set the following variables from a file by appending them with _FILE:
|
||||
ADLDAP_ADMIN_USERNAME=
|
||||
ADLDAP_ADMIN_PASSWORD=
|
||||
|
||||
# You can set the following variables from a file by appending them with _FILE:
|
||||
ADLDAP_ACCOUNT_PREFIX=
|
||||
ADLDAP_ACCOUNT_SUFFIX=
|
||||
|
||||
|
||||
# LDAP authentication settings.
|
||||
ADLDAP_PASSWORD_SYNC=false
|
||||
ADLDAP_LOGIN_FALLBACK=false
|
||||
|
||||
ADLDAP_DISCOVER_FIELD=distinguishedname
|
||||
ADLDAP_AUTH_FIELD=distinguishedname
|
||||
|
||||
# Will allow SSO if your server provides an AUTH_USER field.
|
||||
# You can set the following variables from a file by appending them with _FILE:
|
||||
WINDOWS_SSO_ENABLED=false
|
||||
WINDOWS_SSO_DISCOVER=samaccountname
|
||||
WINDOWS_SSO_KEY=AUTH_USER
|
||||
|
||||
# field to sync as local username.
|
||||
# You can set the following variable from a file by appending it with _FILE:
|
||||
ADLDAP_SYNC_FIELD=userprincipalname
|
||||
|
||||
# You can disable the X-Frame-Options header if it interferes with tools like
|
||||
# Organizr. This is at your own risk. Applications running in frames run the risk
|
||||
# of leaking information to their parent frame.
|
||||
DISABLE_FRAME_HEADER=false
|
||||
|
||||
# You can disable the Content Security Policy header when you're using an ancient browser
|
||||
# or any version of Microsoft Edge / Internet Explorer (which amounts to the same thing really)
|
||||
# This leaves you with the risk of not being able to stop XSS bugs should they ever surface.
|
||||
# This is at your own risk.
|
||||
DISABLE_CSP_HEADER=false
|
||||
|
||||
# If you wish to track your own behavior over Firefly III, set valid analytics tracker information here.
|
||||
# Nobody uses this except for me on the demo site. But hey, feel free to use this if you want to.
|
||||
# Do not prepend the TRACKER_URL with http:// or https://
|
||||
# The only tracker supported is Matomo.
|
||||
# You can set the following variables from a file by appending them with _FILE:
|
||||
TRACKER_SITE_ID=
|
||||
TRACKER_URL=
|
||||
|
||||
# You can fine tune the start-up of a Docker container by editing these environment variables.
|
||||
# Use this at your own risk. Disabling certain checks and features may result in lost of inconsistent data.
|
||||
# However if you know what you're doing you can significantly speed up container start times.
|
||||
# Set each value to true to enable, or false to disable.
|
||||
|
||||
# Check if the SQLite database exists. Can be skipped if you're not using SQLite.
|
||||
# Won't significantly speed up things.
|
||||
DKR_CHECK_SQLITE=true
|
||||
|
||||
# Run database creation and migration commands. Disable this only if you're 100% sure the DB exists
|
||||
# and is up to date.
|
||||
DKR_RUN_MIGRATION=true
|
||||
|
||||
# Run database upgrade commands. Disable this only when you're 100% sure your DB is up-to-date
|
||||
# with the latest fixes (outside of migrations!)
|
||||
DKR_RUN_UPGRADE=true
|
||||
|
||||
# Verify database integrity. Includes all data checks and verifications.
|
||||
# Disabling this makes Firefly III assume your DB is intact.
|
||||
DKR_RUN_VERIFY=true
|
||||
|
||||
# Run database reporting commands. When disabled, Firefly III won't go over your data to report current state.
|
||||
# Disabling this should have no impact on data integrity or safety but it won't warn you of possible issues.
|
||||
DKR_RUN_REPORT=true
|
||||
|
||||
# Generate OAuth2 keys.
|
||||
# When disabled, Firefly III won't attempt to generate OAuth2 Passport keys. This won't be an issue, IFF (if and only if)
|
||||
# you had previously generated keys already and they're stored in your database for restoration.
|
||||
DKR_RUN_PASSPORT_INSTALL=true
|
||||
|
||||
# Leave the following configuration vars as is.
|
||||
# Unless you like to tinker and know what you're doing.
|
||||
APP_NAME=FireflyIII
|
||||
ADLDAP_CONNECTION=default
|
||||
BROADCAST_DRIVER=log
|
||||
QUEUE_DRIVER=sync
|
||||
CACHE_PREFIX=firefly
|
||||
SEARCH_RESULT_LIMIT=50
|
||||
PUSHER_KEY=
|
||||
PUSHER_SECRET=
|
||||
PUSHER_ID=
|
||||
DEMO_USERNAME=
|
||||
DEMO_PASSWORD=
|
||||
USE_ENCRYPTION=false
|
||||
IS_HEROKU=false
|
||||
FIREFLY_III_LAYOUT=v1
|
||||
|
||||
#
|
||||
# If you have trouble configuring your Firefly III installation, DON'T BOTHER setting this variable.
|
||||
# It won't work. It doesn't do ANYTHING. Don't believe the lies you read online. I'm not joking.
|
||||
# This configuration value WILL NOT HELP.
|
||||
#
|
||||
# This variable is ONLY used in some of the emails Firefly III sends around. Nowhere else.
|
||||
# So when configuring anything WEB related this variable doesn't do anything. Nothing
|
||||
#
|
||||
# If you're stuck I understand you get desperate but look SOMEWHERE ELSE.
|
||||
#
|
||||
APP_URL=http://localhost
|
@@ -1,32 +0,0 @@
|
||||
bg_BG
|
||||
ca_ES
|
||||
cs_CZ
|
||||
da_DK
|
||||
de_DE
|
||||
el_GR
|
||||
en_GB
|
||||
en_US
|
||||
es_ES
|
||||
fi_FI
|
||||
fr_FR
|
||||
hu_HU
|
||||
id_ID
|
||||
it_IT
|
||||
ja_JP
|
||||
ko_KR
|
||||
nb_NO
|
||||
nl_NL
|
||||
nn_NO
|
||||
pl_PL
|
||||
pt_BR
|
||||
pt_PT
|
||||
ro_RO
|
||||
ru_RU
|
||||
sk_SK
|
||||
sl_SI
|
||||
sv_SE
|
||||
tr_TR
|
||||
uk_UA
|
||||
vi_VN
|
||||
zh-hans_CN
|
||||
zh-hant_CN
|
@@ -241,7 +241,7 @@ ALLOW_WEBHOOKS=false
|
||||
#
|
||||
# The static cron job token can be useful when you use Docker and wish to manage cron jobs.
|
||||
# 1. Set this token to any 32-character value (this is important!).
|
||||
# 2. Use this token in the cron URL instead of a user's command line token.
|
||||
# 2. Use this token in the cron URL instead of a user's command line token that you can find in /profile
|
||||
#
|
||||
# For more info: https://docs.firefly-iii.org/firefly-iii/advanced-installation/cron/
|
||||
#
|
||||
@@ -298,7 +298,6 @@ PUSHER_SECRET=
|
||||
PUSHER_ID=
|
||||
DEMO_USERNAME=
|
||||
DEMO_PASSWORD=
|
||||
IS_HEROKU=false
|
||||
FIREFLY_III_LAYOUT=v1
|
||||
|
||||
#
|
||||
|
28
.github/workflows/sonarcloud.yml
vendored
28
.github/workflows/sonarcloud.yml
vendored
@@ -1,5 +1,6 @@
|
||||
name: Sonarcloud
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
@@ -12,6 +13,33 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup PHP with Xdebug
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.2'
|
||||
coverage: xdebug
|
||||
|
||||
- name: Install Composer dependencies
|
||||
run: composer install --prefer-dist --no-interaction --no-progress --no-scripts
|
||||
|
||||
- name: Copy environment file
|
||||
run: cp .env.example .env
|
||||
|
||||
- name: Generate app key
|
||||
run: php artisan key:generate
|
||||
|
||||
- name: "Run tests with coverage"
|
||||
run: composer coverage
|
||||
|
||||
- name: Fix code coverage paths
|
||||
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml
|
||||
|
||||
- name: SonarCloud Scan
|
||||
uses: SonarSource/sonarcloud-github-action@master
|
||||
env:
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -7,4 +7,4 @@ npm-debug.log
|
||||
yarn-error.log
|
||||
.env
|
||||
/.ci/php-cs-fixer/vendor
|
||||
/.ci/coverage
|
||||
coverage.xml
|
||||
|
65
app.json
65
app.json
@@ -1,65 +0,0 @@
|
||||
{
|
||||
"name": "Firefly III",
|
||||
"description": "A free and open source personal finances manager",
|
||||
"repository": "https://github.com/firefly-iii/firefly-iii",
|
||||
"website": "https://firefly-iii.org/",
|
||||
"logo": "https://raw.githubusercontent.com/firefly-iii/firefly-iii/main/public/mstile-150x150.png",
|
||||
"keywords": [
|
||||
"finance",
|
||||
"finances",
|
||||
"manager",
|
||||
"management",
|
||||
"euro",
|
||||
"dollar",
|
||||
"laravel",
|
||||
"money",
|
||||
"currency",
|
||||
"financials",
|
||||
"financial",
|
||||
"budgets",
|
||||
"administration",
|
||||
"tool",
|
||||
"tooling",
|
||||
"help",
|
||||
"helper",
|
||||
"assistant",
|
||||
"planning",
|
||||
"organizing",
|
||||
"bills",
|
||||
"personal finance",
|
||||
"budgets",
|
||||
"budgeting",
|
||||
"budgeting tool",
|
||||
"budgeting application",
|
||||
"transactions",
|
||||
"self hosted",
|
||||
"self-hosted",
|
||||
"transfers",
|
||||
"management"
|
||||
],
|
||||
"addons": [
|
||||
{
|
||||
"plan": "heroku-postgresql",
|
||||
"options": {
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"scripts": {
|
||||
"postdeploy": "php artisan migrate:refresh --seed;php artisan firefly:instructions install"
|
||||
},
|
||||
"buildpacks": [
|
||||
{
|
||||
"url": "heroku/php"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/heroku/heroku-buildpack-locale"
|
||||
}
|
||||
],
|
||||
"env": {
|
||||
"APP_KEY": {
|
||||
"description": "This key is used to create app cookies en secure attachments.",
|
||||
"value": "base64:If1gJN4pyycXTq+WS5TjneDympKuu+8SKvTl6RZnhJg="
|
||||
}
|
||||
}
|
||||
}
|
@@ -279,6 +279,9 @@ class DestroyController extends Controller
|
||||
$tagRepository->destroyAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
private function destroyObjectGroups(): void
|
||||
{
|
||||
/** @var ObjectGroupRepositoryInterface $repository */
|
||||
|
@@ -29,6 +29,8 @@ use FireflyIII\Api\V1\Requests\Data\Export\ExportRequest;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Support\Export\ExportDataGenerator;
|
||||
use Illuminate\Http\Response as LaravelResponse;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class ExportController
|
||||
@@ -74,6 +76,8 @@ class ExportController extends Controller
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
private function returnExport(string $key): LaravelResponse
|
||||
{
|
||||
|
@@ -37,6 +37,9 @@ use FireflyIII\Models\TransactionGroup;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
/**
|
||||
* Class PurgeController
|
||||
*/
|
||||
class PurgeController extends Controller
|
||||
{
|
||||
/**
|
||||
|
@@ -30,6 +30,9 @@ use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
/**
|
||||
* Class DestroyController
|
||||
*/
|
||||
class DestroyController extends Controller
|
||||
{
|
||||
private LinkTypeRepositoryInterface $repository;
|
||||
|
@@ -37,6 +37,9 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
use League\Fractal\Resource\Collection as FractalCollection;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
/**
|
||||
* Class ShowController
|
||||
*/
|
||||
class ShowController extends Controller
|
||||
{
|
||||
private LinkTypeRepositoryInterface $repository;
|
||||
|
@@ -35,6 +35,9 @@ use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
/**
|
||||
* Class StoreController
|
||||
*/
|
||||
class StoreController extends Controller
|
||||
{
|
||||
use TransactionFilter;
|
||||
|
@@ -34,6 +34,9 @@ use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
/**
|
||||
* Class UpdateController
|
||||
*/
|
||||
class UpdateController extends Controller
|
||||
{
|
||||
private JournalRepositoryInterface $journalRepository;
|
||||
|
@@ -138,7 +138,6 @@ class ConfigurationController extends Controller
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function show(string $configKey): JsonResponse
|
||||
|
@@ -28,6 +28,8 @@ use FireflyIII\Api\V1\Requests\System\CronRequest;
|
||||
use FireflyIII\Support\Http\Controllers\CronRunner;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class CronController
|
||||
@@ -44,6 +46,8 @@ class CronController extends Controller
|
||||
* @param string $token
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function cron(CronRequest $request, string $token): JsonResponse
|
||||
{
|
||||
|
@@ -35,6 +35,9 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
|
||||
use League\Fractal\Resource\Collection as FractalCollection;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
/**
|
||||
* Class MessageController
|
||||
*/
|
||||
class MessageController extends Controller
|
||||
{
|
||||
public const RESOURCE_KEY = 'webhook_messages';
|
||||
|
@@ -127,6 +127,7 @@ class ShowController extends Controller
|
||||
*/
|
||||
public function triggerTransaction(Webhook $webhook, TransactionGroup $group): JsonResponse
|
||||
{
|
||||
app('log')->debug(sprintf('Now in triggerTransaction(%d, %d)', $webhook->id, $group->id));
|
||||
/** @var MessageGeneratorInterface $engine */
|
||||
$engine = app(MessageGeneratorInterface::class);
|
||||
$engine->setUser(auth()->user());
|
||||
@@ -141,6 +142,7 @@ class ShowController extends Controller
|
||||
$engine->generateMessages();
|
||||
|
||||
// trigger event to send them:
|
||||
app('log')->debug('send event RequestedSendWebhookMessages');
|
||||
event(new RequestedSendWebhookMessages());
|
||||
|
||||
return response()->json([], 204);
|
||||
|
@@ -38,6 +38,9 @@ class ExportRequest extends FormRequest
|
||||
use ChecksLogin;
|
||||
use ConvertsDataTypes;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getAll(): array
|
||||
{
|
||||
$result = [
|
||||
|
@@ -59,6 +59,7 @@ class UpdateRequest extends FormRequest
|
||||
* Get all data. Is pretty complex because of all the ??-statements.
|
||||
*
|
||||
* @return array
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function getAll(): array
|
||||
{
|
||||
@@ -152,6 +153,7 @@ class UpdateRequest extends FormRequest
|
||||
* Get transaction data.
|
||||
*
|
||||
* @return array
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function getTransactionData(): array
|
||||
{
|
||||
@@ -322,7 +324,7 @@ class UpdateRequest extends FormRequest
|
||||
|
||||
return [
|
||||
// basic fields for group:
|
||||
'group_title' => 'between:1,1000',
|
||||
'group_title' => 'between:1,1000|nullable',
|
||||
'apply_rules' => [new IsBoolean()],
|
||||
|
||||
// transaction rules (in array for splits):
|
||||
@@ -335,8 +337,8 @@ class UpdateRequest extends FormRequest
|
||||
|
||||
|
||||
// currency info
|
||||
'transactions.*.currency_id' => 'numeric|exists:transaction_currencies,id',
|
||||
'transactions.*.currency_code' => 'min:3|max:51|exists:transaction_currencies,code',
|
||||
'transactions.*.currency_id' => 'numeric|exists:transaction_currencies,id|nullable',
|
||||
'transactions.*.currency_code' => 'min:3|max:51|exists:transaction_currencies,code|nullable',
|
||||
'transactions.*.foreign_currency_id' => 'nullable|numeric|exists:transaction_currencies,id',
|
||||
'transactions.*.foreign_currency_code' => 'nullable|min:3|max:51|exists:transaction_currencies,code',
|
||||
|
||||
@@ -356,9 +358,9 @@ class UpdateRequest extends FormRequest
|
||||
'transactions.*.destination_name' => 'between:1,255|nullable',
|
||||
|
||||
// budget, category, bill and piggy
|
||||
'transactions.*.budget_id' => ['mustExist:budgets,id', new BelongsUser()],
|
||||
'transactions.*.budget_id' => ['mustExist:budgets,id', new BelongsUser(), 'nullable'],
|
||||
'transactions.*.budget_name' => ['between:1,255', 'nullable', new BelongsUser()],
|
||||
'transactions.*.category_id' => ['mustExist:categories,id', new BelongsUser()],
|
||||
'transactions.*.category_id' => ['mustExist:categories,id', new BelongsUser(), 'nullable'],
|
||||
'transactions.*.category_name' => 'between:1,255|nullable',
|
||||
'transactions.*.bill_id' => ['numeric', 'nullable', 'mustExist:bills,id', new BelongsUser()],
|
||||
'transactions.*.bill_name' => ['between:1,255', 'nullable', new BelongsUser()],
|
||||
@@ -366,7 +368,7 @@ class UpdateRequest extends FormRequest
|
||||
// other interesting fields
|
||||
'transactions.*.reconciled' => [new IsBoolean()],
|
||||
'transactions.*.notes' => 'min:1|max:50000|nullable',
|
||||
'transactions.*.tags' => 'between:0,255',
|
||||
'transactions.*.tags' => 'between:0,255|nullable',
|
||||
|
||||
// meta info fields
|
||||
'transactions.*.internal_reference' => 'min:1|max:255|nullable',
|
||||
|
@@ -27,6 +27,9 @@ use FireflyIII\Support\Request\ChecksLogin;
|
||||
use FireflyIII\Support\Request\ConvertsDataTypes;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
/**
|
||||
* Class PreferenceStoreRequest
|
||||
*/
|
||||
class PreferenceStoreRequest extends FormRequest
|
||||
{
|
||||
use ChecksLogin;
|
||||
|
@@ -28,6 +28,9 @@ use FireflyIII\Support\Request\ChecksLogin;
|
||||
use FireflyIII\Support\Request\ConvertsDataTypes;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
/**
|
||||
* Class PreferenceUpdateRequest
|
||||
*/
|
||||
class PreferenceUpdateRequest extends FormRequest
|
||||
{
|
||||
use ChecksLogin;
|
||||
|
@@ -31,6 +31,9 @@ use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
|
||||
/**
|
||||
* Class ListController
|
||||
*/
|
||||
class ListController extends Controller
|
||||
{
|
||||
private BudgetRepositoryInterface $repository;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* ShowController.php
|
||||
* Copyright (c) 2023 james@firefly-iii.org
|
||||
@@ -21,6 +21,8 @@ declare(strict_types=1);
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V2\Controllers\Model\Budget;
|
||||
|
||||
use FireflyIII\Api\V2\Controllers\Controller;
|
||||
@@ -42,8 +44,7 @@ class ShowController extends Controller
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
@@ -59,8 +60,7 @@ class ShowController extends Controller
|
||||
* TODO add URL
|
||||
*
|
||||
*/
|
||||
public function budgeted(DateRequest $request, Budget $budget): JsonResponse
|
||||
{
|
||||
public function budgeted(DateRequest $request, Budget $budget): JsonResponse {
|
||||
$data = $request->getAll();
|
||||
$result = $this->repository->budgetedInPeriodForBudget($budget, $data['start'], $data['end']);
|
||||
$converted = $this->cerSum(array_values($result));
|
||||
@@ -73,8 +73,7 @@ class ShowController extends Controller
|
||||
* TODO add URL
|
||||
*
|
||||
*/
|
||||
public function spent(DateRequest $request, Budget $budget): JsonResponse
|
||||
{
|
||||
public function spent(DateRequest $request, Budget $budget): JsonResponse {
|
||||
$data = $request->getAll();
|
||||
$result = $this->repository->spentInPeriodForBudget($budget, $data['start'], $data['end']);
|
||||
$converted = $this->cerSum(array_values($result));
|
||||
|
@@ -32,6 +32,9 @@ use FireflyIII\Transformers\V2\BudgetLimitTransformer;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
|
||||
/**
|
||||
* Class ListController
|
||||
*/
|
||||
class ListController extends Controller
|
||||
{
|
||||
private BudgetLimitRepositoryInterface $repository;
|
||||
|
@@ -24,6 +24,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V2\Controllers\System;
|
||||
|
||||
/**
|
||||
* Class ConfigurationController
|
||||
*/
|
||||
class ConfigurationController
|
||||
{
|
||||
}
|
||||
|
@@ -26,6 +26,9 @@ namespace FireflyIII\Api\V2\Controllers\System;
|
||||
|
||||
use FireflyIII\Api\V2\Controllers\Controller;
|
||||
|
||||
/**
|
||||
* Class DebugController
|
||||
*/
|
||||
class DebugController extends Controller
|
||||
{
|
||||
}
|
||||
|
@@ -126,6 +126,7 @@ class CorrectOpeningBalanceCurrencies extends Command
|
||||
/**
|
||||
* @param Account $account
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
private function setCorrectCurrency(Account $account, TransactionJournal $journal): int
|
||||
|
@@ -97,6 +97,9 @@ class DeleteEmptyJournals extends Command
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
private function deleteEmptyJournals(): void
|
||||
{
|
||||
$count = 0;
|
||||
|
@@ -65,6 +65,9 @@ class DeleteOrphanedTransactions extends Command
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
private function deleteOrphanedJournals(): void
|
||||
{
|
||||
$set = TransactionJournal::leftJoin('transaction_groups', 'transaction_journals.transaction_group_id', 'transaction_groups.id')
|
||||
|
@@ -89,6 +89,7 @@ class FixAccountTypes extends Command
|
||||
* @param TransactionJournal $journal
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
*/
|
||||
private function inspectJournal(TransactionJournal $journal): void
|
||||
{
|
||||
|
@@ -1,5 +1,26 @@
|
||||
<?php
|
||||
|
||||
|
||||
/*
|
||||
* TriggerCreditCalculation.php
|
||||
* Copyright (c) 2023 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Console\Commands\Correction;
|
||||
@@ -29,6 +50,9 @@ class TriggerCreditCalculation extends Command
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
private function processAccounts(): void
|
||||
{
|
||||
$accounts = Account::leftJoin('account_types', 'accounts.account_type_id', 'account_types.id')
|
||||
|
@@ -38,6 +38,8 @@ use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use InvalidArgumentException;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class ExportData
|
||||
@@ -83,6 +85,8 @@ class ExportData extends Command
|
||||
*
|
||||
* @return int
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
|
@@ -73,6 +73,11 @@ class UpdateGroupInformation extends Command
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param User $user
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function updateGroupInfo(User $user): void
|
||||
{
|
||||
$group = $user->userGroup;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* ShowsFriendlyMessages.php
|
||||
* Copyright (c) 2023 james@firefly-iii.org
|
||||
@@ -21,6 +21,8 @@ declare(strict_types=1);
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Console\Commands;
|
||||
|
||||
/**
|
||||
@@ -30,55 +32,55 @@ trait ShowsFriendlyMessages
|
||||
{
|
||||
/**
|
||||
* @param string $message
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function friendlyError(string $message): void
|
||||
{
|
||||
public function friendlyError(string $message): void {
|
||||
$this->error(sprintf(' [x] %s', trim($message)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function friendlyInfo(string $message): void
|
||||
{
|
||||
public function friendlyInfo(string $message): void {
|
||||
$this->friendlyNeutral($message);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function friendlyNeutral(string $message): void
|
||||
{
|
||||
public function friendlyNeutral(string $message): void {
|
||||
$this->line(sprintf(' [i] %s', trim($message)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function friendlyLine(string $message): void
|
||||
{
|
||||
public function friendlyLine(string $message): void {
|
||||
$this->line(sprintf(' %s', trim($message)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function friendlyPositive(string $message): void
|
||||
{
|
||||
public function friendlyPositive(string $message): void {
|
||||
$this->info(sprintf(' [✓] %s', trim($message)));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $message
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function friendlyWarning(string $message): void
|
||||
{
|
||||
public function friendlyWarning(string $message): void {
|
||||
$this->warn(sprintf(' [!] %s', trim($message)));
|
||||
}
|
||||
|
||||
|
@@ -92,7 +92,6 @@ class ForceDecimalSize extends Command
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
@@ -110,6 +109,9 @@ class ForceDecimalSize extends Command
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
private function determineDatabaseType(): void
|
||||
{
|
||||
// switch stuff based on database connection:
|
||||
@@ -155,6 +157,7 @@ class ForceDecimalSize extends Command
|
||||
* This method loops all enabled currencies and then calls the method that will fix all objects in this currency.
|
||||
*
|
||||
* @return void
|
||||
* @throws FireflyException
|
||||
*/
|
||||
private function correctAmountsByCurrency(): void
|
||||
{
|
||||
|
@@ -32,6 +32,9 @@ use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
/**
|
||||
* Class ForceMigration
|
||||
*/
|
||||
class ForceMigration extends Command
|
||||
{
|
||||
use ShowsFriendlyMessages;
|
||||
@@ -79,6 +82,9 @@ class ForceMigration extends Command
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
private function forceMigration(): void
|
||||
{
|
||||
DB::commit();
|
||||
|
@@ -64,6 +64,8 @@ class Cron extends Command
|
||||
|
||||
/**
|
||||
* @return int
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
|
@@ -35,6 +35,8 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class AccountCurrencies
|
||||
@@ -94,6 +96,8 @@ class AccountCurrencies extends Command
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
private function isExecuted(): bool
|
||||
{
|
||||
|
@@ -24,13 +24,15 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\BudgetLimit;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class AppendBudgetLimitPeriods
|
||||
*/
|
||||
class AppendBudgetLimitPeriods extends Command
|
||||
{
|
||||
use ShowsFriendlyMessages;
|
||||
@@ -54,7 +56,6 @@ class AppendBudgetLimitPeriods extends Command
|
||||
*
|
||||
* @return int
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function handle(): int
|
||||
|
@@ -25,7 +25,6 @@ namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use DB;
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Models\Transaction;
|
||||
@@ -61,7 +60,6 @@ class BackToJournals extends Command
|
||||
*
|
||||
* @return int
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function handle(): int
|
||||
|
@@ -51,6 +51,8 @@ class DecryptDatabase extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
|
@@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Note;
|
||||
use FireflyIII\Models\TransactionJournalMeta;
|
||||
use Illuminate\Console\Command;
|
||||
@@ -58,7 +57,6 @@ class MigrateJournalNotes extends Command
|
||||
*
|
||||
* @return int
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function handle(): int
|
||||
|
@@ -25,7 +25,6 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Recurrence;
|
||||
use FireflyIII\Models\RecurrenceMeta;
|
||||
use FireflyIII\Models\RecurrenceTransactionMeta;
|
||||
@@ -60,7 +59,6 @@ class MigrateRecurrenceMeta extends Command
|
||||
*
|
||||
* @return int
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
|
@@ -25,7 +25,6 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Recurrence;
|
||||
use FireflyIII\Models\RecurrenceTransaction;
|
||||
use FireflyIII\Models\TransactionType;
|
||||
@@ -59,7 +58,6 @@ class MigrateRecurrenceType extends Command
|
||||
*
|
||||
* @return int
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function handle(): int
|
||||
@@ -104,6 +102,7 @@ class MigrateRecurrenceType extends Command
|
||||
|
||||
/**
|
||||
* @param Recurrence $recurrence
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function migrateRecurrence(Recurrence $recurrence): void
|
||||
|
@@ -25,7 +25,6 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Location;
|
||||
use FireflyIII\Models\Tag;
|
||||
use Illuminate\Console\Command;
|
||||
@@ -58,7 +57,6 @@ class MigrateTagLocations extends Command
|
||||
*
|
||||
* @return int
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function handle(): int
|
||||
@@ -89,6 +87,9 @@ class MigrateTagLocations extends Command
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
private function migrateTagLocations(): void
|
||||
{
|
||||
$tags = Tag::get();
|
||||
|
@@ -64,6 +64,8 @@ class MigrateToGroups extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
|
@@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Models\Transaction;
|
||||
@@ -61,7 +60,6 @@ class OtherCurrenciesCorrections extends Command
|
||||
*
|
||||
* @return int
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function handle(): int
|
||||
|
@@ -62,6 +62,8 @@ class TransferCurrenciesCorrections extends Command
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return int
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
|
@@ -25,7 +25,6 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Factory\AccountMetaFactory;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\Transaction;
|
||||
@@ -53,7 +52,6 @@ class UpgradeLiabilities extends Command
|
||||
*
|
||||
* @return int
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function handle(): int
|
||||
|
@@ -25,7 +25,6 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Console\Commands\Upgrade;
|
||||
|
||||
use FireflyIII\Console\Commands\ShowsFriendlyMessages;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Models\Account;
|
||||
use FireflyIII\Models\AccountType;
|
||||
use FireflyIII\Models\Transaction;
|
||||
@@ -56,7 +55,6 @@ class UpgradeLiabilitiesEight extends Command
|
||||
*
|
||||
* @return int
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws FireflyException
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function handle(): int
|
||||
|
@@ -24,6 +24,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Enums;
|
||||
|
||||
/**
|
||||
* Class RecurrenceRepetitionWeekend
|
||||
*/
|
||||
enum RecurrenceRepetitionWeekend: int
|
||||
{
|
||||
case WEEKEND_DO_NOTHING = 1;
|
||||
|
@@ -24,6 +24,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Enums;
|
||||
|
||||
/**
|
||||
* Class UserRoleEnum
|
||||
*/
|
||||
enum UserRoleEnum: string
|
||||
{
|
||||
case CHANGE_PIGGY_BANKS = 'change_piggies';
|
||||
|
@@ -24,6 +24,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Enums;
|
||||
|
||||
/**
|
||||
* Class WebhookDelivery
|
||||
*/
|
||||
enum WebhookDelivery: int
|
||||
{
|
||||
//case XML = 200;
|
||||
|
@@ -24,6 +24,9 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Enums;
|
||||
|
||||
/**
|
||||
* Class WebhookResponse
|
||||
*/
|
||||
enum WebhookResponse: int
|
||||
{
|
||||
case TRANSACTIONS = 200;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Created.php
|
||||
* Copyright (c) 2023 james@firefly-iii.org
|
||||
@@ -21,6 +21,8 @@ declare(strict_types=1);
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Events\Model\BudgetLimit;
|
||||
|
||||
use FireflyIII\Events\Event;
|
||||
@@ -39,8 +41,7 @@ class Created extends Event
|
||||
/**
|
||||
* @param BudgetLimit $budgetLimit
|
||||
*/
|
||||
public function __construct(BudgetLimit $budgetLimit)
|
||||
{
|
||||
public function __construct(BudgetLimit $budgetLimit) {
|
||||
$this->budgetLimit = $budgetLimit;
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Created.php
|
||||
* Deleted.php
|
||||
* Copyright (c) 2023 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
@@ -21,6 +21,8 @@ declare(strict_types=1);
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Events\Model\BudgetLimit;
|
||||
|
||||
use FireflyIII\Events\Event;
|
||||
@@ -39,8 +41,7 @@ class Deleted extends Event
|
||||
/**
|
||||
* @param BudgetLimit $budgetLimit
|
||||
*/
|
||||
public function __construct(BudgetLimit $budgetLimit)
|
||||
{
|
||||
public function __construct(BudgetLimit $budgetLimit) {
|
||||
$this->budgetLimit = $budgetLimit;
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* Created.php
|
||||
* Updated.php
|
||||
* Copyright (c) 2023 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
@@ -21,6 +21,8 @@ declare(strict_types=1);
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Events\Model\BudgetLimit;
|
||||
|
||||
use FireflyIII\Events\Event;
|
||||
@@ -39,8 +41,7 @@ class Updated extends Event
|
||||
/**
|
||||
* @param BudgetLimit $budgetLimit
|
||||
*/
|
||||
public function __construct(BudgetLimit $budgetLimit)
|
||||
{
|
||||
public function __construct(BudgetLimit $budgetLimit) {
|
||||
$this->budgetLimit = $budgetLimit;
|
||||
}
|
||||
}
|
||||
|
@@ -26,6 +26,9 @@ namespace FireflyIII\Events;
|
||||
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
/**
|
||||
* Class NewVersionAvailable
|
||||
*/
|
||||
class NewVersionAvailable extends Event
|
||||
{
|
||||
use SerializesModels;
|
||||
|
@@ -25,6 +25,9 @@ namespace FireflyIII\Events;
|
||||
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
/**
|
||||
* Class RequestedSendWebhookMessages
|
||||
*/
|
||||
class RequestedSendWebhookMessages extends Event
|
||||
{
|
||||
use SerializesModels;
|
||||
|
@@ -416,6 +416,7 @@ class TransactionJournalFactory
|
||||
/**
|
||||
* @param Account|null $sourceAccount
|
||||
* @param Account|null $destinationAccount
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function reconciliationSanityCheck(?Account $sourceAccount, ?Account $destinationAccount): array
|
||||
@@ -457,7 +458,7 @@ class TransactionJournalFactory
|
||||
Log::debug('Now in getCurrencyByAccount()');
|
||||
|
||||
return match ($type) {
|
||||
default => $this->getCurrency($currency, $source),
|
||||
default => $this->getCurrency($currency, $source),
|
||||
TransactionType::DEPOSIT => $this->getCurrency($currency, $destination),
|
||||
};
|
||||
}
|
||||
|
@@ -58,6 +58,7 @@ interface MessageGeneratorInterface
|
||||
|
||||
/**
|
||||
* @param Collection $webhooks
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setWebhooks(Collection $webhooks): void;
|
||||
|
@@ -103,6 +103,7 @@ class StandardMessageGenerator implements MessageGeneratorInterface
|
||||
|
||||
/**
|
||||
* @param Webhook $webhook
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
*/
|
||||
@@ -118,6 +119,7 @@ class StandardMessageGenerator implements MessageGeneratorInterface
|
||||
/**
|
||||
* @param Webhook $webhook
|
||||
* @param Model $model
|
||||
*
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
*/
|
||||
|
@@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Handlers\Events;
|
||||
|
||||
use Exception;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Notifications\User\NewAccessToken;
|
||||
use FireflyIII\Repositories\User\UserRepositoryInterface;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
@@ -41,7 +40,6 @@ class APIEventHandler
|
||||
*
|
||||
* @param AccessTokenCreated $event
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function accessTokenCreated(AccessTokenCreated $event): void
|
||||
{
|
||||
|
@@ -42,6 +42,7 @@ class AdminEventHandler
|
||||
{
|
||||
/**
|
||||
* @param InvitationCreated $event
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function sendInvitationNotification(InvitationCreated $event): void
|
||||
@@ -79,6 +80,7 @@ class AdminEventHandler
|
||||
* Send new version message to admin.
|
||||
*
|
||||
* @param NewVersionAvailable $event
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function sendNewVersion(NewVersionAvailable $event): void
|
||||
|
@@ -42,6 +42,7 @@ class AutomationHandler
|
||||
* Respond to the creation of X journals.
|
||||
*
|
||||
* @param RequestedReportOnJournals $event
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function reportJournals(RequestedReportOnJournals $event): void
|
||||
|
@@ -38,6 +38,7 @@ class BillEventHandler
|
||||
{
|
||||
/**
|
||||
* @param WarnUserAboutBill $event
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function warnAboutBill(WarnUserAboutBill $event): void
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* BudgetLimitHandler.php
|
||||
* Copyright (c) 2023 james@firefly-iii.org
|
||||
@@ -21,6 +21,8 @@ declare(strict_types=1);
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Handlers\Events\Model;
|
||||
|
||||
use FireflyIII\Events\Model\BudgetLimit\Created;
|
||||
@@ -44,20 +46,20 @@ class BudgetLimitHandler
|
||||
{
|
||||
/**
|
||||
* @param Created $event
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function created(Created $event): void
|
||||
{
|
||||
public function created(Created $event): void {
|
||||
Log::debug(sprintf('BudgetLimitHandler::created(#%s)', $event->budgetLimit->id));
|
||||
$this->updateAvailableBudget($event->budgetLimit);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param BudgetLimit $budgetLimit
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function updateAvailableBudget(BudgetLimit $budgetLimit): void
|
||||
{
|
||||
private function updateAvailableBudget(BudgetLimit $budgetLimit): void {
|
||||
Log::debug(sprintf('Now in updateAvailableBudget(#%d)', $budgetLimit->id));
|
||||
|
||||
// based on the view range of the user (month week quarter etc) the budget limit could
|
||||
@@ -140,10 +142,10 @@ class BudgetLimitHandler
|
||||
|
||||
/**
|
||||
* @param AvailableBudget $availableBudget
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function calculateAmount(AvailableBudget $availableBudget): void
|
||||
{
|
||||
private function calculateAmount(AvailableBudget $availableBudget): void {
|
||||
$repository = app(BudgetLimitRepositoryInterface::class);
|
||||
$repository->setUser($availableBudget->user);
|
||||
$newAmount = '0';
|
||||
@@ -171,8 +173,8 @@ class BudgetLimitHandler
|
||||
);
|
||||
// overlap in days:
|
||||
$limitPeriod = Period::make(
|
||||
$budgetLimit->start_date,
|
||||
$budgetLimit->end_date,
|
||||
$budgetLimit->start_date,
|
||||
$budgetLimit->end_date,
|
||||
precision : Precision::DAY(),
|
||||
boundaries: Boundaries::EXCLUDE_NONE()
|
||||
);
|
||||
@@ -205,16 +207,16 @@ class BudgetLimitHandler
|
||||
|
||||
/**
|
||||
* @param BudgetLimit $budgetLimit
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getDailyAmount(BudgetLimit $budgetLimit): string
|
||||
{
|
||||
private function getDailyAmount(BudgetLimit $budgetLimit): string {
|
||||
if (0 === (int)$budgetLimit->id) {
|
||||
return '0';
|
||||
}
|
||||
$limitPeriod = Period::make(
|
||||
$budgetLimit->start_date,
|
||||
$budgetLimit->end_date,
|
||||
$budgetLimit->start_date,
|
||||
$budgetLimit->end_date,
|
||||
precision : Precision::DAY(),
|
||||
boundaries: Boundaries::EXCLUDE_NONE()
|
||||
);
|
||||
@@ -228,10 +230,10 @@ class BudgetLimitHandler
|
||||
|
||||
/**
|
||||
* @param Deleted $event
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function deleted(Deleted $event): void
|
||||
{
|
||||
public function deleted(Deleted $event): void {
|
||||
Log::debug(sprintf('BudgetLimitHandler::deleted(#%s)', $event->budgetLimit->id));
|
||||
$budgetLimit = $event->budgetLimit;
|
||||
$budgetLimit->id = null;
|
||||
@@ -240,10 +242,10 @@ class BudgetLimitHandler
|
||||
|
||||
/**
|
||||
* @param Updated $event
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function updated(Updated $event): void
|
||||
{
|
||||
public function updated(Updated $event): void {
|
||||
Log::debug(sprintf('BudgetLimitHandler::updated(#%s)', $event->budgetLimit->id));
|
||||
$this->updateAvailableBudget($event->budgetLimit);
|
||||
}
|
||||
|
@@ -35,6 +35,7 @@ class PiggyBankEventHandler
|
||||
{
|
||||
/**
|
||||
* @param ChangedPiggyBankAmount $event
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function changePiggyAmount(ChangedPiggyBankAmount $event): void
|
||||
@@ -45,7 +46,6 @@ class PiggyBankEventHandler
|
||||
$journal = $event->transactionGroup->transactionJournals()->first();
|
||||
}
|
||||
$date = $journal?->date ?? today(config('app.timezone'));
|
||||
|
||||
// sanity check: event must not already exist for this journal and piggy bank.
|
||||
if (null !== $journal) {
|
||||
$exists = PiggyBankEvent::where('piggy_bank_id', $event->piggyBank->id)
|
||||
|
@@ -329,6 +329,7 @@ class UserEventHandler
|
||||
|
||||
/**
|
||||
* @param InvitationCreated $event
|
||||
*
|
||||
* @return void
|
||||
* @throws FireflyException
|
||||
*/
|
||||
@@ -376,6 +377,7 @@ class UserEventHandler
|
||||
|
||||
/**
|
||||
* @param ActuallyLoggedIn $event
|
||||
*
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function storeUserIPAddress(ActuallyLoggedIn $event): void
|
||||
|
@@ -38,6 +38,7 @@ trait AttachmentCollection
|
||||
{
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNameContains(string $name): GroupCollectorInterface
|
||||
@@ -116,6 +117,7 @@ trait AttachmentCollection
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNameDoesNotContain(string $name): GroupCollectorInterface
|
||||
@@ -145,6 +147,7 @@ trait AttachmentCollection
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNameDoesNotEnd(string $name): GroupCollectorInterface
|
||||
@@ -174,6 +177,7 @@ trait AttachmentCollection
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNameDoesNotStart(string $name): GroupCollectorInterface
|
||||
@@ -203,6 +207,7 @@ trait AttachmentCollection
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNameEnds(string $name): GroupCollectorInterface
|
||||
@@ -232,6 +237,7 @@ trait AttachmentCollection
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNameIs(string $name): GroupCollectorInterface
|
||||
@@ -258,6 +264,7 @@ trait AttachmentCollection
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNameIsNot(string $name): GroupCollectorInterface
|
||||
@@ -284,6 +291,7 @@ trait AttachmentCollection
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNameStarts(string $name): GroupCollectorInterface
|
||||
@@ -313,6 +321,7 @@ trait AttachmentCollection
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNotesAre(string $value): GroupCollectorInterface
|
||||
@@ -339,6 +348,7 @@ trait AttachmentCollection
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNotesAreNot(string $value): GroupCollectorInterface
|
||||
@@ -365,6 +375,7 @@ trait AttachmentCollection
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNotesContains(string $value): GroupCollectorInterface
|
||||
@@ -391,6 +402,7 @@ trait AttachmentCollection
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNotesDoNotContain(string $value): GroupCollectorInterface
|
||||
@@ -417,6 +429,7 @@ trait AttachmentCollection
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNotesDoNotEnd(string $value): GroupCollectorInterface
|
||||
@@ -443,6 +456,7 @@ trait AttachmentCollection
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNotesDoNotStart(string $value): GroupCollectorInterface
|
||||
@@ -469,6 +483,7 @@ trait AttachmentCollection
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNotesEnds(string $value): GroupCollectorInterface
|
||||
@@ -495,6 +510,7 @@ trait AttachmentCollection
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNotesStarts(string $value): GroupCollectorInterface
|
||||
|
@@ -320,6 +320,7 @@ trait MetaCollection
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalUrlContains(string $url): GroupCollectorInterface
|
||||
@@ -335,6 +336,7 @@ trait MetaCollection
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalUrlDoesNotContain(string $url): GroupCollectorInterface
|
||||
@@ -350,6 +352,7 @@ trait MetaCollection
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalUrlDoesNotEnd(string $url): GroupCollectorInterface
|
||||
@@ -365,6 +368,7 @@ trait MetaCollection
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalUrlDoesNotStart(string $url): GroupCollectorInterface
|
||||
@@ -382,6 +386,7 @@ trait MetaCollection
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalUrlEnds(string $url): GroupCollectorInterface
|
||||
@@ -397,6 +402,7 @@ trait MetaCollection
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalUrlStarts(string $url): GroupCollectorInterface
|
||||
|
@@ -34,6 +34,7 @@ trait TimeCollection
|
||||
{
|
||||
/**
|
||||
* @param string $day
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function dayAfter(string $day): GroupCollectorInterface
|
||||
@@ -44,6 +45,7 @@ trait TimeCollection
|
||||
|
||||
/**
|
||||
* @param string $day
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function dayBefore(string $day): GroupCollectorInterface
|
||||
@@ -54,6 +56,7 @@ trait TimeCollection
|
||||
|
||||
/**
|
||||
* @param string $day
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function dayIs(string $day): GroupCollectorInterface
|
||||
@@ -64,6 +67,7 @@ trait TimeCollection
|
||||
|
||||
/**
|
||||
* @param string $day
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function dayIsNot(string $day): GroupCollectorInterface
|
||||
@@ -76,6 +80,7 @@ trait TimeCollection
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function excludeMetaDateRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface
|
||||
@@ -118,6 +123,7 @@ trait TimeCollection
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function excludeObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface
|
||||
@@ -134,6 +140,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function excludeRange(Carbon $start, Carbon $end): GroupCollectorInterface
|
||||
@@ -153,6 +160,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $day
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaDayAfter(string $day, string $field): GroupCollectorInterface
|
||||
@@ -176,6 +184,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $day
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaDayBefore(string $day, string $field): GroupCollectorInterface
|
||||
@@ -199,6 +208,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $day
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaDayIs(string $day, string $field): GroupCollectorInterface
|
||||
@@ -221,6 +231,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $day
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaDayIsNot(string $day, string $field): GroupCollectorInterface
|
||||
@@ -243,6 +254,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $month
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaMonthAfter(string $month, string $field): GroupCollectorInterface
|
||||
@@ -266,6 +278,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $month
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaMonthBefore(string $month, string $field): GroupCollectorInterface
|
||||
@@ -289,6 +302,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $month
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaMonthIs(string $month, string $field): GroupCollectorInterface
|
||||
@@ -311,6 +325,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $month
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaMonthIsNot(string $month, string $field): GroupCollectorInterface
|
||||
@@ -333,6 +348,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $year
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaYearAfter(string $year, string $field): GroupCollectorInterface
|
||||
@@ -356,6 +372,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $year
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaYearBefore(string $year, string $field): GroupCollectorInterface
|
||||
@@ -379,6 +396,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $year
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaYearIs(string $year, string $field): GroupCollectorInterface
|
||||
@@ -402,6 +420,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $year
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaYearIsNot(string $year, string $field): GroupCollectorInterface
|
||||
@@ -423,6 +442,7 @@ trait TimeCollection
|
||||
|
||||
/**
|
||||
* @param string $month
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function monthAfter(string $month): GroupCollectorInterface
|
||||
@@ -433,6 +453,7 @@ trait TimeCollection
|
||||
|
||||
/**
|
||||
* @param string $month
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function monthBefore(string $month): GroupCollectorInterface
|
||||
@@ -443,6 +464,7 @@ trait TimeCollection
|
||||
|
||||
/**
|
||||
* @param string $month
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function monthIs(string $month): GroupCollectorInterface
|
||||
@@ -453,6 +475,7 @@ trait TimeCollection
|
||||
|
||||
/**
|
||||
* @param string $month
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function monthIsNot(string $month): GroupCollectorInterface
|
||||
@@ -464,6 +487,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $day
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectDayAfter(string $day, string $field): GroupCollectorInterface
|
||||
@@ -475,6 +499,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $day
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectDayBefore(string $day, string $field): GroupCollectorInterface
|
||||
@@ -486,6 +511,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $day
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectDayIs(string $day, string $field): GroupCollectorInterface
|
||||
@@ -497,6 +523,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $day
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectDayIsNot(string $day, string $field): GroupCollectorInterface
|
||||
@@ -508,6 +535,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $month
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectMonthAfter(string $month, string $field): GroupCollectorInterface
|
||||
@@ -519,6 +547,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $month
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectMonthBefore(string $month, string $field): GroupCollectorInterface
|
||||
@@ -530,6 +559,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $month
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectMonthIs(string $month, string $field): GroupCollectorInterface
|
||||
@@ -541,6 +571,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $month
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectMonthIsNot(string $month, string $field): GroupCollectorInterface
|
||||
@@ -552,6 +583,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $year
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectYearAfter(string $year, string $field): GroupCollectorInterface
|
||||
@@ -563,6 +595,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $year
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectYearBefore(string $year, string $field): GroupCollectorInterface
|
||||
@@ -574,6 +607,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $year
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectYearIs(string $year, string $field): GroupCollectorInterface
|
||||
@@ -585,6 +619,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param string $year
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectYearIsNot(string $year, string $field): GroupCollectorInterface
|
||||
@@ -643,6 +678,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param Carbon $date
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setMetaAfter(Carbon $date, string $field): GroupCollectorInterface
|
||||
@@ -667,6 +703,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param Carbon $date
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setMetaBefore(Carbon $date, string $field): GroupCollectorInterface
|
||||
@@ -691,6 +728,7 @@ trait TimeCollection
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setMetaDateRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface
|
||||
@@ -720,6 +758,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param Carbon $date
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setObjectAfter(Carbon $date, string $field): GroupCollectorInterface
|
||||
@@ -733,6 +772,7 @@ trait TimeCollection
|
||||
/**
|
||||
* @param Carbon $date
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setObjectBefore(Carbon $date, string $field): GroupCollectorInterface
|
||||
@@ -746,6 +786,7 @@ trait TimeCollection
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface
|
||||
@@ -800,6 +841,7 @@ trait TimeCollection
|
||||
|
||||
/**
|
||||
* @param string $year
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function yearAfter(string $year): GroupCollectorInterface
|
||||
@@ -810,6 +852,7 @@ trait TimeCollection
|
||||
|
||||
/**
|
||||
* @param string $year
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function yearBefore(string $year): GroupCollectorInterface
|
||||
@@ -820,6 +863,7 @@ trait TimeCollection
|
||||
|
||||
/**
|
||||
* @param string $year
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function yearIs(string $year): GroupCollectorInterface
|
||||
@@ -830,6 +874,7 @@ trait TimeCollection
|
||||
|
||||
/**
|
||||
* @param string $year
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function yearIsNot(string $year): GroupCollectorInterface
|
||||
|
@@ -480,6 +480,7 @@ class GroupCollector implements GroupCollectorInterface
|
||||
* Return the groups.
|
||||
*
|
||||
* @return Collection
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function getGroups(): Collection
|
||||
{
|
||||
@@ -663,6 +664,7 @@ class GroupCollector implements GroupCollectorInterface
|
||||
|
||||
/**
|
||||
* @param array $array
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function convertToStrings(array $array): array
|
||||
@@ -771,6 +773,7 @@ class GroupCollector implements GroupCollectorInterface
|
||||
|
||||
/**
|
||||
* @param Collection $collection
|
||||
*
|
||||
* @return Collection
|
||||
*/
|
||||
private function postFilterCollection(Collection $collection): Collection
|
||||
|
@@ -75,120 +75,140 @@ interface GroupCollectorInterface
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNameContains(string $name): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNameDoesNotContain(string $name): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNameDoesNotEnd(string $name): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNameDoesNotStart(string $name): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNameEnds(string $name): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNameIs(string $name): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNameIsNot(string $name): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNameStarts(string $name): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNotesAre(string $value): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNotesAreNot(string $value): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNotesContains(string $value): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNotesDoNotContain(string $value): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNotesDoNotEnd(string $value): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNotesDoNotStart(string $value): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNotesEnds(string $value): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function attachmentNotesStarts(string $value): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $day
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function dayAfter(string $day): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $day
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function dayBefore(string $day): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $day
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function dayIs(string $day): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $day
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function dayIsNot(string $day): GroupCollectorInterface;
|
||||
@@ -287,6 +307,7 @@ interface GroupCollectorInterface
|
||||
* Exclude a set of categories.
|
||||
*
|
||||
* @param Collection $categories
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function excludeCategories(Collection $categories): GroupCollectorInterface;
|
||||
@@ -329,6 +350,7 @@ interface GroupCollectorInterface
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function excludeExternalUrl(string $url): GroupCollectorInterface;
|
||||
@@ -373,6 +395,7 @@ interface GroupCollectorInterface
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function excludeMetaDateRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface;
|
||||
@@ -381,6 +404,7 @@ interface GroupCollectorInterface
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function excludeObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface;
|
||||
@@ -388,6 +412,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function excludeRange(Carbon $start, Carbon $end): GroupCollectorInterface;
|
||||
@@ -433,72 +458,84 @@ interface GroupCollectorInterface
|
||||
|
||||
/**
|
||||
* @param string $externalId
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalIdContains(string $externalId): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $externalId
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalIdDoesNotContain(string $externalId): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $externalId
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalIdDoesNotEnd(string $externalId): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $externalId
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalIdDoesNotStart(string $externalId): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $externalId
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalIdEnds(string $externalId): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $externalId
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalIdStarts(string $externalId): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalUrlContains(string $url): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalUrlDoesNotContain(string $url): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalUrlDoesNotEnd(string $url): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalUrlDoesNotStart(string $url): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalUrlEnds(string $url): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function externalUrlStarts(string $url): GroupCollectorInterface;
|
||||
@@ -588,36 +625,42 @@ interface GroupCollectorInterface
|
||||
|
||||
/**
|
||||
* @param string $externalId
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function internalReferenceContains(string $externalId): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $externalId
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function internalReferenceDoesNotContain(string $externalId): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $externalId
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function internalReferenceDoesNotEnd(string $externalId): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $externalId
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function internalReferenceDoesNotStart(string $externalId): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $externalId
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function internalReferenceEnds(string $externalId): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $externalId
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function internalReferenceStarts(string $externalId): GroupCollectorInterface;
|
||||
@@ -639,6 +682,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $day
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaDayAfter(string $day, string $field): GroupCollectorInterface;
|
||||
@@ -646,6 +690,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $day
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaDayBefore(string $day, string $field): GroupCollectorInterface;
|
||||
@@ -653,6 +698,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $day
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaDayIs(string $day, string $field): GroupCollectorInterface;
|
||||
@@ -660,6 +706,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $day
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaDayIsNot(string $day, string $field): GroupCollectorInterface;
|
||||
@@ -667,6 +714,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $month
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaMonthAfter(string $month, string $field): GroupCollectorInterface;
|
||||
@@ -674,6 +722,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $month
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaMonthBefore(string $month, string $field): GroupCollectorInterface;
|
||||
@@ -681,6 +730,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $month
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaMonthIs(string $month, string $field): GroupCollectorInterface;
|
||||
@@ -688,6 +738,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $month
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaMonthIsNot(string $month, string $field): GroupCollectorInterface;
|
||||
@@ -695,6 +746,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $year
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaYearAfter(string $year, string $field): GroupCollectorInterface;
|
||||
@@ -702,6 +754,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $year
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaYearBefore(string $year, string $field): GroupCollectorInterface;
|
||||
@@ -709,6 +762,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $year
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaYearIs(string $year, string $field): GroupCollectorInterface;
|
||||
@@ -716,30 +770,35 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $year
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function metaYearIsNot(string $year, string $field): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $month
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function monthAfter(string $month): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $month
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function monthBefore(string $month): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $month
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function monthIs(string $month): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $month
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function monthIsNot(string $month): GroupCollectorInterface;
|
||||
@@ -767,6 +826,7 @@ interface GroupCollectorInterface
|
||||
|
||||
/**
|
||||
* @param string $value
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function notesDontStartWith(string $value): GroupCollectorInterface;
|
||||
@@ -802,6 +862,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $day
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectDayAfter(string $day, string $field): GroupCollectorInterface;
|
||||
@@ -809,6 +870,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $day
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectDayBefore(string $day, string $field): GroupCollectorInterface;
|
||||
@@ -816,6 +878,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $day
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectDayIs(string $day, string $field): GroupCollectorInterface;
|
||||
@@ -823,6 +886,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $day
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectDayIsNot(string $day, string $field): GroupCollectorInterface;
|
||||
@@ -830,6 +894,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $month
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectMonthAfter(string $month, string $field): GroupCollectorInterface;
|
||||
@@ -837,6 +902,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $month
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectMonthBefore(string $month, string $field): GroupCollectorInterface;
|
||||
@@ -844,6 +910,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $month
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectMonthIs(string $month, string $field): GroupCollectorInterface;
|
||||
@@ -851,6 +918,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $month
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectMonthIsNot(string $month, string $field): GroupCollectorInterface;
|
||||
@@ -858,6 +926,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $year
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectYearAfter(string $year, string $field): GroupCollectorInterface;
|
||||
@@ -865,6 +934,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $year
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectYearBefore(string $year, string $field): GroupCollectorInterface;
|
||||
@@ -872,6 +942,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $year
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectYearIs(string $year, string $field): GroupCollectorInterface;
|
||||
@@ -879,6 +950,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param string $year
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function objectYearIsNot(string $year, string $field): GroupCollectorInterface;
|
||||
@@ -1011,6 +1083,7 @@ interface GroupCollectorInterface
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setExternalUrl(string $url): GroupCollectorInterface;
|
||||
@@ -1065,6 +1138,7 @@ interface GroupCollectorInterface
|
||||
*
|
||||
* @param Carbon $date
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setMetaAfter(Carbon $date, string $field): GroupCollectorInterface;
|
||||
@@ -1074,6 +1148,7 @@ interface GroupCollectorInterface
|
||||
*
|
||||
* @param Carbon $date
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setMetaBefore(Carbon $date, string $field): GroupCollectorInterface;
|
||||
@@ -1101,6 +1176,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param Carbon $date
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setObjectAfter(Carbon $date, string $field): GroupCollectorInterface;
|
||||
@@ -1108,6 +1184,7 @@ interface GroupCollectorInterface
|
||||
/**
|
||||
* @param Carbon $date
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setObjectBefore(Carbon $date, string $field): GroupCollectorInterface;
|
||||
@@ -1116,6 +1193,7 @@ interface GroupCollectorInterface
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface;
|
||||
@@ -1159,6 +1237,7 @@ interface GroupCollectorInterface
|
||||
|
||||
/**
|
||||
* @param string $sepaCT
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function setSepaCT(string $sepaCT): GroupCollectorInterface;
|
||||
@@ -1332,6 +1411,7 @@ interface GroupCollectorInterface
|
||||
* Transaction must have meta date field X.
|
||||
*
|
||||
* @param string $field
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function withMetaDate(string $field): GroupCollectorInterface;
|
||||
@@ -1397,24 +1477,28 @@ interface GroupCollectorInterface
|
||||
|
||||
/**
|
||||
* @param string $year
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function yearAfter(string $year): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $year
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function yearBefore(string $year): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $year
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function yearIs(string $year): GroupCollectorInterface;
|
||||
|
||||
/**
|
||||
* @param string $year
|
||||
*
|
||||
* @return GroupCollectorInterface
|
||||
*/
|
||||
public function yearIsNot(string $year): GroupCollectorInterface;
|
||||
|
@@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Helpers\Fiscal;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
@@ -48,7 +47,6 @@ class FiscalHelper implements FiscalHelperInterface
|
||||
* @param Carbon $date
|
||||
*
|
||||
* @return Carbon date object
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
|
@@ -49,6 +49,7 @@ interface NetWorthInterface
|
||||
*
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $date
|
||||
*
|
||||
* @return array
|
||||
* @deprecated
|
||||
*/
|
||||
|
@@ -161,6 +161,7 @@ class ReconcileController extends Controller
|
||||
*
|
||||
* @return RedirectResponse|Redirector
|
||||
* @throws DuplicateTransactionException
|
||||
* @throws JsonException
|
||||
*/
|
||||
public function submit(ReconciliationStoreRequest $request, Account $account, Carbon $start, Carbon $end)
|
||||
{
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers\Admin;
|
||||
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Http\Middleware\IsDemoUser;
|
||||
use FireflyIII\Http\Requests\ConfigurationRequest;
|
||||
@@ -63,7 +62,6 @@ class ConfigurationController extends Controller
|
||||
* Show configuration index.
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
|
@@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Controllers\Admin;
|
||||
|
||||
use FireflyIII\Events\AdminRequestedTestMessage;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Http\Controllers\Controller;
|
||||
use FireflyIII\Http\Middleware\IsDemoUser;
|
||||
use FireflyIII\Support\Facades\FireflyConfig;
|
||||
@@ -58,7 +57,6 @@ class HomeController extends Controller
|
||||
* Index of the admin.
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
@@ -83,6 +81,11 @@ class HomeController extends Controller
|
||||
return view('admin.index', compact('title', 'mainTitleIcon', 'email', 'notifications', 'slackUrl'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
*
|
||||
* @return RedirectResponse
|
||||
*/
|
||||
public function notifications(Request $request): RedirectResponse
|
||||
{
|
||||
foreach (config('firefly.admin_notifications') as $item) {
|
||||
|
@@ -89,7 +89,8 @@ class UserController extends Controller
|
||||
|
||||
/**
|
||||
* @param InvitedUser $invitedUser
|
||||
* @return RedirectResponse
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function deleteInvite(InvitedUser $invitedUser): JsonResponse
|
||||
{
|
||||
@@ -192,6 +193,7 @@ class UserController extends Controller
|
||||
|
||||
/**
|
||||
* @param InviteUserFormRequest $request
|
||||
*
|
||||
* @return RedirectResponse
|
||||
*/
|
||||
public function invite(InviteUserFormRequest $request): RedirectResponse
|
||||
|
@@ -236,6 +236,7 @@ class BudgetLimitController extends Controller
|
||||
}
|
||||
|
||||
$limit = $this->blRepository->update($budgetLimit, ['amount' => $amount]);
|
||||
app('preferences')->mark();
|
||||
$array = $limit->toArray();
|
||||
|
||||
$spentArr = $this->opsRepository->sumExpenses(
|
||||
|
@@ -35,7 +35,6 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\View\View;
|
||||
use JsonException;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
@@ -79,7 +78,6 @@ class NoCategoryController extends Controller
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
@@ -119,7 +117,6 @@ class NoCategoryController extends Controller
|
||||
* @param Request $request
|
||||
*
|
||||
* @return Factory|View
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
|
@@ -517,6 +517,7 @@ class AccountController extends Controller
|
||||
*
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
* @throws JsonException
|
||||
|
@@ -24,7 +24,6 @@ declare(strict_types=1);
|
||||
namespace FireflyIII\Http\Controllers\Chart;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
|
||||
use FireflyIII\Helpers\Collector\GroupCollectorInterface;
|
||||
use FireflyIII\Helpers\Report\NetWorthInterface;
|
||||
@@ -72,7 +71,6 @@ class ReportController extends Controller
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function netWorth(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
|
||||
{
|
||||
|
@@ -208,6 +208,7 @@ class CurrencyController extends Controller
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
*/
|
||||
@@ -300,6 +301,7 @@ class CurrencyController extends Controller
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function enableCurrency(Request $request): JsonResponse
|
||||
|
@@ -23,7 +23,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Http\Controllers;
|
||||
|
||||
use Artisan;
|
||||
use DB;
|
||||
use Exception;
|
||||
use FireflyConfig;
|
||||
@@ -34,6 +33,7 @@ use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Routing\Redirector;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\View\View;
|
||||
use Monolog\Handler\RotatingFileHandler;
|
||||
@@ -88,6 +88,7 @@ class DebugController extends Controller
|
||||
app('preferences')->mark();
|
||||
$request->session()->forget(['start', 'end', '_previous', 'viewRange', 'range', 'is_custom_range', 'temp-mfa-secret', 'temp-mfa-codes']);
|
||||
Log::debug('Call cache:clear...');
|
||||
|
||||
Artisan::call('cache:clear');
|
||||
Log::debug('Call config:clear...');
|
||||
Artisan::call('config:clear');
|
||||
|
@@ -32,6 +32,8 @@ use FireflyIII\Support\Export\ExportDataGenerator;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Http\Response as LaravelResponse;
|
||||
use Illuminate\View\View;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class IndexController
|
||||
@@ -65,6 +67,8 @@ class IndexController extends Controller
|
||||
/**
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function export(): LaravelResponse
|
||||
{
|
||||
|
@@ -32,8 +32,6 @@ use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
|
||||
/**
|
||||
* Class RecurrenceController
|
||||
@@ -145,17 +143,14 @@ class RecurrenceController extends Controller
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
public function suggest(Request $request): JsonResponse
|
||||
{
|
||||
$string = '' === (string)$request->get('date') ? date('Y-m-d') : (string)$request->get('date');
|
||||
$today = today(config('app.timezone'))->startOfDay();
|
||||
$string = '' === (string)$request->get('date') ? date('Y-m-d') : (string)$request->get('date');
|
||||
$today = today(config('app.timezone'))->startOfDay();
|
||||
try {
|
||||
$date = Carbon::createFromFormat('Y-m-d', $string, config('app.timezone'))->startOfDay();
|
||||
} catch(InvalidFormatException $e) {
|
||||
} catch (InvalidFormatException $e) {
|
||||
$date = Carbon::today(config('app.timezone'));
|
||||
}
|
||||
$preSelected = (string)$request->get('pre_select');
|
||||
|
@@ -54,12 +54,12 @@ class ReportController extends Controller
|
||||
app('view')->share('end', $attributes['endDate']);
|
||||
|
||||
$html = match ($attributes['location']) {
|
||||
default => sprintf('Firefly III cannot handle "%s"-popups.', $attributes['location']),
|
||||
default => sprintf('Firefly III cannot handle "%s"-popups.', $attributes['location']),
|
||||
'budget-spent-amount' => $this->budgetSpentAmount($attributes),
|
||||
'expense-entry' => $this->expenseEntry($attributes),
|
||||
'income-entry' => $this->incomeEntry($attributes),
|
||||
'category-entry' => $this->categoryEntry($attributes),
|
||||
'budget-entry' => $this->budgetEntry($attributes),
|
||||
'expense-entry' => $this->expenseEntry($attributes),
|
||||
'income-entry' => $this->incomeEntry($attributes),
|
||||
'category-entry' => $this->categoryEntry($attributes),
|
||||
'budget-entry' => $this->budgetEntry($attributes),
|
||||
};
|
||||
return response()->json(['html' => $html]);
|
||||
}
|
||||
|
@@ -1,5 +1,26 @@
|
||||
<?php
|
||||
|
||||
|
||||
/*
|
||||
* TriggerController.php
|
||||
* Copyright (c) 2023 james@firefly-iii.org
|
||||
*
|
||||
* This file is part of Firefly III (https://github.com/firefly-iii).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
/*
|
||||
* TriggerController.php
|
||||
@@ -41,6 +62,7 @@ class TriggerController extends Controller
|
||||
/**
|
||||
* @param Recurrence $recurrence
|
||||
* @param TriggerRecurrenceRequest $request
|
||||
*
|
||||
* @return RedirectResponse
|
||||
*/
|
||||
public function trigger(Recurrence $recurrence, TriggerRecurrenceRequest $request): RedirectResponse
|
||||
|
@@ -45,8 +45,8 @@ class BillController extends Controller
|
||||
* @return mixed|string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function overview(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{ // chart properties for cache:
|
||||
public function overview(Collection $accounts, Carbon $start, Carbon $end) // chart properties for cache:
|
||||
{
|
||||
$cache = new CacheProperties();
|
||||
$cache->addProperty($start);
|
||||
$cache->addProperty($end);
|
||||
|
@@ -313,11 +313,11 @@ class ReportController extends Controller
|
||||
public function options(string $reportType)
|
||||
{
|
||||
$result = match ($reportType) {
|
||||
default => $this->noReportOptions(),
|
||||
default => $this->noReportOptions(),
|
||||
'category' => $this->categoryReportOptions(),
|
||||
'budget' => $this->budgetReportOptions(),
|
||||
'tag' => $this->tagReportOptions(),
|
||||
'double' => $this->doubleReportOptions(),
|
||||
'budget' => $this->budgetReportOptions(),
|
||||
'tag' => $this->tagReportOptions(),
|
||||
'double' => $this->doubleReportOptions(),
|
||||
};
|
||||
|
||||
return response()->json(['html' => $result]);
|
||||
@@ -381,12 +381,12 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
$url = match ($reportType) {
|
||||
default => route('reports.report.default', [$accounts, $start, $end]),
|
||||
default => route('reports.report.default', [$accounts, $start, $end]),
|
||||
'category' => route('reports.report.category', [$accounts, $categories, $start, $end]),
|
||||
'audit' => route('reports.report.audit', [$accounts, $start, $end]),
|
||||
'budget' => route('reports.report.budget', [$accounts, $budgets, $start, $end]),
|
||||
'tag' => route('reports.report.tag', [$accounts, $tags, $start, $end]),
|
||||
'double' => route('reports.report.double', [$accounts, $double, $start, $end]),
|
||||
'audit' => route('reports.report.audit', [$accounts, $start, $end]),
|
||||
'budget' => route('reports.report.budget', [$accounts, $budgets, $start, $end]),
|
||||
'tag' => route('reports.report.tag', [$accounts, $tags, $start, $end]),
|
||||
'double' => route('reports.report.double', [$accounts, $double, $start, $end]),
|
||||
};
|
||||
|
||||
return redirect($url);
|
||||
|
@@ -241,6 +241,7 @@ class CreateController extends Controller
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function duplicate(Request $request): JsonResponse
|
||||
|
@@ -138,6 +138,7 @@ class InstallController extends Controller
|
||||
/**
|
||||
* @param string $command
|
||||
* @param array $args
|
||||
*
|
||||
* @return bool
|
||||
* @throws FireflyException
|
||||
*/
|
||||
|
@@ -155,6 +155,7 @@ class LinkController extends Controller
|
||||
* Switch link from A <> B to B <> A.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return RedirectResponse|Redirector
|
||||
*/
|
||||
public function switchLink(Request $request)
|
||||
|
@@ -39,6 +39,7 @@ class AcceptHeaders
|
||||
*
|
||||
* @param Request $request
|
||||
* @param callable $next
|
||||
*
|
||||
* @return Response
|
||||
* @throws BadHttpHeaderException
|
||||
*/
|
||||
@@ -78,6 +79,7 @@ class AcceptHeaders
|
||||
/**
|
||||
* @param string $content
|
||||
* @param array $accepted
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function acceptsHeader(string $content, array $accepted): bool
|
||||
|
@@ -121,6 +121,7 @@ class Authenticate
|
||||
/**
|
||||
* @param User|null $user
|
||||
* @param array $guards
|
||||
*
|
||||
* @return void
|
||||
* @throws AuthenticationException
|
||||
*/
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user