Compare commits

..

65 Commits

Author SHA1 Message Date
James Cole
c59e52bbbf Merge branch 'release/v6.0.17' 2023-07-15 16:05:36 +02:00
James Cole
81961fd632 Update packages. 2023-07-15 16:04:52 +02:00
James Cole
b557805eeb Code for new release 2023-07-15 16:02:42 +02:00
James Cole
f43b539470 Fix transfer validation for CAMT imports 2023-07-14 06:07:16 +02:00
James Cole
27037c2fbb Verify all fields are nullable. 2023-07-11 09:14:16 +02:00
James Cole
10646099a0 Add nullable types in validation. 2023-07-11 08:19:47 +02:00
James Cole
43ad63fac6 Merge branch 'main' into develop 2023-07-11 06:58:33 +02:00
James Cole
221c59437c Merge pull request #7745 from firefly-iii/dependabot/npm_and_yarn/semver-6.3.1
chore(deps): bump semver from 6.3.0 to 6.3.1
2023-07-11 06:33:14 +02:00
dependabot[bot]
1a94ec5bbe chore(deps): bump semver from 6.3.0 to 6.3.1
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-11 04:32:22 +00:00
James Cole
f57c554c56 Merge pull request #7743 from firefly-iii/dependabot/npm_and_yarn/frontend/semver-6.3.1
chore(deps): bump semver from 6.3.0 to 6.3.1 in /frontend
2023-07-11 06:30:48 +02:00
dependabot[bot]
334aec58a4 chore(deps): bump semver from 6.3.0 to 6.3.1 in /frontend
Bumps [semver](https://github.com/npm/node-semver) from 6.3.0 to 6.3.1.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v6.3.1/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v6.3.0...v6.3.1)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-11 01:38:42 +00:00
James Cole
7035da4d75 Merge pull request #7738 from firefly-iii/dependabot/composer/develop/phpstan/phpstan-1.10.25 2023-07-10 07:16:02 +02:00
James Cole
29a40ce8dd Merge pull request #7737 from firefly-iii/dependabot/composer/develop/laravel/passport-11.8.8 2023-07-10 06:47:00 +02:00
dependabot[bot]
c6c98c4df5 chore(deps-dev): bump phpstan/phpstan from 1.10.22 to 1.10.25
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.10.22 to 1.10.25.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.11.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.10.22...1.10.25)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-10 03:55:30 +00:00
dependabot[bot]
277d7e6650 chore(deps): bump laravel/passport from 11.8.7 to 11.8.8
Bumps [laravel/passport](https://github.com/laravel/passport) from 11.8.7 to 11.8.8.
- [Release notes](https://github.com/laravel/passport/releases)
- [Changelog](https://github.com/laravel/passport/blob/11.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/passport/compare/v11.8.7...v11.8.8)

---
updated-dependencies:
- dependency-name: laravel/passport
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-10 03:55:19 +00:00
James Cole
130c539006 Merge pull request #7736 from firefly-iii/dependabot/npm_and_yarn/develop/postcss-8.4.25 2023-07-10 05:51:11 +02:00
dependabot[bot]
2bdb2e12f0 chore(deps-dev): bump postcss from 8.4.24 to 8.4.25
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.24 to 8.4.25.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.24...8.4.25)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-10 03:11:56 +00:00
James Cole
25779206a1 fix: small issue with cache 2023-07-09 18:45:44 +02:00
James Cole
92f72a5ad7 Merge branch 'main' into develop 2023-07-08 06:40:47 +02:00
James Cole
4e041248ac Merge pull request #7724 from firefly-iii/dependabot/composer/league/oauth2-server-8.5.3 2023-07-07 05:45:52 +02:00
dependabot[bot]
8cc5aa8aba chore(deps): bump league/oauth2-server from 8.5.2 to 8.5.3
Bumps [league/oauth2-server](https://github.com/thephpleague/oauth2-server) from 8.5.2 to 8.5.3.
- [Release notes](https://github.com/thephpleague/oauth2-server/releases)
- [Changelog](https://github.com/thephpleague/oauth2-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/thephpleague/oauth2-server/compare/8.5.2...8.5.3)

---
updated-dependencies:
- dependency-name: league/oauth2-server
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-06 21:14:52 +00:00
James Cole
4ba712b24e Merge pull request #7717 from tonicospinelli/testing
Cover the startOfPeriod method of Navigation class
2023-07-04 19:32:02 +02:00
Antonio Spinelli
7af9169763 Cover the startOfPeriod method of Navigation class 2023-07-04 14:15:52 -03:00
James Cole
775504acb6 Chore: Add phpdocs 2023-07-04 13:29:19 +02:00
James Cole
7840e37e1a Merge pull request #7685 from tonicospinelli/testing
Create a Calendar Calculator and setup test suite
2023-07-04 13:13:29 +02:00
Antonio Spinelli
720fff4595 Fix typo, remove unused class and change the copyright author 2023-07-04 06:26:05 -03:00
Antonio Spinelli
551c1f4cda Send code coverage to SonarCloud 2023-07-03 15:45:32 -03:00
Antonio Spinelli
7f0db0de04 Organize test suites into unit and integration
This is the goals of project organization composing different
combinations to run any number of tests together.
2023-07-03 13:46:30 -03:00
Antonio Spinelli
6ac3cc384b Add Bimonthly periodicity for Support\Calendar 2023-07-03 13:46:30 -03:00
Antonio Spinelli
563879c218 Fix a bug for monthly calculation periodicity
This change reveals a bug in the Monthly calculation date where the
difference between more than one month was discarded. The new calendar
calculator was prepared to avoid overflow at the end of the month.
2023-07-03 13:46:29 -03:00
Antonio Spinelli
dbb7ed3d5d Add the Calendar Calculator
It encapsulates some date operations like sum. The result will be the
calculated date when calling the nextDateByInterval method, given the
date, periodicity, and skipInterval parameters.

For example, given a date of 2019-12-31, monthly periodicity, and skip
interval 0, the results will be 2020-01-31. Also, if the skip interval
is 1, the result is 2020-02-29. This is because the next date will add
another month to the current range.
2023-07-03 13:46:29 -03:00
Antonio Spinelli
4e3c2ba72c Calculate the next date using periodicity strategies.
All these strategies encapsulate how the Carbon library adds the
interval to the current date.

Monthly, Quarterly, Half-Yearly, and Yearly explicitly use the
overflow control to guarantee the end of the next month or year
adequately.
2023-07-03 13:46:29 -03:00
Antonio Spinelli
8e911491f6 Add tests for Navigation
It is responsible for calculating and manipulating Dates in financial
organization is a very important feature, and requires significant
coverage.

The first test case is just to create an understanding of how it
works.
2023-07-03 13:46:29 -03:00
James Cole
03c5f3cc2d Merge pull request #7711 from firefly-iii/dependabot/composer/develop/spatie/laravel-ignition-2.2.0 2023-07-03 06:01:54 +02:00
dependabot[bot]
484565d600 chore(deps): bump spatie/laravel-ignition from 2.1.3 to 2.2.0
Bumps [spatie/laravel-ignition](https://github.com/spatie/laravel-ignition) from 2.1.3 to 2.2.0.
- [Release notes](https://github.com/spatie/laravel-ignition/releases)
- [Changelog](https://github.com/spatie/laravel-ignition/blob/main/CHANGELOG.md)
- [Commits](https://github.com/spatie/laravel-ignition/compare/2.1.3...2.2.0)

---
updated-dependencies:
- dependency-name: spatie/laravel-ignition
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 04:00:30 +00:00
James Cole
163a979227 Merge pull request #7712 from firefly-iii/dependabot/composer/develop/phpstan/phpstan-1.10.22 2023-07-03 06:00:08 +02:00
James Cole
ed105fee1d Merge pull request #7713 from firefly-iii/dependabot/composer/develop/laravel/framework-10.14.1 2023-07-03 05:59:59 +02:00
James Cole
3b82cfa486 Merge pull request #7714 from firefly-iii/dependabot/composer/develop/nunomaduro/collision-7.7.0 2023-07-03 05:59:28 +02:00
dependabot[bot]
834e52eb2e chore(deps): bump nunomaduro/collision from 7.6.0 to 7.7.0
Bumps [nunomaduro/collision](https://github.com/nunomaduro/collision) from 7.6.0 to 7.7.0.
- [Changelog](https://github.com/nunomaduro/collision/blob/v7.x/CHANGELOG.md)
- [Commits](https://github.com/nunomaduro/collision/compare/v7.6.0...v7.7.0)

---
updated-dependencies:
- dependency-name: nunomaduro/collision
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 03:52:51 +00:00
dependabot[bot]
7eb938fe23 chore(deps): bump laravel/framework from 10.13.5 to 10.14.1
Bumps [laravel/framework](https://github.com/laravel/framework) from 10.13.5 to 10.14.1.
- [Release notes](https://github.com/laravel/framework/releases)
- [Changelog](https://github.com/laravel/framework/blob/10.x/CHANGELOG.md)
- [Commits](https://github.com/laravel/framework/compare/v10.13.5...v10.14.1)

---
updated-dependencies:
- dependency-name: laravel/framework
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 03:52:47 +00:00
dependabot[bot]
8db7a4c47d chore(deps-dev): bump phpstan/phpstan from 1.10.21 to 1.10.22
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.10.21 to 1.10.22.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.11.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.10.21...1.10.22)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-03 03:52:37 +00:00
James Cole
b055a5d6af Fix #7704 2023-07-01 12:18:07 +02:00
James Cole
ad0a1b9a24 Add moar debug 2023-06-29 11:47:08 +02:00
James Cole
05d190659a More webhook debug 2023-06-29 11:35:46 +02:00
James Cole
9c6eaffba6 Better debug for webhooks 2023-06-29 11:34:34 +02:00
James Cole
3ee5e9aa04 Remove support for Heroku 2023-06-27 17:15:53 +02:00
James Cole
93a544fe53 Merge tag 'v6.0.16' into develop
v6.0.16
2023-06-27 15:02:07 +02:00
James Cole
3bc98bee20 Merge branch 'release/v6.0.16' 2023-06-27 15:02:06 +02:00
James Cole
f6302bc29b Update meta data for new release. 2023-06-27 15:01:42 +02:00
James Cole
43aa1704a9 Slight refactor in CSS fix. 2023-06-27 14:08:21 +02:00
James Cole
14fe82e361 fix: #7655 2023-06-26 06:10:16 +02:00
James Cole
33317c15a2 Merge branch 'develop' of https://github.com/firefly-iii/firefly-iii into develop 2023-06-26 06:09:10 +02:00
James Cole
ff1b56c5ef chore: update php cs fixer 2023-06-26 06:08:33 +02:00
James Cole
25e2063d70 Merge pull request #7690 from firefly-iii/dependabot/composer/develop/doctrine/dbal-3.6.4
chore(deps): bump doctrine/dbal from 3.6.3 to 3.6.4
2023-06-26 05:59:15 +02:00
James Cole
1d36c74934 Merge pull request #7689 from firefly-iii/dependabot/composer/develop/phpstan/phpstan-1.10.21
chore(deps-dev): bump phpstan/phpstan from 1.10.20 to 1.10.21
2023-06-26 05:59:06 +02:00
James Cole
aebe7908f0 Merge pull request #7687 from MateusBMP/develop
Low contrast ratio on .skin-firefly-iii .btn-info color with dark theme
2023-06-26 05:58:34 +02:00
dependabot[bot]
3e2b881296 chore(deps): bump doctrine/dbal from 3.6.3 to 3.6.4
Bumps [doctrine/dbal](https://github.com/doctrine/dbal) from 3.6.3 to 3.6.4.
- [Release notes](https://github.com/doctrine/dbal/releases)
- [Commits](https://github.com/doctrine/dbal/compare/3.6.3...3.6.4)

---
updated-dependencies:
- dependency-name: doctrine/dbal
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 03:56:30 +00:00
dependabot[bot]
c670a6991d chore(deps-dev): bump phpstan/phpstan from 1.10.20 to 1.10.21
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.10.20 to 1.10.21.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.11.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.10.20...1.10.21)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 03:56:24 +00:00
Mateus Pereira
f76a7d59e0 Updating .btn-info color to #fff (issue #7686) 2023-06-25 19:43:09 -03:00
James Cole
3d8bf3ec9b Fix #7683 2023-06-25 06:24:08 +02:00
Sander Dorigo
55e4479454 fix #7683 2023-06-24 21:00:05 +02:00
Sander Dorigo
436fe9fea4 Improve transaction validation 2023-06-24 08:27:28 +02:00
Sander Dorigo
63a7a4b03b New version 2023-06-23 11:07:50 +02:00
Sander Dorigo
0cab974048 Extended IBAN validation 2023-06-23 10:57:26 +02:00
James Cole
5fdcf37d06 Merge tag 'v6.0.15' into develop
v6.0.15
2023-06-21 13:13:11 +02:00
314 changed files with 6158 additions and 3925 deletions

View File

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

View File

@@ -1 +1,2 @@
vendor
.php-cs-fixer.cache

File diff suppressed because it is too large Load Diff

View File

@@ -470,16 +470,16 @@
},
{
"name": "symfony/dependency-injection",
"version": "v6.3.0",
"version": "v6.3.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
"reference": "ebf5f9c5bb5c21d75ab74995ce5e26c3fbbda44d"
"reference": "7abf242af21f196b65f20ab00ff251fdf3889b8d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/ebf5f9c5bb5c21d75ab74995ce5e26c3fbbda44d",
"reference": "ebf5f9c5bb5c21d75ab74995ce5e26c3fbbda44d",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/7abf242af21f196b65f20ab00ff251fdf3889b8d",
"reference": "7abf242af21f196b65f20ab00ff251fdf3889b8d",
"shasum": ""
},
"require": {
@@ -531,7 +531,7 @@
"description": "Allows you to standardize and centralize the way objects are constructed in your application",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/dependency-injection/tree/v6.3.0"
"source": "https://github.com/symfony/dependency-injection/tree/v6.3.1"
},
"funding": [
{
@@ -547,7 +547,7 @@
"type": "tidelift"
}
],
"time": "2023-05-30T17:12:32+00:00"
"time": "2023-06-24T11:51:27+00:00"
},
{
"name": "symfony/deprecation-contracts",
@@ -618,16 +618,16 @@
},
{
"name": "symfony/filesystem",
"version": "v6.3.0",
"version": "v6.3.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "97b698e1d77d356304def77a8d0cd73090b359ea"
"reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/97b698e1d77d356304def77a8d0cd73090b359ea",
"reference": "97b698e1d77d356304def77a8d0cd73090b359ea",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae",
"reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae",
"shasum": ""
},
"require": {
@@ -661,7 +661,7 @@
"description": "Provides basic utilities for the filesystem",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/filesystem/tree/v6.3.0"
"source": "https://github.com/symfony/filesystem/tree/v6.3.1"
},
"funding": [
{
@@ -677,7 +677,7 @@
"type": "tidelift"
}
],
"time": "2023-05-30T17:12:32+00:00"
"time": "2023-06-01T08:30:39+00:00"
},
{
"name": "symfony/polyfill-ctype",

View File

@@ -1,13 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="pcsg-generated-ruleset"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<!--
~ phpmd.xml
~ Copyright (c) 2023 james@firefly-iii.org
~
~ This file is part of Firefly III (https://github.com/firefly-iii).
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU Affero General Public License as
~ published by the Free Software Foundation, either version 3 of the
~ License, or (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU Affero General Public License for more details.
~
~ You should have received a copy of the GNU Affero General Public License
~ along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<ruleset name="pcsg-generated-ruleset"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>Bla bla</description>
<!--
Commando vanuit firefly directory:
<!--
Commando vanuit firefly directory:
phpmd database,app,tests html /gdrive-all/development/phpmd/phpmd.xml > public/report.html
-->
@@ -15,7 +35,7 @@ phpmd database,app,tests html /gdrive-all/development/phpmd/phpmd.xml > public/r
<rule ref="rulesets/controversial.xml">
<exclude name="CamelCasePropertyName" />
</rule>
<!-- clean code -->
<rule ref="rulesets/codesize.xml" />
<rule ref="rulesets/design.xml" />
@@ -49,4 +69,4 @@ phpmd database,app,tests html /gdrive-all/development/phpmd/phpmd.xml > public/r
<!-- no this one -->
<!--<rule ref="rulesets/cleancode.xml/StaticAccess" />-->
</ruleset>
</ruleset>

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.
# 1. Set this token to any 32-character value (this is important!).
# 2. Use this token in the cron URL instead of a user's command line token.
# 2. Use this token in the cron URL instead of a user's command line token that you can find in /profile
#
# For more info: https://docs.firefly-iii.org/firefly-iii/advanced-installation/cron/
#
@@ -298,7 +298,6 @@ PUSHER_SECRET=
PUSHER_ID=
DEMO_USERNAME=
DEMO_PASSWORD=
IS_HEROKU=false
FIREFLY_III_LAYOUT=v1
#

View File

@@ -1,5 +1,6 @@
name: Sonarcloud
on:
pull_request:
push:
branches:
- main
@@ -12,6 +13,33 @@ jobs:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: xdebug
- name: Install Composer dependencies
run: composer install --prefer-dist --no-interaction --no-progress --no-scripts
- name: Copy environment file
run: cp .env.example .env
- name: Generate app key
run: php artisan key:generate
- name: "Run tests with coverage"
run: composer coverage
- name: Fix code coverage paths
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:

2
.gitignore vendored
View File

@@ -7,4 +7,4 @@ npm-debug.log
yarn-error.log
.env
/.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();
}
/**
* @return void
*/
private function destroyObjectGroups(): void
{
/** @var ObjectGroupRepositoryInterface $repository */

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -138,7 +138,6 @@ class ConfigurationController extends Controller
*
* @return JsonResponse
* @throws ContainerExceptionInterface
* @throws FireflyException
* @throws NotFoundExceptionInterface
*/
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 Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class CronController
@@ -44,6 +46,8 @@ class CronController extends Controller
* @param string $token
*
* @return JsonResponse
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function cron(CronRequest $request, string $token): JsonResponse
{

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -126,6 +126,7 @@ class CorrectOpeningBalanceCurrencies extends Command
/**
* @param Account $account
* @param TransactionJournal $journal
*
* @return 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
{
$count = 0;

View File

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

View File

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

View File

@@ -1,5 +1,26 @@
<?php
/*
* TriggerCreditCalculation.php
* Copyright (c) 2023 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
namespace FireflyIII\Console\Commands\Correction;
@@ -29,6 +50,9 @@ class TriggerCreditCalculation extends Command
return 0;
}
/**
* @return void
*/
private function processAccounts(): void
{
$accounts = Account::leftJoin('account_types', 'accounts.account_type_id', 'account_types.id')

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -82,7 +82,8 @@ class IndexController extends Controller
$parameters = new ParameterBag();
// sub one day from temp start so the last paid date is one day before it should be.
$tempStart = clone $start;
$tempStart->subDay();
// 2023-06-23 do not sub one day from temp start, fix is in BillTransformer::payDates instead
//$tempStart->subDay();
$parameters->set('start', $tempStart);
$parameters->set('end', $end);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Http\Controllers\Json;
use Carbon\Carbon;
use Carbon\Exceptions\InvalidFormatException;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Http\Controllers\Controller;
use FireflyIII\Models\RecurrenceRepetition;
@@ -31,8 +32,6 @@ use FireflyIII\Repositories\Recurring\RecurringRepositoryInterface;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;
/**
* Class RecurrenceController
@@ -144,16 +143,16 @@ class RecurrenceController extends Controller
* @param Request $request
*
* @return JsonResponse
* @throws FireflyException
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function suggest(Request $request): JsonResponse
{
$request->validate(['date' => ['required', 'date'],]);
$string = $request->get('date') ?? date('Y-m-d');
$today = today(config('app.timezone'))->startOfDay();
$date = Carbon::createFromFormat('Y-m-d', $string)->startOfDay();
$string = '' === (string)$request->get('date') ? date('Y-m-d') : (string)$request->get('date');
$today = today(config('app.timezone'))->startOfDay();
try {
$date = Carbon::createFromFormat('Y-m-d', $string, config('app.timezone'))->startOfDay();
} catch (InvalidFormatException $e) {
$date = Carbon::today(config('app.timezone'));
}
$preSelected = (string)$request->get('pre_select');
$locale = app('steam')->getLocale();

View File

@@ -54,12 +54,12 @@ class ReportController extends Controller
app('view')->share('end', $attributes['endDate']);
$html = match ($attributes['location']) {
default => sprintf('Firefly III cannot handle "%s"-popups.', $attributes['location']),
default => sprintf('Firefly III cannot handle "%s"-popups.', $attributes['location']),
'budget-spent-amount' => $this->budgetSpentAmount($attributes),
'expense-entry' => $this->expenseEntry($attributes),
'income-entry' => $this->incomeEntry($attributes),
'category-entry' => $this->categoryEntry($attributes),
'budget-entry' => $this->budgetEntry($attributes),
'expense-entry' => $this->expenseEntry($attributes),
'income-entry' => $this->incomeEntry($attributes),
'category-entry' => $this->categoryEntry($attributes),
'budget-entry' => $this->budgetEntry($attributes),
};
return response()->json(['html' => $html]);
}

View File

@@ -1,5 +1,26 @@
<?php
/*
* TriggerController.php
* Copyright (c) 2023 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
/*
* TriggerController.php
@@ -41,6 +62,7 @@ class TriggerController extends Controller
/**
* @param Recurrence $recurrence
* @param TriggerRecurrenceRequest $request
*
* @return RedirectResponse
*/
public function trigger(Recurrence $recurrence, TriggerRecurrenceRequest $request): RedirectResponse

View File

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

View File

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

View File

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

View File

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

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