Merge branch 'release/v6.0.17'

This commit is contained in:
James Cole
2023-07-15 16:05:36 +02:00
282 changed files with 3847 additions and 1775 deletions

View File

@@ -301,7 +301,6 @@ PUSHER_ID=
DEMO_USERNAME= DEMO_USERNAME=
DEMO_PASSWORD= DEMO_PASSWORD=
USE_ENCRYPTION=false USE_ENCRYPTION=false
IS_HEROKU=false
FIREFLY_III_LAYOUT=v1 FIREFLY_III_LAYOUT=v1
# #

View File

@@ -379,16 +379,16 @@
}, },
{ {
"name": "friendsofphp/php-cs-fixer", "name": "friendsofphp/php-cs-fixer",
"version": "v3.19.2", "version": "v3.21.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "210dd89560edb27a8e0d5086b734ac5b5fd4e0e4" "reference": "229b55b3eae4729a8e2a321441ba40fcb3720b86"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/210dd89560edb27a8e0d5086b734ac5b5fd4e0e4", "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/229b55b3eae4729a8e2a321441ba40fcb3720b86",
"reference": "210dd89560edb27a8e0d5086b734ac5b5fd4e0e4", "reference": "229b55b3eae4729a8e2a321441ba40fcb3720b86",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@@ -398,7 +398,7 @@
"doctrine/lexer": "^2 || ^3", "doctrine/lexer": "^2 || ^3",
"ext-json": "*", "ext-json": "*",
"ext-tokenizer": "*", "ext-tokenizer": "*",
"php": "^7.4 || ^8.0", "php": "^8.0.1",
"sebastian/diff": "^4.0 || ^5.0", "sebastian/diff": "^4.0 || ^5.0",
"symfony/console": "^5.4 || ^6.0", "symfony/console": "^5.4 || ^6.0",
"symfony/event-dispatcher": "^5.4 || ^6.0", "symfony/event-dispatcher": "^5.4 || ^6.0",
@@ -463,7 +463,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", "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": [ "funding": [
{ {
@@ -471,7 +471,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2023-06-25T16:42:58+00:00" "time": "2023-07-05T21:50:25+00:00"
}, },
{ {
"name": "psr/cache", "name": "psr/cache",

View File

@@ -1,13 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ruleset name="pcsg-generated-ruleset" <!--
xmlns="http://pmd.sf.net/ruleset/1.0.0" ~ phpmd.xml
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ~ 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: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"> xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>Bla bla</description> <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 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"> <rule ref="rulesets/controversial.xml">
<exclude name="CamelCasePropertyName" /> <exclude name="CamelCasePropertyName" />
</rule> </rule>
<!-- clean code --> <!-- clean code -->
<rule ref="rulesets/codesize.xml" /> <rule ref="rulesets/codesize.xml" />
<rule ref="rulesets/design.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 --> <!-- no this one -->
<!--<rule ref="rulesets/cleancode.xml/StaticAccess" />--> <!--<rule ref="rulesets/cleancode.xml/StaticAccess" />-->
</ruleset> </ruleset>

View File

@@ -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

View File

@@ -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

View File

@@ -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. # 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!). # 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/ # For more info: https://docs.firefly-iii.org/firefly-iii/advanced-installation/cron/
# #
@@ -298,7 +298,6 @@ PUSHER_SECRET=
PUSHER_ID= PUSHER_ID=
DEMO_USERNAME= DEMO_USERNAME=
DEMO_PASSWORD= DEMO_PASSWORD=
IS_HEROKU=false
FIREFLY_III_LAYOUT=v1 FIREFLY_III_LAYOUT=v1
# #

View File

@@ -1,5 +1,6 @@
name: Sonarcloud name: Sonarcloud
on: on:
pull_request:
push: push:
branches: branches:
- main - main
@@ -12,6 +13,33 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis 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 - name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master uses: SonarSource/sonarcloud-github-action@master
env: env:

2
.gitignore vendored
View File

@@ -7,4 +7,4 @@ npm-debug.log
yarn-error.log yarn-error.log
.env .env
/.ci/php-cs-fixer/vendor /.ci/php-cs-fixer/vendor
/.ci/coverage coverage.xml

View File

@@ -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="
}
}
}

View File

@@ -279,6 +279,9 @@ class DestroyController extends Controller
$tagRepository->destroyAll(); $tagRepository->destroyAll();
} }
/**
* @return void
*/
private function destroyObjectGroups(): void private function destroyObjectGroups(): void
{ {
/** @var ObjectGroupRepositoryInterface $repository */ /** @var ObjectGroupRepositoryInterface $repository */

View File

@@ -29,6 +29,8 @@ use FireflyIII\Api\V1\Requests\Data\Export\ExportRequest;
use FireflyIII\Exceptions\FireflyException; use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Support\Export\ExportDataGenerator; use FireflyIII\Support\Export\ExportDataGenerator;
use Illuminate\Http\Response as LaravelResponse; use Illuminate\Http\Response as LaravelResponse;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/** /**
* Class ExportController * Class ExportController
@@ -74,6 +76,8 @@ class ExportController extends Controller
* *
* @return LaravelResponse * @return LaravelResponse
* @throws FireflyException * @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
private function returnExport(string $key): LaravelResponse private function returnExport(string $key): LaravelResponse
{ {

View File

@@ -37,6 +37,9 @@ use FireflyIII\Models\TransactionGroup;
use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournal;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
/**
* Class PurgeController
*/
class PurgeController extends Controller class PurgeController extends Controller
{ {
/** /**

View File

@@ -30,6 +30,9 @@ use FireflyIII\Repositories\LinkType\LinkTypeRepositoryInterface;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
/**
* Class DestroyController
*/
class DestroyController extends Controller class DestroyController extends Controller
{ {
private LinkTypeRepositoryInterface $repository; private LinkTypeRepositoryInterface $repository;

View File

@@ -37,6 +37,9 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
use League\Fractal\Resource\Collection as FractalCollection; use League\Fractal\Resource\Collection as FractalCollection;
use League\Fractal\Resource\Item; use League\Fractal\Resource\Item;
/**
* Class ShowController
*/
class ShowController extends Controller class ShowController extends Controller
{ {
private LinkTypeRepositoryInterface $repository; private LinkTypeRepositoryInterface $repository;

View File

@@ -35,6 +35,9 @@ use FireflyIII\User;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use League\Fractal\Resource\Item; use League\Fractal\Resource\Item;
/**
* Class StoreController
*/
class StoreController extends Controller class StoreController extends Controller
{ {
use TransactionFilter; use TransactionFilter;

View File

@@ -34,6 +34,9 @@ use FireflyIII\User;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use League\Fractal\Resource\Item; use League\Fractal\Resource\Item;
/**
* Class UpdateController
*/
class UpdateController extends Controller class UpdateController extends Controller
{ {
private JournalRepositoryInterface $journalRepository; private JournalRepositoryInterface $journalRepository;

View File

@@ -138,7 +138,6 @@ class ConfigurationController extends Controller
* *
* @return JsonResponse * @return JsonResponse
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */
public function show(string $configKey): JsonResponse public function show(string $configKey): JsonResponse

View File

@@ -28,6 +28,8 @@ use FireflyIII\Api\V1\Requests\System\CronRequest;
use FireflyIII\Support\Http\Controllers\CronRunner; use FireflyIII\Support\Http\Controllers\CronRunner;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/** /**
* Class CronController * Class CronController
@@ -44,6 +46,8 @@ class CronController extends Controller
* @param string $token * @param string $token
* *
* @return JsonResponse * @return JsonResponse
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
public function cron(CronRequest $request, string $token): JsonResponse public function cron(CronRequest $request, string $token): JsonResponse
{ {

View File

@@ -35,6 +35,9 @@ use League\Fractal\Pagination\IlluminatePaginatorAdapter;
use League\Fractal\Resource\Collection as FractalCollection; use League\Fractal\Resource\Collection as FractalCollection;
use League\Fractal\Resource\Item; use League\Fractal\Resource\Item;
/**
* Class MessageController
*/
class MessageController extends Controller class MessageController extends Controller
{ {
public const RESOURCE_KEY = 'webhook_messages'; public const RESOURCE_KEY = 'webhook_messages';

View File

@@ -127,6 +127,7 @@ class ShowController extends Controller
*/ */
public function triggerTransaction(Webhook $webhook, TransactionGroup $group): JsonResponse public function triggerTransaction(Webhook $webhook, TransactionGroup $group): JsonResponse
{ {
app('log')->debug(sprintf('Now in triggerTransaction(%d, %d)', $webhook->id, $group->id));
/** @var MessageGeneratorInterface $engine */ /** @var MessageGeneratorInterface $engine */
$engine = app(MessageGeneratorInterface::class); $engine = app(MessageGeneratorInterface::class);
$engine->setUser(auth()->user()); $engine->setUser(auth()->user());
@@ -141,6 +142,7 @@ class ShowController extends Controller
$engine->generateMessages(); $engine->generateMessages();
// trigger event to send them: // trigger event to send them:
app('log')->debug('send event RequestedSendWebhookMessages');
event(new RequestedSendWebhookMessages()); event(new RequestedSendWebhookMessages());
return response()->json([], 204); return response()->json([], 204);

View File

@@ -38,6 +38,9 @@ class ExportRequest extends FormRequest
use ChecksLogin; use ChecksLogin;
use ConvertsDataTypes; use ConvertsDataTypes;
/**
* @return array
*/
public function getAll(): array public function getAll(): array
{ {
$result = [ $result = [

View File

@@ -59,6 +59,7 @@ class UpdateRequest extends FormRequest
* Get all data. Is pretty complex because of all the ??-statements. * Get all data. Is pretty complex because of all the ??-statements.
* *
* @return array * @return array
* @throws FireflyException
*/ */
public function getAll(): array public function getAll(): array
{ {
@@ -152,6 +153,7 @@ class UpdateRequest extends FormRequest
* Get transaction data. * Get transaction data.
* *
* @return array * @return array
* @throws FireflyException
*/ */
private function getTransactionData(): array private function getTransactionData(): array
{ {
@@ -322,7 +324,7 @@ class UpdateRequest extends FormRequest
return [ return [
// basic fields for group: // basic fields for group:
'group_title' => 'between:1,1000', 'group_title' => 'between:1,1000|nullable',
'apply_rules' => [new IsBoolean()], 'apply_rules' => [new IsBoolean()],
// transaction rules (in array for splits): // transaction rules (in array for splits):
@@ -335,8 +337,8 @@ class UpdateRequest extends FormRequest
// currency info // currency info
'transactions.*.currency_id' => 'numeric|exists:transaction_currencies,id', 'transactions.*.currency_id' => 'numeric|exists:transaction_currencies,id|nullable',
'transactions.*.currency_code' => 'min:3|max:51|exists:transaction_currencies,code', '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_id' => 'nullable|numeric|exists:transaction_currencies,id',
'transactions.*.foreign_currency_code' => 'nullable|min:3|max:51|exists:transaction_currencies,code', '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', 'transactions.*.destination_name' => 'between:1,255|nullable',
// budget, category, bill and piggy // 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.*.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.*.category_name' => 'between:1,255|nullable',
'transactions.*.bill_id' => ['numeric', 'nullable', 'mustExist:bills,id', new BelongsUser()], 'transactions.*.bill_id' => ['numeric', 'nullable', 'mustExist:bills,id', new BelongsUser()],
'transactions.*.bill_name' => ['between:1,255', 'nullable', new BelongsUser()], 'transactions.*.bill_name' => ['between:1,255', 'nullable', new BelongsUser()],
@@ -366,7 +368,7 @@ class UpdateRequest extends FormRequest
// other interesting fields // other interesting fields
'transactions.*.reconciled' => [new IsBoolean()], 'transactions.*.reconciled' => [new IsBoolean()],
'transactions.*.notes' => 'min:1|max:50000|nullable', 'transactions.*.notes' => 'min:1|max:50000|nullable',
'transactions.*.tags' => 'between:0,255', 'transactions.*.tags' => 'between:0,255|nullable',
// meta info fields // meta info fields
'transactions.*.internal_reference' => 'min:1|max:255|nullable', 'transactions.*.internal_reference' => 'min:1|max:255|nullable',

View File

@@ -27,6 +27,9 @@ use FireflyIII\Support\Request\ChecksLogin;
use FireflyIII\Support\Request\ConvertsDataTypes; use FireflyIII\Support\Request\ConvertsDataTypes;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
/**
* Class PreferenceStoreRequest
*/
class PreferenceStoreRequest extends FormRequest class PreferenceStoreRequest extends FormRequest
{ {
use ChecksLogin; use ChecksLogin;

View File

@@ -28,6 +28,9 @@ use FireflyIII\Support\Request\ChecksLogin;
use FireflyIII\Support\Request\ConvertsDataTypes; use FireflyIII\Support\Request\ConvertsDataTypes;
use Illuminate\Foundation\Http\FormRequest; use Illuminate\Foundation\Http\FormRequest;
/**
* Class PreferenceUpdateRequest
*/
class PreferenceUpdateRequest extends FormRequest class PreferenceUpdateRequest extends FormRequest
{ {
use ChecksLogin; use ChecksLogin;

View File

@@ -31,6 +31,9 @@ use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Pagination\LengthAwarePaginator;
/**
* Class ListController
*/
class ListController extends Controller class ListController extends Controller
{ {
private BudgetRepositoryInterface $repository; private BudgetRepositoryInterface $repository;

View File

@@ -1,6 +1,6 @@
<?php <?php
declare(strict_types=1);
/* /*
* ShowController.php * ShowController.php
* Copyright (c) 2023 james@firefly-iii.org * 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/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
declare(strict_types=1);
namespace FireflyIII\Api\V2\Controllers\Model\Budget; namespace FireflyIII\Api\V2\Controllers\Model\Budget;
use FireflyIII\Api\V2\Controllers\Controller; use FireflyIII\Api\V2\Controllers\Controller;
@@ -42,8 +44,7 @@ class ShowController extends Controller
/** /**
* *
*/ */
public function __construct() public function __construct() {
{
parent::__construct(); parent::__construct();
$this->middleware( $this->middleware(
function ($request, $next) { function ($request, $next) {
@@ -59,8 +60,7 @@ class ShowController extends Controller
* TODO add URL * TODO add URL
* *
*/ */
public function budgeted(DateRequest $request, Budget $budget): JsonResponse public function budgeted(DateRequest $request, Budget $budget): JsonResponse {
{
$data = $request->getAll(); $data = $request->getAll();
$result = $this->repository->budgetedInPeriodForBudget($budget, $data['start'], $data['end']); $result = $this->repository->budgetedInPeriodForBudget($budget, $data['start'], $data['end']);
$converted = $this->cerSum(array_values($result)); $converted = $this->cerSum(array_values($result));
@@ -73,8 +73,7 @@ class ShowController extends Controller
* TODO add URL * TODO add URL
* *
*/ */
public function spent(DateRequest $request, Budget $budget): JsonResponse public function spent(DateRequest $request, Budget $budget): JsonResponse {
{
$data = $request->getAll(); $data = $request->getAll();
$result = $this->repository->spentInPeriodForBudget($budget, $data['start'], $data['end']); $result = $this->repository->spentInPeriodForBudget($budget, $data['start'], $data['end']);
$converted = $this->cerSum(array_values($result)); $converted = $this->cerSum(array_values($result));

View File

@@ -32,6 +32,9 @@ use FireflyIII\Transformers\V2\BudgetLimitTransformer;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Pagination\LengthAwarePaginator;
/**
* Class ListController
*/
class ListController extends Controller class ListController extends Controller
{ {
private BudgetLimitRepositoryInterface $repository; private BudgetLimitRepositoryInterface $repository;

View File

@@ -24,6 +24,9 @@ declare(strict_types=1);
namespace FireflyIII\Api\V2\Controllers\System; namespace FireflyIII\Api\V2\Controllers\System;
/**
* Class ConfigurationController
*/
class ConfigurationController class ConfigurationController
{ {
} }

View File

@@ -26,6 +26,9 @@ namespace FireflyIII\Api\V2\Controllers\System;
use FireflyIII\Api\V2\Controllers\Controller; use FireflyIII\Api\V2\Controllers\Controller;
/**
* Class DebugController
*/
class DebugController extends Controller class DebugController extends Controller
{ {
} }

View File

@@ -126,6 +126,7 @@ class CorrectOpeningBalanceCurrencies extends Command
/** /**
* @param Account $account * @param Account $account
* @param TransactionJournal $journal * @param TransactionJournal $journal
*
* @return int * @return int
*/ */
private function setCorrectCurrency(Account $account, TransactionJournal $journal): int private function setCorrectCurrency(Account $account, TransactionJournal $journal): int

View File

@@ -97,6 +97,9 @@ class DeleteEmptyJournals extends Command
} }
} }
/**
* @return void
*/
private function deleteEmptyJournals(): void private function deleteEmptyJournals(): void
{ {
$count = 0; $count = 0;

View File

@@ -65,6 +65,9 @@ class DeleteOrphanedTransactions extends Command
return 0; return 0;
} }
/**
* @return void
*/
private function deleteOrphanedJournals(): void private function deleteOrphanedJournals(): void
{ {
$set = TransactionJournal::leftJoin('transaction_groups', 'transaction_journals.transaction_group_id', 'transaction_groups.id') $set = TransactionJournal::leftJoin('transaction_groups', 'transaction_journals.transaction_group_id', 'transaction_groups.id')

View File

@@ -89,6 +89,7 @@ class FixAccountTypes extends Command
* @param TransactionJournal $journal * @param TransactionJournal $journal
* *
* @throws FireflyException * @throws FireflyException
* @throws JsonException
*/ */
private function inspectJournal(TransactionJournal $journal): void private function inspectJournal(TransactionJournal $journal): void
{ {

View File

@@ -1,5 +1,26 @@
<?php <?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); declare(strict_types=1);
namespace FireflyIII\Console\Commands\Correction; namespace FireflyIII\Console\Commands\Correction;
@@ -29,6 +50,9 @@ class TriggerCreditCalculation extends Command
return 0; return 0;
} }
/**
* @return void
*/
private function processAccounts(): void private function processAccounts(): void
{ {
$accounts = Account::leftJoin('account_types', 'accounts.account_type_id', 'account_types.id') $accounts = Account::leftJoin('account_types', 'accounts.account_type_id', 'account_types.id')

View File

@@ -38,6 +38,8 @@ use Illuminate\Console\Command;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use InvalidArgumentException; use InvalidArgumentException;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/** /**
* Class ExportData * Class ExportData
@@ -83,6 +85,8 @@ class ExportData extends Command
* *
* @return int * @return int
* @throws FireflyException * @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {

View File

@@ -73,6 +73,11 @@ class UpdateGroupInformation extends Command
return 0; return 0;
} }
/**
* @param User $user
*
* @return void
*/
private function updateGroupInfo(User $user): void private function updateGroupInfo(User $user): void
{ {
$group = $user->userGroup; $group = $user->userGroup;

View File

@@ -1,6 +1,6 @@
<?php <?php
declare(strict_types=1);
/* /*
* ShowsFriendlyMessages.php * ShowsFriendlyMessages.php
* Copyright (c) 2023 james@firefly-iii.org * 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/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
declare(strict_types=1);
namespace FireflyIII\Console\Commands; namespace FireflyIII\Console\Commands;
/** /**
@@ -30,55 +32,55 @@ trait ShowsFriendlyMessages
{ {
/** /**
* @param string $message * @param string $message
*
* @return void * @return void
*/ */
public function friendlyError(string $message): void public function friendlyError(string $message): void {
{
$this->error(sprintf(' [x] %s', trim($message))); $this->error(sprintf(' [x] %s', trim($message)));
} }
/** /**
* @param string $message * @param string $message
*
* @return void * @return void
*/ */
public function friendlyInfo(string $message): void public function friendlyInfo(string $message): void {
{
$this->friendlyNeutral($message); $this->friendlyNeutral($message);
} }
/** /**
* @param string $message * @param string $message
*
* @return void * @return void
*/ */
public function friendlyNeutral(string $message): void public function friendlyNeutral(string $message): void {
{
$this->line(sprintf(' [i] %s', trim($message))); $this->line(sprintf(' [i] %s', trim($message)));
} }
/** /**
* @param string $message * @param string $message
*
* @return void * @return void
*/ */
public function friendlyLine(string $message): void public function friendlyLine(string $message): void {
{
$this->line(sprintf(' %s', trim($message))); $this->line(sprintf(' %s', trim($message)));
} }
/** /**
* @param string $message * @param string $message
*
* @return void * @return void
*/ */
public function friendlyPositive(string $message): void public function friendlyPositive(string $message): void {
{
$this->info(sprintf(' [✓] %s', trim($message))); $this->info(sprintf(' [✓] %s', trim($message)));
} }
/** /**
* @param string $message * @param string $message
*
* @return void * @return void
*/ */
public function friendlyWarning(string $message): void public function friendlyWarning(string $message): void {
{
$this->warn(sprintf(' [!] %s', trim($message))); $this->warn(sprintf(' [!] %s', trim($message)));
} }

View File

@@ -92,7 +92,6 @@ class ForceDecimalSize extends Command
/** /**
* Execute the console command. * Execute the console command.
* *
* @throws FireflyException
*/ */
public function handle(): int public function handle(): int
{ {
@@ -110,6 +109,9 @@ class ForceDecimalSize extends Command
return 0; return 0;
} }
/**
* @return void
*/
private function determineDatabaseType(): void private function determineDatabaseType(): void
{ {
// switch stuff based on database connection: // 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. * This method loops all enabled currencies and then calls the method that will fix all objects in this currency.
* *
* @return void * @return void
* @throws FireflyException
*/ */
private function correctAmountsByCurrency(): void private function correctAmountsByCurrency(): void
{ {

View File

@@ -32,6 +32,9 @@ use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
/**
* Class ForceMigration
*/
class ForceMigration extends Command class ForceMigration extends Command
{ {
use ShowsFriendlyMessages; use ShowsFriendlyMessages;
@@ -79,6 +82,9 @@ class ForceMigration extends Command
return 0; return 0;
} }
/**
* @return void
*/
private function forceMigration(): void private function forceMigration(): void
{ {
DB::commit(); DB::commit();

View File

@@ -64,6 +64,8 @@ class Cron extends Command
/** /**
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {

View File

@@ -35,6 +35,8 @@ use FireflyIII\Repositories\User\UserRepositoryInterface;
use FireflyIII\User; use FireflyIII\User;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/** /**
* Class AccountCurrencies * Class AccountCurrencies
@@ -94,6 +96,8 @@ class AccountCurrencies extends Command
/** /**
* @return bool * @return bool
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
private function isExecuted(): bool private function isExecuted(): bool
{ {

View File

@@ -24,13 +24,15 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade; namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\BudgetLimit; use FireflyIII\Models\BudgetLimit;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
/**
* Class AppendBudgetLimitPeriods
*/
class AppendBudgetLimitPeriods extends Command class AppendBudgetLimitPeriods extends Command
{ {
use ShowsFriendlyMessages; use ShowsFriendlyMessages;
@@ -54,7 +56,6 @@ class AppendBudgetLimitPeriods extends Command
* *
* @return int * @return int
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int

View File

@@ -25,7 +25,6 @@ namespace FireflyIII\Console\Commands\Upgrade;
use DB; use DB;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Budget; use FireflyIII\Models\Budget;
use FireflyIII\Models\Category; use FireflyIII\Models\Category;
use FireflyIII\Models\Transaction; use FireflyIII\Models\Transaction;
@@ -61,7 +60,6 @@ class BackToJournals extends Command
* *
* @return int * @return int
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int

View File

@@ -51,6 +51,8 @@ class DecryptDatabase extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {

View File

@@ -24,7 +24,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade; namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Note; use FireflyIII\Models\Note;
use FireflyIII\Models\TransactionJournalMeta; use FireflyIII\Models\TransactionJournalMeta;
use Illuminate\Console\Command; use Illuminate\Console\Command;
@@ -58,7 +57,6 @@ class MigrateJournalNotes extends Command
* *
* @return int * @return int
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int

View File

@@ -25,7 +25,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade; namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Recurrence; use FireflyIII\Models\Recurrence;
use FireflyIII\Models\RecurrenceMeta; use FireflyIII\Models\RecurrenceMeta;
use FireflyIII\Models\RecurrenceTransactionMeta; use FireflyIII\Models\RecurrenceTransactionMeta;
@@ -60,7 +59,6 @@ class MigrateRecurrenceMeta extends Command
* *
* @return int * @return int
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws FireflyException
* @throws JsonException * @throws JsonException
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@@ -25,7 +25,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade; namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Recurrence; use FireflyIII\Models\Recurrence;
use FireflyIII\Models\RecurrenceTransaction; use FireflyIII\Models\RecurrenceTransaction;
use FireflyIII\Models\TransactionType; use FireflyIII\Models\TransactionType;
@@ -59,7 +58,6 @@ class MigrateRecurrenceType extends Command
* *
* @return int * @return int
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
@@ -104,6 +102,7 @@ class MigrateRecurrenceType extends Command
/** /**
* @param Recurrence $recurrence * @param Recurrence $recurrence
*
* @return void * @return void
*/ */
private function migrateRecurrence(Recurrence $recurrence): void private function migrateRecurrence(Recurrence $recurrence): void

View File

@@ -25,7 +25,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade; namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Location; use FireflyIII\Models\Location;
use FireflyIII\Models\Tag; use FireflyIII\Models\Tag;
use Illuminate\Console\Command; use Illuminate\Console\Command;
@@ -58,7 +57,6 @@ class MigrateTagLocations extends Command
* *
* @return int * @return int
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
@@ -89,6 +87,9 @@ class MigrateTagLocations extends Command
return false; return false;
} }
/**
* @return void
*/
private function migrateTagLocations(): void private function migrateTagLocations(): void
{ {
$tags = Tag::get(); $tags = Tag::get();

View File

@@ -64,6 +64,8 @@ class MigrateToGroups extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {

View File

@@ -24,7 +24,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade; namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Account; use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType; use FireflyIII\Models\AccountType;
use FireflyIII\Models\Transaction; use FireflyIII\Models\Transaction;
@@ -61,7 +60,6 @@ class OtherCurrenciesCorrections extends Command
* *
* @return int * @return int
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int

View File

@@ -62,6 +62,8 @@ class TransferCurrenciesCorrections extends Command
* Execute the console command. * Execute the console command.
* *
* @return int * @return int
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int
{ {

View File

@@ -25,7 +25,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade; namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Factory\AccountMetaFactory; use FireflyIII\Factory\AccountMetaFactory;
use FireflyIII\Models\Account; use FireflyIII\Models\Account;
use FireflyIII\Models\Transaction; use FireflyIII\Models\Transaction;
@@ -53,7 +52,6 @@ class UpgradeLiabilities extends Command
* *
* @return int * @return int
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int

View File

@@ -25,7 +25,6 @@ declare(strict_types=1);
namespace FireflyIII\Console\Commands\Upgrade; namespace FireflyIII\Console\Commands\Upgrade;
use FireflyIII\Console\Commands\ShowsFriendlyMessages; use FireflyIII\Console\Commands\ShowsFriendlyMessages;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\Account; use FireflyIII\Models\Account;
use FireflyIII\Models\AccountType; use FireflyIII\Models\AccountType;
use FireflyIII\Models\Transaction; use FireflyIII\Models\Transaction;
@@ -56,7 +55,6 @@ class UpgradeLiabilitiesEight extends Command
* *
* @return int * @return int
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */
public function handle(): int public function handle(): int

View File

@@ -24,6 +24,9 @@ declare(strict_types=1);
namespace FireflyIII\Enums; namespace FireflyIII\Enums;
/**
* Class RecurrenceRepetitionWeekend
*/
enum RecurrenceRepetitionWeekend: int enum RecurrenceRepetitionWeekend: int
{ {
case WEEKEND_DO_NOTHING = 1; case WEEKEND_DO_NOTHING = 1;

View File

@@ -24,6 +24,9 @@ declare(strict_types=1);
namespace FireflyIII\Enums; namespace FireflyIII\Enums;
/**
* Class UserRoleEnum
*/
enum UserRoleEnum: string enum UserRoleEnum: string
{ {
case CHANGE_PIGGY_BANKS = 'change_piggies'; case CHANGE_PIGGY_BANKS = 'change_piggies';

View File

@@ -24,6 +24,9 @@ declare(strict_types=1);
namespace FireflyIII\Enums; namespace FireflyIII\Enums;
/**
* Class WebhookDelivery
*/
enum WebhookDelivery: int enum WebhookDelivery: int
{ {
//case XML = 200; //case XML = 200;

View File

@@ -24,6 +24,9 @@ declare(strict_types=1);
namespace FireflyIII\Enums; namespace FireflyIII\Enums;
/**
* Class WebhookResponse
*/
enum WebhookResponse: int enum WebhookResponse: int
{ {
case TRANSACTIONS = 200; case TRANSACTIONS = 200;

View File

@@ -1,6 +1,6 @@
<?php <?php
declare(strict_types=1);
/* /*
* Created.php * Created.php
* Copyright (c) 2023 james@firefly-iii.org * 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/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
declare(strict_types=1);
namespace FireflyIII\Events\Model\BudgetLimit; namespace FireflyIII\Events\Model\BudgetLimit;
use FireflyIII\Events\Event; use FireflyIII\Events\Event;
@@ -39,8 +41,7 @@ class Created extends Event
/** /**
* @param BudgetLimit $budgetLimit * @param BudgetLimit $budgetLimit
*/ */
public function __construct(BudgetLimit $budgetLimit) public function __construct(BudgetLimit $budgetLimit) {
{
$this->budgetLimit = $budgetLimit; $this->budgetLimit = $budgetLimit;
} }
} }

View File

@@ -1,8 +1,8 @@
<?php <?php
declare(strict_types=1);
/* /*
* Created.php * Deleted.php
* Copyright (c) 2023 james@firefly-iii.org * Copyright (c) 2023 james@firefly-iii.org
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * 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/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
declare(strict_types=1);
namespace FireflyIII\Events\Model\BudgetLimit; namespace FireflyIII\Events\Model\BudgetLimit;
use FireflyIII\Events\Event; use FireflyIII\Events\Event;
@@ -39,8 +41,7 @@ class Deleted extends Event
/** /**
* @param BudgetLimit $budgetLimit * @param BudgetLimit $budgetLimit
*/ */
public function __construct(BudgetLimit $budgetLimit) public function __construct(BudgetLimit $budgetLimit) {
{
$this->budgetLimit = $budgetLimit; $this->budgetLimit = $budgetLimit;
} }
} }

View File

@@ -1,8 +1,8 @@
<?php <?php
declare(strict_types=1);
/* /*
* Created.php * Updated.php
* Copyright (c) 2023 james@firefly-iii.org * Copyright (c) 2023 james@firefly-iii.org
* *
* This file is part of Firefly III (https://github.com/firefly-iii). * 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/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
declare(strict_types=1);
namespace FireflyIII\Events\Model\BudgetLimit; namespace FireflyIII\Events\Model\BudgetLimit;
use FireflyIII\Events\Event; use FireflyIII\Events\Event;
@@ -39,8 +41,7 @@ class Updated extends Event
/** /**
* @param BudgetLimit $budgetLimit * @param BudgetLimit $budgetLimit
*/ */
public function __construct(BudgetLimit $budgetLimit) public function __construct(BudgetLimit $budgetLimit) {
{
$this->budgetLimit = $budgetLimit; $this->budgetLimit = $budgetLimit;
} }
} }

View File

@@ -26,6 +26,9 @@ namespace FireflyIII\Events;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;
/**
* Class NewVersionAvailable
*/
class NewVersionAvailable extends Event class NewVersionAvailable extends Event
{ {
use SerializesModels; use SerializesModels;

View File

@@ -25,6 +25,9 @@ namespace FireflyIII\Events;
use Illuminate\Queue\SerializesModels; use Illuminate\Queue\SerializesModels;
/**
* Class RequestedSendWebhookMessages
*/
class RequestedSendWebhookMessages extends Event class RequestedSendWebhookMessages extends Event
{ {
use SerializesModels; use SerializesModels;

View File

@@ -416,6 +416,7 @@ class TransactionJournalFactory
/** /**
* @param Account|null $sourceAccount * @param Account|null $sourceAccount
* @param Account|null $destinationAccount * @param Account|null $destinationAccount
*
* @return array * @return array
*/ */
private function reconciliationSanityCheck(?Account $sourceAccount, ?Account $destinationAccount): array private function reconciliationSanityCheck(?Account $sourceAccount, ?Account $destinationAccount): array
@@ -457,7 +458,7 @@ class TransactionJournalFactory
Log::debug('Now in getCurrencyByAccount()'); Log::debug('Now in getCurrencyByAccount()');
return match ($type) { return match ($type) {
default => $this->getCurrency($currency, $source), default => $this->getCurrency($currency, $source),
TransactionType::DEPOSIT => $this->getCurrency($currency, $destination), TransactionType::DEPOSIT => $this->getCurrency($currency, $destination),
}; };
} }

View File

@@ -58,6 +58,7 @@ interface MessageGeneratorInterface
/** /**
* @param Collection $webhooks * @param Collection $webhooks
*
* @return void * @return void
*/ */
public function setWebhooks(Collection $webhooks): void; public function setWebhooks(Collection $webhooks): void;

View File

@@ -103,6 +103,7 @@ class StandardMessageGenerator implements MessageGeneratorInterface
/** /**
* @param Webhook $webhook * @param Webhook $webhook
*
* @throws FireflyException * @throws FireflyException
* @throws JsonException * @throws JsonException
*/ */
@@ -118,6 +119,7 @@ class StandardMessageGenerator implements MessageGeneratorInterface
/** /**
* @param Webhook $webhook * @param Webhook $webhook
* @param Model $model * @param Model $model
*
* @throws FireflyException * @throws FireflyException
* @throws JsonException * @throws JsonException
*/ */

View File

@@ -24,7 +24,6 @@ declare(strict_types=1);
namespace FireflyIII\Handlers\Events; namespace FireflyIII\Handlers\Events;
use Exception; use Exception;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Notifications\User\NewAccessToken; use FireflyIII\Notifications\User\NewAccessToken;
use FireflyIII\Repositories\User\UserRepositoryInterface; use FireflyIII\Repositories\User\UserRepositoryInterface;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
@@ -41,7 +40,6 @@ class APIEventHandler
* *
* @param AccessTokenCreated $event * @param AccessTokenCreated $event
* *
* @throws FireflyException
*/ */
public function accessTokenCreated(AccessTokenCreated $event): void public function accessTokenCreated(AccessTokenCreated $event): void
{ {

View File

@@ -42,6 +42,7 @@ class AdminEventHandler
{ {
/** /**
* @param InvitationCreated $event * @param InvitationCreated $event
*
* @return void * @return void
*/ */
public function sendInvitationNotification(InvitationCreated $event): void public function sendInvitationNotification(InvitationCreated $event): void
@@ -79,6 +80,7 @@ class AdminEventHandler
* Send new version message to admin. * Send new version message to admin.
* *
* @param NewVersionAvailable $event * @param NewVersionAvailable $event
*
* @return void * @return void
*/ */
public function sendNewVersion(NewVersionAvailable $event): void public function sendNewVersion(NewVersionAvailable $event): void

View File

@@ -42,6 +42,7 @@ class AutomationHandler
* Respond to the creation of X journals. * Respond to the creation of X journals.
* *
* @param RequestedReportOnJournals $event * @param RequestedReportOnJournals $event
*
* @throws FireflyException * @throws FireflyException
*/ */
public function reportJournals(RequestedReportOnJournals $event): void public function reportJournals(RequestedReportOnJournals $event): void

View File

@@ -38,6 +38,7 @@ class BillEventHandler
{ {
/** /**
* @param WarnUserAboutBill $event * @param WarnUserAboutBill $event
*
* @return void * @return void
*/ */
public function warnAboutBill(WarnUserAboutBill $event): void public function warnAboutBill(WarnUserAboutBill $event): void

View File

@@ -1,6 +1,6 @@
<?php <?php
declare(strict_types=1);
/* /*
* BudgetLimitHandler.php * BudgetLimitHandler.php
* Copyright (c) 2023 james@firefly-iii.org * 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/>. * along with this program. If not, see <https://www.gnu.org/licenses/>.
*/ */
declare(strict_types=1);
namespace FireflyIII\Handlers\Events\Model; namespace FireflyIII\Handlers\Events\Model;
use FireflyIII\Events\Model\BudgetLimit\Created; use FireflyIII\Events\Model\BudgetLimit\Created;
@@ -44,20 +46,20 @@ class BudgetLimitHandler
{ {
/** /**
* @param Created $event * @param Created $event
*
* @return void * @return void
*/ */
public function created(Created $event): void public function created(Created $event): void {
{
Log::debug(sprintf('BudgetLimitHandler::created(#%s)', $event->budgetLimit->id)); Log::debug(sprintf('BudgetLimitHandler::created(#%s)', $event->budgetLimit->id));
$this->updateAvailableBudget($event->budgetLimit); $this->updateAvailableBudget($event->budgetLimit);
} }
/** /**
* @param BudgetLimit $budgetLimit * @param BudgetLimit $budgetLimit
*
* @return void * @return void
*/ */
private function updateAvailableBudget(BudgetLimit $budgetLimit): void private function updateAvailableBudget(BudgetLimit $budgetLimit): void {
{
Log::debug(sprintf('Now in updateAvailableBudget(#%d)', $budgetLimit->id)); 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 // 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 * @param AvailableBudget $availableBudget
*
* @return void * @return void
*/ */
private function calculateAmount(AvailableBudget $availableBudget): void private function calculateAmount(AvailableBudget $availableBudget): void {
{
$repository = app(BudgetLimitRepositoryInterface::class); $repository = app(BudgetLimitRepositoryInterface::class);
$repository->setUser($availableBudget->user); $repository->setUser($availableBudget->user);
$newAmount = '0'; $newAmount = '0';
@@ -171,8 +173,8 @@ class BudgetLimitHandler
); );
// overlap in days: // overlap in days:
$limitPeriod = Period::make( $limitPeriod = Period::make(
$budgetLimit->start_date, $budgetLimit->start_date,
$budgetLimit->end_date, $budgetLimit->end_date,
precision : Precision::DAY(), precision : Precision::DAY(),
boundaries: Boundaries::EXCLUDE_NONE() boundaries: Boundaries::EXCLUDE_NONE()
); );
@@ -205,16 +207,16 @@ class BudgetLimitHandler
/** /**
* @param BudgetLimit $budgetLimit * @param BudgetLimit $budgetLimit
*
* @return string * @return string
*/ */
private function getDailyAmount(BudgetLimit $budgetLimit): string private function getDailyAmount(BudgetLimit $budgetLimit): string {
{
if (0 === (int)$budgetLimit->id) { if (0 === (int)$budgetLimit->id) {
return '0'; return '0';
} }
$limitPeriod = Period::make( $limitPeriod = Period::make(
$budgetLimit->start_date, $budgetLimit->start_date,
$budgetLimit->end_date, $budgetLimit->end_date,
precision : Precision::DAY(), precision : Precision::DAY(),
boundaries: Boundaries::EXCLUDE_NONE() boundaries: Boundaries::EXCLUDE_NONE()
); );
@@ -228,10 +230,10 @@ class BudgetLimitHandler
/** /**
* @param Deleted $event * @param Deleted $event
*
* @return void * @return void
*/ */
public function deleted(Deleted $event): void public function deleted(Deleted $event): void {
{
Log::debug(sprintf('BudgetLimitHandler::deleted(#%s)', $event->budgetLimit->id)); Log::debug(sprintf('BudgetLimitHandler::deleted(#%s)', $event->budgetLimit->id));
$budgetLimit = $event->budgetLimit; $budgetLimit = $event->budgetLimit;
$budgetLimit->id = null; $budgetLimit->id = null;
@@ -240,10 +242,10 @@ class BudgetLimitHandler
/** /**
* @param Updated $event * @param Updated $event
*
* @return void * @return void
*/ */
public function updated(Updated $event): void public function updated(Updated $event): void {
{
Log::debug(sprintf('BudgetLimitHandler::updated(#%s)', $event->budgetLimit->id)); Log::debug(sprintf('BudgetLimitHandler::updated(#%s)', $event->budgetLimit->id));
$this->updateAvailableBudget($event->budgetLimit); $this->updateAvailableBudget($event->budgetLimit);
} }

View File

@@ -35,6 +35,7 @@ class PiggyBankEventHandler
{ {
/** /**
* @param ChangedPiggyBankAmount $event * @param ChangedPiggyBankAmount $event
*
* @return void * @return void
*/ */
public function changePiggyAmount(ChangedPiggyBankAmount $event): void public function changePiggyAmount(ChangedPiggyBankAmount $event): void
@@ -45,7 +46,6 @@ class PiggyBankEventHandler
$journal = $event->transactionGroup->transactionJournals()->first(); $journal = $event->transactionGroup->transactionJournals()->first();
} }
$date = $journal?->date ?? today(config('app.timezone')); $date = $journal?->date ?? today(config('app.timezone'));
// sanity check: event must not already exist for this journal and piggy bank. // sanity check: event must not already exist for this journal and piggy bank.
if (null !== $journal) { if (null !== $journal) {
$exists = PiggyBankEvent::where('piggy_bank_id', $event->piggyBank->id) $exists = PiggyBankEvent::where('piggy_bank_id', $event->piggyBank->id)

View File

@@ -329,6 +329,7 @@ class UserEventHandler
/** /**
* @param InvitationCreated $event * @param InvitationCreated $event
*
* @return void * @return void
* @throws FireflyException * @throws FireflyException
*/ */
@@ -376,6 +377,7 @@ class UserEventHandler
/** /**
* @param ActuallyLoggedIn $event * @param ActuallyLoggedIn $event
*
* @throws FireflyException * @throws FireflyException
*/ */
public function storeUserIPAddress(ActuallyLoggedIn $event): void public function storeUserIPAddress(ActuallyLoggedIn $event): void

View File

@@ -38,6 +38,7 @@ trait AttachmentCollection
{ {
/** /**
* @param string $name * @param string $name
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNameContains(string $name): GroupCollectorInterface public function attachmentNameContains(string $name): GroupCollectorInterface
@@ -116,6 +117,7 @@ trait AttachmentCollection
/** /**
* @param string $name * @param string $name
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNameDoesNotContain(string $name): GroupCollectorInterface public function attachmentNameDoesNotContain(string $name): GroupCollectorInterface
@@ -145,6 +147,7 @@ trait AttachmentCollection
/** /**
* @param string $name * @param string $name
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNameDoesNotEnd(string $name): GroupCollectorInterface public function attachmentNameDoesNotEnd(string $name): GroupCollectorInterface
@@ -174,6 +177,7 @@ trait AttachmentCollection
/** /**
* @param string $name * @param string $name
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNameDoesNotStart(string $name): GroupCollectorInterface public function attachmentNameDoesNotStart(string $name): GroupCollectorInterface
@@ -203,6 +207,7 @@ trait AttachmentCollection
/** /**
* @param string $name * @param string $name
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNameEnds(string $name): GroupCollectorInterface public function attachmentNameEnds(string $name): GroupCollectorInterface
@@ -232,6 +237,7 @@ trait AttachmentCollection
/** /**
* @param string $name * @param string $name
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNameIs(string $name): GroupCollectorInterface public function attachmentNameIs(string $name): GroupCollectorInterface
@@ -258,6 +264,7 @@ trait AttachmentCollection
/** /**
* @param string $name * @param string $name
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNameIsNot(string $name): GroupCollectorInterface public function attachmentNameIsNot(string $name): GroupCollectorInterface
@@ -284,6 +291,7 @@ trait AttachmentCollection
/** /**
* @param string $name * @param string $name
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNameStarts(string $name): GroupCollectorInterface public function attachmentNameStarts(string $name): GroupCollectorInterface
@@ -313,6 +321,7 @@ trait AttachmentCollection
/** /**
* @param string $value * @param string $value
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNotesAre(string $value): GroupCollectorInterface public function attachmentNotesAre(string $value): GroupCollectorInterface
@@ -339,6 +348,7 @@ trait AttachmentCollection
/** /**
* @param string $value * @param string $value
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNotesAreNot(string $value): GroupCollectorInterface public function attachmentNotesAreNot(string $value): GroupCollectorInterface
@@ -365,6 +375,7 @@ trait AttachmentCollection
/** /**
* @param string $value * @param string $value
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNotesContains(string $value): GroupCollectorInterface public function attachmentNotesContains(string $value): GroupCollectorInterface
@@ -391,6 +402,7 @@ trait AttachmentCollection
/** /**
* @param string $value * @param string $value
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNotesDoNotContain(string $value): GroupCollectorInterface public function attachmentNotesDoNotContain(string $value): GroupCollectorInterface
@@ -417,6 +429,7 @@ trait AttachmentCollection
/** /**
* @param string $value * @param string $value
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNotesDoNotEnd(string $value): GroupCollectorInterface public function attachmentNotesDoNotEnd(string $value): GroupCollectorInterface
@@ -443,6 +456,7 @@ trait AttachmentCollection
/** /**
* @param string $value * @param string $value
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNotesDoNotStart(string $value): GroupCollectorInterface public function attachmentNotesDoNotStart(string $value): GroupCollectorInterface
@@ -469,6 +483,7 @@ trait AttachmentCollection
/** /**
* @param string $value * @param string $value
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNotesEnds(string $value): GroupCollectorInterface public function attachmentNotesEnds(string $value): GroupCollectorInterface
@@ -495,6 +510,7 @@ trait AttachmentCollection
/** /**
* @param string $value * @param string $value
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNotesStarts(string $value): GroupCollectorInterface public function attachmentNotesStarts(string $value): GroupCollectorInterface

View File

@@ -320,6 +320,7 @@ trait MetaCollection
/** /**
* @param string $url * @param string $url
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalUrlContains(string $url): GroupCollectorInterface public function externalUrlContains(string $url): GroupCollectorInterface
@@ -335,6 +336,7 @@ trait MetaCollection
/** /**
* @param string $url * @param string $url
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalUrlDoesNotContain(string $url): GroupCollectorInterface public function externalUrlDoesNotContain(string $url): GroupCollectorInterface
@@ -350,6 +352,7 @@ trait MetaCollection
/** /**
* @param string $url * @param string $url
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalUrlDoesNotEnd(string $url): GroupCollectorInterface public function externalUrlDoesNotEnd(string $url): GroupCollectorInterface
@@ -365,6 +368,7 @@ trait MetaCollection
/** /**
* @param string $url * @param string $url
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalUrlDoesNotStart(string $url): GroupCollectorInterface public function externalUrlDoesNotStart(string $url): GroupCollectorInterface
@@ -382,6 +386,7 @@ trait MetaCollection
/** /**
* @param string $url * @param string $url
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalUrlEnds(string $url): GroupCollectorInterface public function externalUrlEnds(string $url): GroupCollectorInterface
@@ -397,6 +402,7 @@ trait MetaCollection
/** /**
* @param string $url * @param string $url
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalUrlStarts(string $url): GroupCollectorInterface public function externalUrlStarts(string $url): GroupCollectorInterface

View File

@@ -34,6 +34,7 @@ trait TimeCollection
{ {
/** /**
* @param string $day * @param string $day
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function dayAfter(string $day): GroupCollectorInterface public function dayAfter(string $day): GroupCollectorInterface
@@ -44,6 +45,7 @@ trait TimeCollection
/** /**
* @param string $day * @param string $day
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function dayBefore(string $day): GroupCollectorInterface public function dayBefore(string $day): GroupCollectorInterface
@@ -54,6 +56,7 @@ trait TimeCollection
/** /**
* @param string $day * @param string $day
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function dayIs(string $day): GroupCollectorInterface public function dayIs(string $day): GroupCollectorInterface
@@ -64,6 +67,7 @@ trait TimeCollection
/** /**
* @param string $day * @param string $day
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function dayIsNot(string $day): GroupCollectorInterface public function dayIsNot(string $day): GroupCollectorInterface
@@ -76,6 +80,7 @@ trait TimeCollection
* @param Carbon $start * @param Carbon $start
* @param Carbon $end * @param Carbon $end
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function excludeMetaDateRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface public function excludeMetaDateRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface
@@ -118,6 +123,7 @@ trait TimeCollection
* @param Carbon $start * @param Carbon $start
* @param Carbon $end * @param Carbon $end
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function excludeObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface public function excludeObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface
@@ -134,6 +140,7 @@ trait TimeCollection
/** /**
* @param Carbon $start * @param Carbon $start
* @param Carbon $end * @param Carbon $end
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function excludeRange(Carbon $start, Carbon $end): GroupCollectorInterface public function excludeRange(Carbon $start, Carbon $end): GroupCollectorInterface
@@ -153,6 +160,7 @@ trait TimeCollection
/** /**
* @param string $day * @param string $day
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaDayAfter(string $day, string $field): GroupCollectorInterface public function metaDayAfter(string $day, string $field): GroupCollectorInterface
@@ -176,6 +184,7 @@ trait TimeCollection
/** /**
* @param string $day * @param string $day
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaDayBefore(string $day, string $field): GroupCollectorInterface public function metaDayBefore(string $day, string $field): GroupCollectorInterface
@@ -199,6 +208,7 @@ trait TimeCollection
/** /**
* @param string $day * @param string $day
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaDayIs(string $day, string $field): GroupCollectorInterface public function metaDayIs(string $day, string $field): GroupCollectorInterface
@@ -221,6 +231,7 @@ trait TimeCollection
/** /**
* @param string $day * @param string $day
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaDayIsNot(string $day, string $field): GroupCollectorInterface public function metaDayIsNot(string $day, string $field): GroupCollectorInterface
@@ -243,6 +254,7 @@ trait TimeCollection
/** /**
* @param string $month * @param string $month
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaMonthAfter(string $month, string $field): GroupCollectorInterface public function metaMonthAfter(string $month, string $field): GroupCollectorInterface
@@ -266,6 +278,7 @@ trait TimeCollection
/** /**
* @param string $month * @param string $month
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaMonthBefore(string $month, string $field): GroupCollectorInterface public function metaMonthBefore(string $month, string $field): GroupCollectorInterface
@@ -289,6 +302,7 @@ trait TimeCollection
/** /**
* @param string $month * @param string $month
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaMonthIs(string $month, string $field): GroupCollectorInterface public function metaMonthIs(string $month, string $field): GroupCollectorInterface
@@ -311,6 +325,7 @@ trait TimeCollection
/** /**
* @param string $month * @param string $month
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaMonthIsNot(string $month, string $field): GroupCollectorInterface public function metaMonthIsNot(string $month, string $field): GroupCollectorInterface
@@ -333,6 +348,7 @@ trait TimeCollection
/** /**
* @param string $year * @param string $year
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaYearAfter(string $year, string $field): GroupCollectorInterface public function metaYearAfter(string $year, string $field): GroupCollectorInterface
@@ -356,6 +372,7 @@ trait TimeCollection
/** /**
* @param string $year * @param string $year
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaYearBefore(string $year, string $field): GroupCollectorInterface public function metaYearBefore(string $year, string $field): GroupCollectorInterface
@@ -379,6 +396,7 @@ trait TimeCollection
/** /**
* @param string $year * @param string $year
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaYearIs(string $year, string $field): GroupCollectorInterface public function metaYearIs(string $year, string $field): GroupCollectorInterface
@@ -402,6 +420,7 @@ trait TimeCollection
/** /**
* @param string $year * @param string $year
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaYearIsNot(string $year, string $field): GroupCollectorInterface public function metaYearIsNot(string $year, string $field): GroupCollectorInterface
@@ -423,6 +442,7 @@ trait TimeCollection
/** /**
* @param string $month * @param string $month
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function monthAfter(string $month): GroupCollectorInterface public function monthAfter(string $month): GroupCollectorInterface
@@ -433,6 +453,7 @@ trait TimeCollection
/** /**
* @param string $month * @param string $month
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function monthBefore(string $month): GroupCollectorInterface public function monthBefore(string $month): GroupCollectorInterface
@@ -443,6 +464,7 @@ trait TimeCollection
/** /**
* @param string $month * @param string $month
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function monthIs(string $month): GroupCollectorInterface public function monthIs(string $month): GroupCollectorInterface
@@ -453,6 +475,7 @@ trait TimeCollection
/** /**
* @param string $month * @param string $month
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function monthIsNot(string $month): GroupCollectorInterface public function monthIsNot(string $month): GroupCollectorInterface
@@ -464,6 +487,7 @@ trait TimeCollection
/** /**
* @param string $day * @param string $day
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectDayAfter(string $day, string $field): GroupCollectorInterface public function objectDayAfter(string $day, string $field): GroupCollectorInterface
@@ -475,6 +499,7 @@ trait TimeCollection
/** /**
* @param string $day * @param string $day
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectDayBefore(string $day, string $field): GroupCollectorInterface public function objectDayBefore(string $day, string $field): GroupCollectorInterface
@@ -486,6 +511,7 @@ trait TimeCollection
/** /**
* @param string $day * @param string $day
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectDayIs(string $day, string $field): GroupCollectorInterface public function objectDayIs(string $day, string $field): GroupCollectorInterface
@@ -497,6 +523,7 @@ trait TimeCollection
/** /**
* @param string $day * @param string $day
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectDayIsNot(string $day, string $field): GroupCollectorInterface public function objectDayIsNot(string $day, string $field): GroupCollectorInterface
@@ -508,6 +535,7 @@ trait TimeCollection
/** /**
* @param string $month * @param string $month
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectMonthAfter(string $month, string $field): GroupCollectorInterface public function objectMonthAfter(string $month, string $field): GroupCollectorInterface
@@ -519,6 +547,7 @@ trait TimeCollection
/** /**
* @param string $month * @param string $month
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectMonthBefore(string $month, string $field): GroupCollectorInterface public function objectMonthBefore(string $month, string $field): GroupCollectorInterface
@@ -530,6 +559,7 @@ trait TimeCollection
/** /**
* @param string $month * @param string $month
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectMonthIs(string $month, string $field): GroupCollectorInterface public function objectMonthIs(string $month, string $field): GroupCollectorInterface
@@ -541,6 +571,7 @@ trait TimeCollection
/** /**
* @param string $month * @param string $month
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectMonthIsNot(string $month, string $field): GroupCollectorInterface public function objectMonthIsNot(string $month, string $field): GroupCollectorInterface
@@ -552,6 +583,7 @@ trait TimeCollection
/** /**
* @param string $year * @param string $year
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectYearAfter(string $year, string $field): GroupCollectorInterface public function objectYearAfter(string $year, string $field): GroupCollectorInterface
@@ -563,6 +595,7 @@ trait TimeCollection
/** /**
* @param string $year * @param string $year
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectYearBefore(string $year, string $field): GroupCollectorInterface public function objectYearBefore(string $year, string $field): GroupCollectorInterface
@@ -574,6 +607,7 @@ trait TimeCollection
/** /**
* @param string $year * @param string $year
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectYearIs(string $year, string $field): GroupCollectorInterface public function objectYearIs(string $year, string $field): GroupCollectorInterface
@@ -585,6 +619,7 @@ trait TimeCollection
/** /**
* @param string $year * @param string $year
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectYearIsNot(string $year, string $field): GroupCollectorInterface public function objectYearIsNot(string $year, string $field): GroupCollectorInterface
@@ -643,6 +678,7 @@ trait TimeCollection
/** /**
* @param Carbon $date * @param Carbon $date
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function setMetaAfter(Carbon $date, string $field): GroupCollectorInterface public function setMetaAfter(Carbon $date, string $field): GroupCollectorInterface
@@ -667,6 +703,7 @@ trait TimeCollection
/** /**
* @param Carbon $date * @param Carbon $date
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function setMetaBefore(Carbon $date, string $field): GroupCollectorInterface public function setMetaBefore(Carbon $date, string $field): GroupCollectorInterface
@@ -691,6 +728,7 @@ trait TimeCollection
* @param Carbon $start * @param Carbon $start
* @param Carbon $end * @param Carbon $end
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function setMetaDateRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface public function setMetaDateRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface
@@ -720,6 +758,7 @@ trait TimeCollection
/** /**
* @param Carbon $date * @param Carbon $date
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function setObjectAfter(Carbon $date, string $field): GroupCollectorInterface public function setObjectAfter(Carbon $date, string $field): GroupCollectorInterface
@@ -733,6 +772,7 @@ trait TimeCollection
/** /**
* @param Carbon $date * @param Carbon $date
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function setObjectBefore(Carbon $date, string $field): GroupCollectorInterface public function setObjectBefore(Carbon $date, string $field): GroupCollectorInterface
@@ -746,6 +786,7 @@ trait TimeCollection
* @param Carbon $start * @param Carbon $start
* @param Carbon $end * @param Carbon $end
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function setObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface public function setObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface
@@ -800,6 +841,7 @@ trait TimeCollection
/** /**
* @param string $year * @param string $year
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function yearAfter(string $year): GroupCollectorInterface public function yearAfter(string $year): GroupCollectorInterface
@@ -810,6 +852,7 @@ trait TimeCollection
/** /**
* @param string $year * @param string $year
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function yearBefore(string $year): GroupCollectorInterface public function yearBefore(string $year): GroupCollectorInterface
@@ -820,6 +863,7 @@ trait TimeCollection
/** /**
* @param string $year * @param string $year
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function yearIs(string $year): GroupCollectorInterface public function yearIs(string $year): GroupCollectorInterface
@@ -830,6 +874,7 @@ trait TimeCollection
/** /**
* @param string $year * @param string $year
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function yearIsNot(string $year): GroupCollectorInterface public function yearIsNot(string $year): GroupCollectorInterface

View File

@@ -480,6 +480,7 @@ class GroupCollector implements GroupCollectorInterface
* Return the groups. * Return the groups.
* *
* @return Collection * @return Collection
* @throws FireflyException
*/ */
public function getGroups(): Collection public function getGroups(): Collection
{ {
@@ -663,6 +664,7 @@ class GroupCollector implements GroupCollectorInterface
/** /**
* @param array $array * @param array $array
*
* @return array * @return array
*/ */
private function convertToStrings(array $array): array private function convertToStrings(array $array): array
@@ -771,6 +773,7 @@ class GroupCollector implements GroupCollectorInterface
/** /**
* @param Collection $collection * @param Collection $collection
*
* @return Collection * @return Collection
*/ */
private function postFilterCollection(Collection $collection): Collection private function postFilterCollection(Collection $collection): Collection

View File

@@ -75,120 +75,140 @@ interface GroupCollectorInterface
/** /**
* @param string $name * @param string $name
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNameContains(string $name): GroupCollectorInterface; public function attachmentNameContains(string $name): GroupCollectorInterface;
/** /**
* @param string $name * @param string $name
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNameDoesNotContain(string $name): GroupCollectorInterface; public function attachmentNameDoesNotContain(string $name): GroupCollectorInterface;
/** /**
* @param string $name * @param string $name
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNameDoesNotEnd(string $name): GroupCollectorInterface; public function attachmentNameDoesNotEnd(string $name): GroupCollectorInterface;
/** /**
* @param string $name * @param string $name
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNameDoesNotStart(string $name): GroupCollectorInterface; public function attachmentNameDoesNotStart(string $name): GroupCollectorInterface;
/** /**
* @param string $name * @param string $name
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNameEnds(string $name): GroupCollectorInterface; public function attachmentNameEnds(string $name): GroupCollectorInterface;
/** /**
* @param string $name * @param string $name
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNameIs(string $name): GroupCollectorInterface; public function attachmentNameIs(string $name): GroupCollectorInterface;
/** /**
* @param string $name * @param string $name
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNameIsNot(string $name): GroupCollectorInterface; public function attachmentNameIsNot(string $name): GroupCollectorInterface;
/** /**
* @param string $name * @param string $name
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNameStarts(string $name): GroupCollectorInterface; public function attachmentNameStarts(string $name): GroupCollectorInterface;
/** /**
* @param string $value * @param string $value
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNotesAre(string $value): GroupCollectorInterface; public function attachmentNotesAre(string $value): GroupCollectorInterface;
/** /**
* @param string $value * @param string $value
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNotesAreNot(string $value): GroupCollectorInterface; public function attachmentNotesAreNot(string $value): GroupCollectorInterface;
/** /**
* @param string $value * @param string $value
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNotesContains(string $value): GroupCollectorInterface; public function attachmentNotesContains(string $value): GroupCollectorInterface;
/** /**
* @param string $value * @param string $value
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNotesDoNotContain(string $value): GroupCollectorInterface; public function attachmentNotesDoNotContain(string $value): GroupCollectorInterface;
/** /**
* @param string $value * @param string $value
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNotesDoNotEnd(string $value): GroupCollectorInterface; public function attachmentNotesDoNotEnd(string $value): GroupCollectorInterface;
/** /**
* @param string $value * @param string $value
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNotesDoNotStart(string $value): GroupCollectorInterface; public function attachmentNotesDoNotStart(string $value): GroupCollectorInterface;
/** /**
* @param string $value * @param string $value
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNotesEnds(string $value): GroupCollectorInterface; public function attachmentNotesEnds(string $value): GroupCollectorInterface;
/** /**
* @param string $value * @param string $value
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function attachmentNotesStarts(string $value): GroupCollectorInterface; public function attachmentNotesStarts(string $value): GroupCollectorInterface;
/** /**
* @param string $day * @param string $day
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function dayAfter(string $day): GroupCollectorInterface; public function dayAfter(string $day): GroupCollectorInterface;
/** /**
* @param string $day * @param string $day
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function dayBefore(string $day): GroupCollectorInterface; public function dayBefore(string $day): GroupCollectorInterface;
/** /**
* @param string $day * @param string $day
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function dayIs(string $day): GroupCollectorInterface; public function dayIs(string $day): GroupCollectorInterface;
/** /**
* @param string $day * @param string $day
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function dayIsNot(string $day): GroupCollectorInterface; public function dayIsNot(string $day): GroupCollectorInterface;
@@ -287,6 +307,7 @@ interface GroupCollectorInterface
* Exclude a set of categories. * Exclude a set of categories.
* *
* @param Collection $categories * @param Collection $categories
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function excludeCategories(Collection $categories): GroupCollectorInterface; public function excludeCategories(Collection $categories): GroupCollectorInterface;
@@ -329,6 +350,7 @@ interface GroupCollectorInterface
/** /**
* @param string $url * @param string $url
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function excludeExternalUrl(string $url): GroupCollectorInterface; public function excludeExternalUrl(string $url): GroupCollectorInterface;
@@ -373,6 +395,7 @@ interface GroupCollectorInterface
* @param Carbon $start * @param Carbon $start
* @param Carbon $end * @param Carbon $end
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function excludeMetaDateRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface; public function excludeMetaDateRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface;
@@ -381,6 +404,7 @@ interface GroupCollectorInterface
* @param Carbon $start * @param Carbon $start
* @param Carbon $end * @param Carbon $end
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function excludeObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface; public function excludeObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface;
@@ -388,6 +412,7 @@ interface GroupCollectorInterface
/** /**
* @param Carbon $start * @param Carbon $start
* @param Carbon $end * @param Carbon $end
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function excludeRange(Carbon $start, Carbon $end): GroupCollectorInterface; public function excludeRange(Carbon $start, Carbon $end): GroupCollectorInterface;
@@ -433,72 +458,84 @@ interface GroupCollectorInterface
/** /**
* @param string $externalId * @param string $externalId
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalIdContains(string $externalId): GroupCollectorInterface; public function externalIdContains(string $externalId): GroupCollectorInterface;
/** /**
* @param string $externalId * @param string $externalId
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalIdDoesNotContain(string $externalId): GroupCollectorInterface; public function externalIdDoesNotContain(string $externalId): GroupCollectorInterface;
/** /**
* @param string $externalId * @param string $externalId
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalIdDoesNotEnd(string $externalId): GroupCollectorInterface; public function externalIdDoesNotEnd(string $externalId): GroupCollectorInterface;
/** /**
* @param string $externalId * @param string $externalId
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalIdDoesNotStart(string $externalId): GroupCollectorInterface; public function externalIdDoesNotStart(string $externalId): GroupCollectorInterface;
/** /**
* @param string $externalId * @param string $externalId
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalIdEnds(string $externalId): GroupCollectorInterface; public function externalIdEnds(string $externalId): GroupCollectorInterface;
/** /**
* @param string $externalId * @param string $externalId
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalIdStarts(string $externalId): GroupCollectorInterface; public function externalIdStarts(string $externalId): GroupCollectorInterface;
/** /**
* @param string $url * @param string $url
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalUrlContains(string $url): GroupCollectorInterface; public function externalUrlContains(string $url): GroupCollectorInterface;
/** /**
* @param string $url * @param string $url
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalUrlDoesNotContain(string $url): GroupCollectorInterface; public function externalUrlDoesNotContain(string $url): GroupCollectorInterface;
/** /**
* @param string $url * @param string $url
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalUrlDoesNotEnd(string $url): GroupCollectorInterface; public function externalUrlDoesNotEnd(string $url): GroupCollectorInterface;
/** /**
* @param string $url * @param string $url
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalUrlDoesNotStart(string $url): GroupCollectorInterface; public function externalUrlDoesNotStart(string $url): GroupCollectorInterface;
/** /**
* @param string $url * @param string $url
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalUrlEnds(string $url): GroupCollectorInterface; public function externalUrlEnds(string $url): GroupCollectorInterface;
/** /**
* @param string $url * @param string $url
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function externalUrlStarts(string $url): GroupCollectorInterface; public function externalUrlStarts(string $url): GroupCollectorInterface;
@@ -588,36 +625,42 @@ interface GroupCollectorInterface
/** /**
* @param string $externalId * @param string $externalId
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function internalReferenceContains(string $externalId): GroupCollectorInterface; public function internalReferenceContains(string $externalId): GroupCollectorInterface;
/** /**
* @param string $externalId * @param string $externalId
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function internalReferenceDoesNotContain(string $externalId): GroupCollectorInterface; public function internalReferenceDoesNotContain(string $externalId): GroupCollectorInterface;
/** /**
* @param string $externalId * @param string $externalId
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function internalReferenceDoesNotEnd(string $externalId): GroupCollectorInterface; public function internalReferenceDoesNotEnd(string $externalId): GroupCollectorInterface;
/** /**
* @param string $externalId * @param string $externalId
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function internalReferenceDoesNotStart(string $externalId): GroupCollectorInterface; public function internalReferenceDoesNotStart(string $externalId): GroupCollectorInterface;
/** /**
* @param string $externalId * @param string $externalId
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function internalReferenceEnds(string $externalId): GroupCollectorInterface; public function internalReferenceEnds(string $externalId): GroupCollectorInterface;
/** /**
* @param string $externalId * @param string $externalId
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function internalReferenceStarts(string $externalId): GroupCollectorInterface; public function internalReferenceStarts(string $externalId): GroupCollectorInterface;
@@ -639,6 +682,7 @@ interface GroupCollectorInterface
/** /**
* @param string $day * @param string $day
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaDayAfter(string $day, string $field): GroupCollectorInterface; public function metaDayAfter(string $day, string $field): GroupCollectorInterface;
@@ -646,6 +690,7 @@ interface GroupCollectorInterface
/** /**
* @param string $day * @param string $day
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaDayBefore(string $day, string $field): GroupCollectorInterface; public function metaDayBefore(string $day, string $field): GroupCollectorInterface;
@@ -653,6 +698,7 @@ interface GroupCollectorInterface
/** /**
* @param string $day * @param string $day
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaDayIs(string $day, string $field): GroupCollectorInterface; public function metaDayIs(string $day, string $field): GroupCollectorInterface;
@@ -660,6 +706,7 @@ interface GroupCollectorInterface
/** /**
* @param string $day * @param string $day
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaDayIsNot(string $day, string $field): GroupCollectorInterface; public function metaDayIsNot(string $day, string $field): GroupCollectorInterface;
@@ -667,6 +714,7 @@ interface GroupCollectorInterface
/** /**
* @param string $month * @param string $month
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaMonthAfter(string $month, string $field): GroupCollectorInterface; public function metaMonthAfter(string $month, string $field): GroupCollectorInterface;
@@ -674,6 +722,7 @@ interface GroupCollectorInterface
/** /**
* @param string $month * @param string $month
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaMonthBefore(string $month, string $field): GroupCollectorInterface; public function metaMonthBefore(string $month, string $field): GroupCollectorInterface;
@@ -681,6 +730,7 @@ interface GroupCollectorInterface
/** /**
* @param string $month * @param string $month
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaMonthIs(string $month, string $field): GroupCollectorInterface; public function metaMonthIs(string $month, string $field): GroupCollectorInterface;
@@ -688,6 +738,7 @@ interface GroupCollectorInterface
/** /**
* @param string $month * @param string $month
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaMonthIsNot(string $month, string $field): GroupCollectorInterface; public function metaMonthIsNot(string $month, string $field): GroupCollectorInterface;
@@ -695,6 +746,7 @@ interface GroupCollectorInterface
/** /**
* @param string $year * @param string $year
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaYearAfter(string $year, string $field): GroupCollectorInterface; public function metaYearAfter(string $year, string $field): GroupCollectorInterface;
@@ -702,6 +754,7 @@ interface GroupCollectorInterface
/** /**
* @param string $year * @param string $year
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaYearBefore(string $year, string $field): GroupCollectorInterface; public function metaYearBefore(string $year, string $field): GroupCollectorInterface;
@@ -709,6 +762,7 @@ interface GroupCollectorInterface
/** /**
* @param string $year * @param string $year
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaYearIs(string $year, string $field): GroupCollectorInterface; public function metaYearIs(string $year, string $field): GroupCollectorInterface;
@@ -716,30 +770,35 @@ interface GroupCollectorInterface
/** /**
* @param string $year * @param string $year
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function metaYearIsNot(string $year, string $field): GroupCollectorInterface; public function metaYearIsNot(string $year, string $field): GroupCollectorInterface;
/** /**
* @param string $month * @param string $month
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function monthAfter(string $month): GroupCollectorInterface; public function monthAfter(string $month): GroupCollectorInterface;
/** /**
* @param string $month * @param string $month
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function monthBefore(string $month): GroupCollectorInterface; public function monthBefore(string $month): GroupCollectorInterface;
/** /**
* @param string $month * @param string $month
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function monthIs(string $month): GroupCollectorInterface; public function monthIs(string $month): GroupCollectorInterface;
/** /**
* @param string $month * @param string $month
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function monthIsNot(string $month): GroupCollectorInterface; public function monthIsNot(string $month): GroupCollectorInterface;
@@ -767,6 +826,7 @@ interface GroupCollectorInterface
/** /**
* @param string $value * @param string $value
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function notesDontStartWith(string $value): GroupCollectorInterface; public function notesDontStartWith(string $value): GroupCollectorInterface;
@@ -802,6 +862,7 @@ interface GroupCollectorInterface
/** /**
* @param string $day * @param string $day
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectDayAfter(string $day, string $field): GroupCollectorInterface; public function objectDayAfter(string $day, string $field): GroupCollectorInterface;
@@ -809,6 +870,7 @@ interface GroupCollectorInterface
/** /**
* @param string $day * @param string $day
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectDayBefore(string $day, string $field): GroupCollectorInterface; public function objectDayBefore(string $day, string $field): GroupCollectorInterface;
@@ -816,6 +878,7 @@ interface GroupCollectorInterface
/** /**
* @param string $day * @param string $day
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectDayIs(string $day, string $field): GroupCollectorInterface; public function objectDayIs(string $day, string $field): GroupCollectorInterface;
@@ -823,6 +886,7 @@ interface GroupCollectorInterface
/** /**
* @param string $day * @param string $day
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectDayIsNot(string $day, string $field): GroupCollectorInterface; public function objectDayIsNot(string $day, string $field): GroupCollectorInterface;
@@ -830,6 +894,7 @@ interface GroupCollectorInterface
/** /**
* @param string $month * @param string $month
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectMonthAfter(string $month, string $field): GroupCollectorInterface; public function objectMonthAfter(string $month, string $field): GroupCollectorInterface;
@@ -837,6 +902,7 @@ interface GroupCollectorInterface
/** /**
* @param string $month * @param string $month
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectMonthBefore(string $month, string $field): GroupCollectorInterface; public function objectMonthBefore(string $month, string $field): GroupCollectorInterface;
@@ -844,6 +910,7 @@ interface GroupCollectorInterface
/** /**
* @param string $month * @param string $month
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectMonthIs(string $month, string $field): GroupCollectorInterface; public function objectMonthIs(string $month, string $field): GroupCollectorInterface;
@@ -851,6 +918,7 @@ interface GroupCollectorInterface
/** /**
* @param string $month * @param string $month
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectMonthIsNot(string $month, string $field): GroupCollectorInterface; public function objectMonthIsNot(string $month, string $field): GroupCollectorInterface;
@@ -858,6 +926,7 @@ interface GroupCollectorInterface
/** /**
* @param string $year * @param string $year
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectYearAfter(string $year, string $field): GroupCollectorInterface; public function objectYearAfter(string $year, string $field): GroupCollectorInterface;
@@ -865,6 +934,7 @@ interface GroupCollectorInterface
/** /**
* @param string $year * @param string $year
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectYearBefore(string $year, string $field): GroupCollectorInterface; public function objectYearBefore(string $year, string $field): GroupCollectorInterface;
@@ -872,6 +942,7 @@ interface GroupCollectorInterface
/** /**
* @param string $year * @param string $year
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectYearIs(string $year, string $field): GroupCollectorInterface; public function objectYearIs(string $year, string $field): GroupCollectorInterface;
@@ -879,6 +950,7 @@ interface GroupCollectorInterface
/** /**
* @param string $year * @param string $year
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function objectYearIsNot(string $year, string $field): GroupCollectorInterface; public function objectYearIsNot(string $year, string $field): GroupCollectorInterface;
@@ -1011,6 +1083,7 @@ interface GroupCollectorInterface
/** /**
* @param string $url * @param string $url
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function setExternalUrl(string $url): GroupCollectorInterface; public function setExternalUrl(string $url): GroupCollectorInterface;
@@ -1065,6 +1138,7 @@ interface GroupCollectorInterface
* *
* @param Carbon $date * @param Carbon $date
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function setMetaAfter(Carbon $date, string $field): GroupCollectorInterface; public function setMetaAfter(Carbon $date, string $field): GroupCollectorInterface;
@@ -1074,6 +1148,7 @@ interface GroupCollectorInterface
* *
* @param Carbon $date * @param Carbon $date
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function setMetaBefore(Carbon $date, string $field): GroupCollectorInterface; public function setMetaBefore(Carbon $date, string $field): GroupCollectorInterface;
@@ -1101,6 +1176,7 @@ interface GroupCollectorInterface
/** /**
* @param Carbon $date * @param Carbon $date
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function setObjectAfter(Carbon $date, string $field): GroupCollectorInterface; public function setObjectAfter(Carbon $date, string $field): GroupCollectorInterface;
@@ -1108,6 +1184,7 @@ interface GroupCollectorInterface
/** /**
* @param Carbon $date * @param Carbon $date
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function setObjectBefore(Carbon $date, string $field): GroupCollectorInterface; public function setObjectBefore(Carbon $date, string $field): GroupCollectorInterface;
@@ -1116,6 +1193,7 @@ interface GroupCollectorInterface
* @param Carbon $start * @param Carbon $start
* @param Carbon $end * @param Carbon $end
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function setObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface; public function setObjectRange(Carbon $start, Carbon $end, string $field): GroupCollectorInterface;
@@ -1159,6 +1237,7 @@ interface GroupCollectorInterface
/** /**
* @param string $sepaCT * @param string $sepaCT
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function setSepaCT(string $sepaCT): GroupCollectorInterface; public function setSepaCT(string $sepaCT): GroupCollectorInterface;
@@ -1332,6 +1411,7 @@ interface GroupCollectorInterface
* Transaction must have meta date field X. * Transaction must have meta date field X.
* *
* @param string $field * @param string $field
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function withMetaDate(string $field): GroupCollectorInterface; public function withMetaDate(string $field): GroupCollectorInterface;
@@ -1397,24 +1477,28 @@ interface GroupCollectorInterface
/** /**
* @param string $year * @param string $year
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function yearAfter(string $year): GroupCollectorInterface; public function yearAfter(string $year): GroupCollectorInterface;
/** /**
* @param string $year * @param string $year
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function yearBefore(string $year): GroupCollectorInterface; public function yearBefore(string $year): GroupCollectorInterface;
/** /**
* @param string $year * @param string $year
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function yearIs(string $year): GroupCollectorInterface; public function yearIs(string $year): GroupCollectorInterface;
/** /**
* @param string $year * @param string $year
*
* @return GroupCollectorInterface * @return GroupCollectorInterface
*/ */
public function yearIsNot(string $year): GroupCollectorInterface; public function yearIsNot(string $year): GroupCollectorInterface;

View File

@@ -24,7 +24,6 @@ declare(strict_types=1);
namespace FireflyIII\Helpers\Fiscal; namespace FireflyIII\Helpers\Fiscal;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
@@ -48,7 +47,6 @@ class FiscalHelper implements FiscalHelperInterface
* @param Carbon $date * @param Carbon $date
* *
* @return Carbon date object * @return Carbon date object
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@@ -49,6 +49,7 @@ interface NetWorthInterface
* *
* @param Collection $accounts * @param Collection $accounts
* @param Carbon $date * @param Carbon $date
*
* @return array * @return array
* @deprecated * @deprecated
*/ */

View File

@@ -161,6 +161,7 @@ class ReconcileController extends Controller
* *
* @return RedirectResponse|Redirector * @return RedirectResponse|Redirector
* @throws DuplicateTransactionException * @throws DuplicateTransactionException
* @throws JsonException
*/ */
public function submit(ReconciliationStoreRequest $request, Account $account, Carbon $start, Carbon $end) public function submit(ReconciliationStoreRequest $request, Account $account, Carbon $start, Carbon $end)
{ {

View File

@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Admin; namespace FireflyIII\Http\Controllers\Admin;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Middleware\IsDemoUser; use FireflyIII\Http\Middleware\IsDemoUser;
use FireflyIII\Http\Requests\ConfigurationRequest; use FireflyIII\Http\Requests\ConfigurationRequest;
@@ -63,7 +62,6 @@ class ConfigurationController extends Controller
* Show configuration index. * Show configuration index.
* *
* @return Factory|View * @return Factory|View
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@@ -24,7 +24,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Admin; namespace FireflyIII\Http\Controllers\Admin;
use FireflyIII\Events\AdminRequestedTestMessage; use FireflyIII\Events\AdminRequestedTestMessage;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Http\Controllers\Controller; use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Http\Middleware\IsDemoUser; use FireflyIII\Http\Middleware\IsDemoUser;
use FireflyIII\Support\Facades\FireflyConfig; use FireflyIII\Support\Facades\FireflyConfig;
@@ -58,7 +57,6 @@ class HomeController extends Controller
* Index of the admin. * Index of the admin.
* *
* @return Factory|View * @return Factory|View
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */
@@ -83,6 +81,11 @@ class HomeController extends Controller
return view('admin.index', compact('title', 'mainTitleIcon', 'email', 'notifications', 'slackUrl')); return view('admin.index', compact('title', 'mainTitleIcon', 'email', 'notifications', 'slackUrl'));
} }
/**
* @param Request $request
*
* @return RedirectResponse
*/
public function notifications(Request $request): RedirectResponse public function notifications(Request $request): RedirectResponse
{ {
foreach (config('firefly.admin_notifications') as $item) { foreach (config('firefly.admin_notifications') as $item) {

View File

@@ -89,7 +89,8 @@ class UserController extends Controller
/** /**
* @param InvitedUser $invitedUser * @param InvitedUser $invitedUser
* @return RedirectResponse *
* @return JsonResponse
*/ */
public function deleteInvite(InvitedUser $invitedUser): JsonResponse public function deleteInvite(InvitedUser $invitedUser): JsonResponse
{ {
@@ -192,6 +193,7 @@ class UserController extends Controller
/** /**
* @param InviteUserFormRequest $request * @param InviteUserFormRequest $request
*
* @return RedirectResponse * @return RedirectResponse
*/ */
public function invite(InviteUserFormRequest $request): RedirectResponse public function invite(InviteUserFormRequest $request): RedirectResponse

View File

@@ -236,6 +236,7 @@ class BudgetLimitController extends Controller
} }
$limit = $this->blRepository->update($budgetLimit, ['amount' => $amount]); $limit = $this->blRepository->update($budgetLimit, ['amount' => $amount]);
app('preferences')->mark();
$array = $limit->toArray(); $array = $limit->toArray();
$spentArr = $this->opsRepository->sumExpenses( $spentArr = $this->opsRepository->sumExpenses(

View File

@@ -35,7 +35,6 @@ use Illuminate\Http\Request;
use Illuminate\Support\Collection; use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\View\View; use Illuminate\View\View;
use JsonException;
use Psr\Container\ContainerExceptionInterface; use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface; use Psr\Container\NotFoundExceptionInterface;
@@ -79,7 +78,6 @@ class NoCategoryController extends Controller
* *
* @return Factory|View * @return Factory|View
* @throws FireflyException * @throws FireflyException
* @throws JsonException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */
@@ -119,7 +117,6 @@ class NoCategoryController extends Controller
* @param Request $request * @param Request $request
* *
* @return Factory|View * @return Factory|View
* @throws FireflyException
* @throws ContainerExceptionInterface * @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
*/ */

View File

@@ -517,6 +517,7 @@ class AccountController extends Controller
* *
* @param Carbon $start * @param Carbon $start
* @param Carbon $end * @param Carbon $end
*
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
* @throws JsonException * @throws JsonException

View File

@@ -24,7 +24,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Chart; namespace FireflyIII\Http\Controllers\Chart;
use Carbon\Carbon; use Carbon\Carbon;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Generator\Chart\Basic\GeneratorInterface; use FireflyIII\Generator\Chart\Basic\GeneratorInterface;
use FireflyIII\Helpers\Collector\GroupCollectorInterface; use FireflyIII\Helpers\Collector\GroupCollectorInterface;
use FireflyIII\Helpers\Report\NetWorthInterface; use FireflyIII\Helpers\Report\NetWorthInterface;
@@ -72,7 +71,6 @@ class ReportController extends Controller
* @param Carbon $end * @param Carbon $end
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException
*/ */
public function netWorth(Collection $accounts, Carbon $start, Carbon $end): JsonResponse public function netWorth(Collection $accounts, Carbon $start, Carbon $end): JsonResponse
{ {

View File

@@ -208,6 +208,7 @@ class CurrencyController extends Controller
/** /**
* @param Request $request * @param Request $request
*
* @return JsonResponse * @return JsonResponse
* @throws FireflyException * @throws FireflyException
*/ */
@@ -300,6 +301,7 @@ class CurrencyController extends Controller
/** /**
* @param Request $request * @param Request $request
*
* @return JsonResponse * @return JsonResponse
*/ */
public function enableCurrency(Request $request): JsonResponse public function enableCurrency(Request $request): JsonResponse

View File

@@ -23,7 +23,6 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers; namespace FireflyIII\Http\Controllers;
use Artisan;
use DB; use DB;
use Exception; use Exception;
use FireflyConfig; use FireflyConfig;
@@ -34,6 +33,7 @@ use Illuminate\Contracts\View\Factory;
use Illuminate\Http\RedirectResponse; use Illuminate\Http\RedirectResponse;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Routing\Redirector; use Illuminate\Routing\Redirector;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Illuminate\View\View; use Illuminate\View\View;
use Monolog\Handler\RotatingFileHandler; use Monolog\Handler\RotatingFileHandler;
@@ -88,6 +88,7 @@ class DebugController extends Controller
app('preferences')->mark(); app('preferences')->mark();
$request->session()->forget(['start', 'end', '_previous', 'viewRange', 'range', 'is_custom_range', 'temp-mfa-secret', 'temp-mfa-codes']); $request->session()->forget(['start', 'end', '_previous', 'viewRange', 'range', 'is_custom_range', 'temp-mfa-secret', 'temp-mfa-codes']);
Log::debug('Call cache:clear...'); Log::debug('Call cache:clear...');
Artisan::call('cache:clear'); Artisan::call('cache:clear');
Log::debug('Call config:clear...'); Log::debug('Call config:clear...');
Artisan::call('config:clear'); Artisan::call('config:clear');

View File

@@ -32,6 +32,8 @@ use FireflyIII\Support\Export\ExportDataGenerator;
use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\Factory;
use Illuminate\Http\Response as LaravelResponse; use Illuminate\Http\Response as LaravelResponse;
use Illuminate\View\View; use Illuminate\View\View;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/** /**
* Class IndexController * Class IndexController
@@ -65,6 +67,8 @@ class IndexController extends Controller
/** /**
* @return LaravelResponse * @return LaravelResponse
* @throws FireflyException * @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
public function export(): LaravelResponse public function export(): LaravelResponse
{ {

View File

@@ -32,8 +32,6 @@ use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
use Illuminate\Http\JsonResponse; use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Log;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/** /**
* Class RecurrenceController * Class RecurrenceController
@@ -145,17 +143,14 @@ class RecurrenceController extends Controller
* @param Request $request * @param Request $request
* *
* @return JsonResponse * @return JsonResponse
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/ */
public function suggest(Request $request): JsonResponse public function suggest(Request $request): JsonResponse
{ {
$string = '' === (string)$request->get('date') ? date('Y-m-d') : (string)$request->get('date'); $string = '' === (string)$request->get('date') ? date('Y-m-d') : (string)$request->get('date');
$today = today(config('app.timezone'))->startOfDay(); $today = today(config('app.timezone'))->startOfDay();
try { try {
$date = Carbon::createFromFormat('Y-m-d', $string, config('app.timezone'))->startOfDay(); $date = Carbon::createFromFormat('Y-m-d', $string, config('app.timezone'))->startOfDay();
} catch(InvalidFormatException $e) { } catch (InvalidFormatException $e) {
$date = Carbon::today(config('app.timezone')); $date = Carbon::today(config('app.timezone'));
} }
$preSelected = (string)$request->get('pre_select'); $preSelected = (string)$request->get('pre_select');

View File

@@ -54,12 +54,12 @@ class ReportController extends Controller
app('view')->share('end', $attributes['endDate']); app('view')->share('end', $attributes['endDate']);
$html = match ($attributes['location']) { $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), 'budget-spent-amount' => $this->budgetSpentAmount($attributes),
'expense-entry' => $this->expenseEntry($attributes), 'expense-entry' => $this->expenseEntry($attributes),
'income-entry' => $this->incomeEntry($attributes), 'income-entry' => $this->incomeEntry($attributes),
'category-entry' => $this->categoryEntry($attributes), 'category-entry' => $this->categoryEntry($attributes),
'budget-entry' => $this->budgetEntry($attributes), 'budget-entry' => $this->budgetEntry($attributes),
}; };
return response()->json(['html' => $html]); return response()->json(['html' => $html]);
} }

View File

@@ -1,5 +1,26 @@
<?php <?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); declare(strict_types=1);
/* /*
* TriggerController.php * TriggerController.php
@@ -41,6 +62,7 @@ class TriggerController extends Controller
/** /**
* @param Recurrence $recurrence * @param Recurrence $recurrence
* @param TriggerRecurrenceRequest $request * @param TriggerRecurrenceRequest $request
*
* @return RedirectResponse * @return RedirectResponse
*/ */
public function trigger(Recurrence $recurrence, TriggerRecurrenceRequest $request): RedirectResponse public function trigger(Recurrence $recurrence, TriggerRecurrenceRequest $request): RedirectResponse

View File

@@ -45,8 +45,8 @@ class BillController extends Controller
* @return mixed|string * @return mixed|string
* @throws FireflyException * @throws FireflyException
*/ */
public function overview(Collection $accounts, Carbon $start, Carbon $end) public function overview(Collection $accounts, Carbon $start, Carbon $end) // chart properties for cache:
{ // chart properties for cache: {
$cache = new CacheProperties(); $cache = new CacheProperties();
$cache->addProperty($start); $cache->addProperty($start);
$cache->addProperty($end); $cache->addProperty($end);

View File

@@ -313,11 +313,11 @@ class ReportController extends Controller
public function options(string $reportType) public function options(string $reportType)
{ {
$result = match ($reportType) { $result = match ($reportType) {
default => $this->noReportOptions(), default => $this->noReportOptions(),
'category' => $this->categoryReportOptions(), 'category' => $this->categoryReportOptions(),
'budget' => $this->budgetReportOptions(), 'budget' => $this->budgetReportOptions(),
'tag' => $this->tagReportOptions(), 'tag' => $this->tagReportOptions(),
'double' => $this->doubleReportOptions(), 'double' => $this->doubleReportOptions(),
}; };
return response()->json(['html' => $result]); return response()->json(['html' => $result]);
@@ -381,12 +381,12 @@ class ReportController extends Controller
} }
$url = match ($reportType) { $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]), 'category' => route('reports.report.category', [$accounts, $categories, $start, $end]),
'audit' => route('reports.report.audit', [$accounts, $start, $end]), 'audit' => route('reports.report.audit', [$accounts, $start, $end]),
'budget' => route('reports.report.budget', [$accounts, $budgets, $start, $end]), 'budget' => route('reports.report.budget', [$accounts, $budgets, $start, $end]),
'tag' => route('reports.report.tag', [$accounts, $tags, $start, $end]), 'tag' => route('reports.report.tag', [$accounts, $tags, $start, $end]),
'double' => route('reports.report.double', [$accounts, $double, $start, $end]), 'double' => route('reports.report.double', [$accounts, $double, $start, $end]),
}; };
return redirect($url); return redirect($url);

View File

@@ -241,6 +241,7 @@ class CreateController extends Controller
/** /**
* @param Request $request * @param Request $request
*
* @return JsonResponse * @return JsonResponse
*/ */
public function duplicate(Request $request): JsonResponse public function duplicate(Request $request): JsonResponse

View File

@@ -138,6 +138,7 @@ class InstallController extends Controller
/** /**
* @param string $command * @param string $command
* @param array $args * @param array $args
*
* @return bool * @return bool
* @throws FireflyException * @throws FireflyException
*/ */

View File

@@ -155,6 +155,7 @@ class LinkController extends Controller
* Switch link from A <> B to B <> A. * Switch link from A <> B to B <> A.
* *
* @param Request $request * @param Request $request
*
* @return RedirectResponse|Redirector * @return RedirectResponse|Redirector
*/ */
public function switchLink(Request $request) public function switchLink(Request $request)

View File

@@ -39,6 +39,7 @@ class AcceptHeaders
* *
* @param Request $request * @param Request $request
* @param callable $next * @param callable $next
*
* @return Response * @return Response
* @throws BadHttpHeaderException * @throws BadHttpHeaderException
*/ */
@@ -78,6 +79,7 @@ class AcceptHeaders
/** /**
* @param string $content * @param string $content
* @param array $accepted * @param array $accepted
*
* @return bool * @return bool
*/ */
private function acceptsHeader(string $content, array $accepted): bool private function acceptsHeader(string $content, array $accepted): bool

View File

@@ -121,6 +121,7 @@ class Authenticate
/** /**
* @param User|null $user * @param User|null $user
* @param array $guards * @param array $guards
*
* @return void * @return void
* @throws AuthenticationException * @throws AuthenticationException
*/ */

Some files were not shown because too many files have changed in this diff Show More