mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-08-17 19:26:40 +00:00
Compare commits
427 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
67d29b8416 | ||
|
f62e93b487 | ||
|
a7cc70b975 | ||
|
60f0d8074a | ||
|
ed1fdf9382 | ||
|
9ea3c4224e | ||
|
71325de44e | ||
|
cdb041e647 | ||
|
b9d750bf59 | ||
|
461249737e | ||
|
1aeaa8b77d | ||
|
a59d7ccdc2 | ||
|
2c1ca428db | ||
|
224970f3bd | ||
|
742d934ddb | ||
|
1699513023 | ||
|
488a8a7e86 | ||
|
dd571d6221 | ||
|
4cc5128b4c | ||
|
2636a6557a | ||
|
0bf97ccf22 | ||
|
592fc71b4e | ||
|
0e7712d3b8 | ||
|
80f21d2a4f | ||
|
5513ec068e | ||
|
14a46a6197 | ||
|
b93ee5efd8 | ||
|
cdd4dc6065 | ||
|
0d8b2ae799 | ||
|
77dc79b638 | ||
|
f48723db40 | ||
|
ebf91078c5 | ||
|
90d0d85dd6 | ||
|
0c5b4f7f64 | ||
|
9c4bb08ed1 | ||
|
1d3bbde4b0 | ||
|
b6faee033d | ||
|
05e0f88d11 | ||
|
ae9a151140 | ||
|
da633e3c62 | ||
|
8cb384d3cf | ||
|
de2a34c3ec | ||
|
b7c65446a8 | ||
|
bc648b187c | ||
|
4de0828b5d | ||
|
b2364d26ec | ||
|
83d94cb792 | ||
|
66cc3f48bc | ||
|
63297c43b7 | ||
|
5b0637558f | ||
|
e9a8e104be | ||
|
0f524e7800 | ||
|
969e0bccc9 | ||
|
ba3e026927 | ||
|
0c6868d477 | ||
|
7f70cf47ec | ||
|
fa4492287d | ||
|
60809c688e | ||
|
2404f5299c | ||
|
21a394eaf5 | ||
|
419d7846c9 | ||
|
0827accc39 | ||
|
2e53f7d0b7 | ||
|
bdfcf8ec95 | ||
|
6a20170e00 | ||
|
0c974f1ff7 | ||
|
9c098d45c5 | ||
|
cfdf9aa8dc | ||
|
2ea74542e6 | ||
|
7fcaa2b5fb | ||
|
e9e905e495 | ||
|
f67ff98d78 | ||
|
e3c4dde4ff | ||
|
9787561000 | ||
|
cd041b4c75 | ||
|
60ee70c926 | ||
|
00de78b6f1 | ||
|
33a841b831 | ||
|
df66dcf102 | ||
|
086a7a0b1e | ||
|
ec0ba3d212 | ||
|
b0ab06b7eb | ||
|
965acd6d45 | ||
|
4d156870ef | ||
|
499720df46 | ||
|
610bc108e7 | ||
|
53f1b0218c | ||
|
0a7a099796 | ||
|
ed90ebc896 | ||
|
87fe518d45 | ||
|
5cb0891a27 | ||
|
b4bd66bd58 | ||
|
64d95fe845 | ||
|
a2d6d7a92c | ||
|
1d8a784586 | ||
|
3c8bfae8ff | ||
|
f65eccfe4c | ||
|
7ce6dc9f16 | ||
|
4a73caf4c3 | ||
|
1b9d8dd3c3 | ||
|
b11bfb0aae | ||
|
024e16bf4b | ||
|
daf753d76e | ||
|
4c90f66578 | ||
|
db94f18d46 | ||
|
a9bd0f551d | ||
|
e1ba2d9ad9 | ||
|
939c636a74 | ||
|
2b829cb645 | ||
|
4bbc898639 | ||
|
27d07d5807 | ||
|
f010ffefc1 | ||
|
fc0fee161e | ||
|
72c99d3834 | ||
|
a2984f299b | ||
|
3925077223 | ||
|
deb51bd8de | ||
|
03f39f53d8 | ||
|
e72314778c | ||
|
ced3e9387a | ||
|
02c906afe6 | ||
|
7a2d4c9bd2 | ||
|
dffddfda18 | ||
|
9bb62c865a | ||
|
a97ebf2b97 | ||
|
9a62a6c514 | ||
|
04dc162270 | ||
|
75d5a50328 | ||
|
eadb7d5dcb | ||
|
8dc07f1148 | ||
|
217ce85a9b | ||
|
ef88b25dbd | ||
|
4c2e2a3a5a | ||
|
1e8e1c6e51 | ||
|
a92944786c | ||
|
8ce760a0bf | ||
|
8d8e047d2c | ||
|
06a923db94 | ||
|
551408b801 | ||
|
e1915e365a | ||
|
e8c4eec536 | ||
|
e3f4e75561 | ||
|
fd640f9698 | ||
|
ffd8aef35f | ||
|
46412bdc66 | ||
|
d73c3476c8 | ||
|
ff737ae05e | ||
|
171ec0c630 | ||
|
b4a6c6fcbe | ||
|
4886084296 | ||
|
1a3dfbdef6 | ||
|
0c087f33c2 | ||
|
5f9f621fa6 | ||
|
cd3de7b545 | ||
|
8aeb513d54 | ||
|
bfc5c5d154 | ||
|
7c9f7f04b7 | ||
|
3352c2cf3c | ||
|
e61a433999 | ||
|
3517452ea1 | ||
|
8a1190b9ee | ||
|
fc78c9a1d6 | ||
|
8d55f7f2e5 | ||
|
8162b22d43 | ||
|
8504d55f17 | ||
|
75ae1bbde1 | ||
|
a20668e91b | ||
|
eb559bbb03 | ||
|
2eae96a895 | ||
|
4bbf35bca4 | ||
|
f1b5e45488 | ||
|
57ed1581ec | ||
|
c668381ab0 | ||
|
44f99991fc | ||
|
696c76102b | ||
|
fe4e00dc5c | ||
|
1a1b0ee27d | ||
|
298c4ec654 | ||
|
c6e3fa2cc6 | ||
|
61484dcfee | ||
|
99009cff88 | ||
|
673f68b07c | ||
|
d1232192ce | ||
|
b2084a94e5 | ||
|
ddcb246955 | ||
|
8796168580 | ||
|
dde7bcfc4c | ||
|
a6503fda39 | ||
|
455e311661 | ||
|
a4a919d7b7 | ||
|
a90ce3c944 | ||
|
a6d179b883 | ||
|
1b29e5e628 | ||
|
e8fd496bca | ||
|
3d61e27a47 | ||
|
f9a55ce3d8 | ||
|
c432757942 | ||
|
da740ccbef | ||
|
f1173263b6 | ||
|
68da1a7039 | ||
|
64414edf58 | ||
|
6b136d2c8c | ||
|
752a877b91 | ||
|
d11c36e476 | ||
|
b13232f06b | ||
|
cf6ed5af32 | ||
|
be531d777e | ||
|
190508fa54 | ||
|
2c2dddc071 | ||
|
c60858de5c | ||
|
6ab332e4fb | ||
|
9df43cc710 | ||
|
79d1b15d86 | ||
|
923debb299 | ||
|
f5fef8c036 | ||
|
982134c077 | ||
|
07aeb6cd20 | ||
|
30cca355ba | ||
|
d17cc15037 | ||
|
efade857bb | ||
|
15ac6a1195 | ||
|
a45a050e7d | ||
|
e435ff8b1c | ||
|
788dae1477 | ||
|
2bb4cc7954 | ||
|
ecead8a27b | ||
|
4a2681df14 | ||
|
5761d82635 | ||
|
36fce9db4e | ||
|
1227574bc1 | ||
|
47c2a66e1d | ||
|
c59e52bbbf | ||
|
81961fd632 | ||
|
b557805eeb | ||
|
e58da3c41d | ||
|
f43b539470 | ||
|
ab3dbf9218 | ||
|
d943a5ae9b | ||
|
449058dad7 | ||
|
b9cf8b3ef2 | ||
|
27037c2fbb | ||
|
10646099a0 | ||
|
43ad63fac6 | ||
|
221c59437c | ||
|
1a94ec5bbe | ||
|
f57c554c56 | ||
|
334aec58a4 | ||
|
7035da4d75 | ||
|
29a40ce8dd | ||
|
c6c98c4df5 | ||
|
277d7e6650 | ||
|
130c539006 | ||
|
2bdb2e12f0 | ||
|
25779206a1 | ||
|
92f72a5ad7 | ||
|
4e041248ac | ||
|
8cc5aa8aba | ||
|
4ba712b24e | ||
|
7af9169763 | ||
|
775504acb6 | ||
|
7840e37e1a | ||
|
720fff4595 | ||
|
551c1f4cda | ||
|
7f0db0de04 | ||
|
6ac3cc384b | ||
|
563879c218 | ||
|
dbb7ed3d5d | ||
|
4e3c2ba72c | ||
|
8e911491f6 | ||
|
03c5f3cc2d | ||
|
484565d600 | ||
|
163a979227 | ||
|
ed105fee1d | ||
|
3b82cfa486 | ||
|
834e52eb2e | ||
|
7eb938fe23 | ||
|
8db7a4c47d | ||
|
b055a5d6af | ||
|
ad0a1b9a24 | ||
|
05d190659a | ||
|
9c6eaffba6 | ||
|
3ee5e9aa04 | ||
|
93a544fe53 | ||
|
3bc98bee20 | ||
|
f6302bc29b | ||
|
43aa1704a9 | ||
|
14fe82e361 | ||
|
33317c15a2 | ||
|
ff1b56c5ef | ||
|
25e2063d70 | ||
|
1d36c74934 | ||
|
aebe7908f0 | ||
|
3e2b881296 | ||
|
c670a6991d | ||
|
f76a7d59e0 | ||
|
3d8bf3ec9b | ||
|
55e4479454 | ||
|
436fe9fea4 | ||
|
63a7a4b03b | ||
|
0cab974048 | ||
|
5fdcf37d06 | ||
|
4663fb2f12 | ||
|
e844ab592d | ||
|
3dcb35710b | ||
|
8d87abde64 | ||
|
2b78485a61 | ||
|
9d057b853f | ||
|
bd269eaadf | ||
|
7096c65f50 | ||
|
1462b0de69 | ||
|
86a1f170c4 | ||
|
40389fb6d5 | ||
|
36021d84cf | ||
|
1278f92355 | ||
|
573f9adb49 | ||
|
431c99c27b | ||
|
77cc558931 | ||
|
42043de34f | ||
|
f2b2c2109f | ||
|
7fe29ad983 | ||
|
07d9bcfb9d | ||
|
fdd235e4cb | ||
|
2646acadb8 | ||
|
5ef646b810 | ||
|
e8bdb5ef38 | ||
|
7a851c2cc6 | ||
|
624784e54e | ||
|
20eb2ebe58 | ||
|
25f8acb417 | ||
|
f75e6430b1 | ||
|
e72a483c49 | ||
|
68934858ce | ||
|
c08b5177d9 | ||
|
fe8635f1ce | ||
|
e96d28b981 | ||
|
784cc3d52d | ||
|
2ab3fb3a71 | ||
|
ff765d4687 | ||
|
f6e778e1d4 | ||
|
ed36604050 | ||
|
cbf8c6e80d | ||
|
f11db0de61 | ||
|
34f16dcdd5 | ||
|
f18aae39b8 | ||
|
924171e7b9 | ||
|
6b580212bf | ||
|
208ae1cae7 | ||
|
3aa7fe47de | ||
|
5318082467 | ||
|
941ec095e5 | ||
|
d5ebd8e57c | ||
|
ebe087984d | ||
|
fa993e02dd | ||
|
44df77f45a | ||
|
0f8f95de9a | ||
|
f32283d2f1 | ||
|
14f8695599 | ||
|
f8b48f7455 | ||
|
70e2aab073 | ||
|
12db745f17 | ||
|
8a48cc690f | ||
|
eb313c65a5 | ||
|
07d6cbc194 | ||
|
8975a462c4 | ||
|
2e4f07d058 | ||
|
74a2935fea | ||
|
3d02468828 | ||
|
0438fb5a2e | ||
|
a4f9a6fd42 | ||
|
a0be4c9daa | ||
|
2dc003bd85 | ||
|
78aa8bd838 | ||
|
f55fde2b52 | ||
|
232572549e | ||
|
d07705c329 | ||
|
688ca8e374 | ||
|
160c364d2a | ||
|
2b3e6bfbb9 | ||
|
5a55d1db24 | ||
|
bd252dbc16 | ||
|
30124855e3 | ||
|
463ebd296f | ||
|
2e7a17560d | ||
|
374d5a074d | ||
|
88b294d873 | ||
|
0aa6d5b322 | ||
|
1357074dcd | ||
|
4a03847c14 | ||
|
346289fdb2 | ||
|
673c7d98f6 | ||
|
9473fb849a | ||
|
f60e244739 | ||
|
a571106f0f | ||
|
244d9be46e | ||
|
dcf71c6fdf | ||
|
1e1497ff4e | ||
|
b72aa92e55 | ||
|
527f18c1e3 | ||
|
788003dcdc | ||
|
c764ddd3be | ||
|
057ac0691c | ||
|
4334e9bed7 | ||
|
a9bb87b0c6 | ||
|
43f668dc65 | ||
|
6ed5892cf9 | ||
|
023a3fdade | ||
|
1b52147a05 | ||
|
7f7644c92f | ||
|
70b756baaf | ||
|
0f008b9b1e | ||
|
4d956858de | ||
|
959370a204 | ||
|
336829cd24 | ||
|
5975ab5170 | ||
|
eba0e942e8 | ||
|
f45c20db1e | ||
|
79afe09d8d | ||
|
334d010a24 | ||
|
91947daa5b | ||
|
aad2ca4488 | ||
|
7c68a96f7b | ||
|
2e1e8b5d39 | ||
|
178df1ed4a | ||
|
28749e2513 | ||
|
6cbe57ef40 | ||
|
13d3b86309 | ||
|
cf8f43cdf2 |
@@ -301,7 +301,6 @@ PUSHER_ID=
|
||||
DEMO_USERNAME=
|
||||
DEMO_PASSWORD=
|
||||
USE_ENCRYPTION=false
|
||||
IS_HEROKU=false
|
||||
FIREFLY_III_LAYOUT=v1
|
||||
|
||||
#
|
||||
|
@@ -1,250 +1,250 @@
|
||||
parameters:
|
||||
indentation: spaces
|
||||
indentation: spaces
|
||||
|
||||
file_extensions:
|
||||
- php
|
||||
file_extensions:
|
||||
- php
|
||||
|
||||
exclude_files:
|
||||
- fixtures/*
|
||||
- fixtures*/*
|
||||
- temp/*
|
||||
- tmp/*
|
||||
exclude_files:
|
||||
- fixtures/*
|
||||
- fixtures*/*
|
||||
- temp/*
|
||||
- tmp/*
|
||||
|
||||
services:
|
||||
# Checkers bellow aim on 1:1 copy of https://nette.org/en/coding-standard
|
||||
# Checkers bellow aim on 1:1 copy of https://nette.org/en/coding-standard
|
||||
|
||||
# General rules - https://nette.org/en/coding-standard#toc-general-rules
|
||||
# General rules - https://nette.org/en/coding-standard#toc-general-rules
|
||||
|
||||
# use tabs over spaces
|
||||
# PHP_CodeSniffer\Standards\Generic\Sniffs\WhiteSpace\DisallowSpaceIndentSniff: ~
|
||||
# PHP code must use only UTF-8 without BOM
|
||||
PhpCsFixer\Fixer\Basic\EncodingFixer: ~
|
||||
# <?php opening tag
|
||||
PhpCsFixer\Fixer\PhpTag\FullOpeningTagFixer: ~
|
||||
# Ensure there is no code on the same line as the PHP open tag.
|
||||
PhpCsFixer\Fixer\PhpTag\LinebreakAfterOpeningTagFixer: ~
|
||||
# The closing ?> tag must be omitted from files containing only PHP.
|
||||
PhpCsFixer\Fixer\PhpTag\NoClosingTagFixer: ~
|
||||
# There must not be trailing whitespace at the end of lines.
|
||||
PhpCsFixer\Fixer\Whitespace\NoTrailingWhitespaceFixer: ~
|
||||
# ...and at the end of blank lines.
|
||||
PhpCsFixer\Fixer\Whitespace\NoWhitespaceInBlankLineFixer: ~
|
||||
# All files must end with a single blank line.
|
||||
PhpCsFixer\Fixer\Whitespace\SingleBlankLineAtEofFixer: ~
|
||||
# File name should match class name if possible.
|
||||
PhpCsFixer\Fixer\Basic\Psr4Fixer: ~
|
||||
# Enforces using shorthand scalar typehint variants in phpDocs: `int` instead of `integer` and `bool` instead of `boolean`
|
||||
SlevomatCodingStandard\Sniffs\TypeHints\LongTypeHintsSniff: ~
|
||||
# use tabs over spaces
|
||||
# PHP_CodeSniffer\Standards\Generic\Sniffs\WhiteSpace\DisallowSpaceIndentSniff: ~
|
||||
# PHP code must use only UTF-8 without BOM
|
||||
PhpCsFixer\Fixer\Basic\EncodingFixer: ~
|
||||
# <?php opening tag
|
||||
PhpCsFixer\Fixer\PhpTag\FullOpeningTagFixer: ~
|
||||
# Ensure there is no code on the same line as the PHP open tag.
|
||||
PhpCsFixer\Fixer\PhpTag\LinebreakAfterOpeningTagFixer: ~
|
||||
# The closing ?> tag must be omitted from files containing only PHP.
|
||||
PhpCsFixer\Fixer\PhpTag\NoClosingTagFixer: ~
|
||||
# There must not be trailing whitespace at the end of lines.
|
||||
PhpCsFixer\Fixer\Whitespace\NoTrailingWhitespaceFixer: ~
|
||||
# ...and at the end of blank lines.
|
||||
PhpCsFixer\Fixer\Whitespace\NoWhitespaceInBlankLineFixer: ~
|
||||
# All files must end with a single blank line.
|
||||
PhpCsFixer\Fixer\Whitespace\SingleBlankLineAtEofFixer: ~
|
||||
# File name should match class name if possible.
|
||||
PhpCsFixer\Fixer\Basic\Psr4Fixer: ~
|
||||
# Enforces using shorthand scalar typehint variants in phpDocs: `int` instead of `integer` and `bool` instead of `boolean`
|
||||
SlevomatCodingStandard\Sniffs\TypeHints\LongTypeHintsSniff: ~
|
||||
|
||||
# File Header - https://nette.org/en/coding-standard#toc-file-header
|
||||
# File Header - https://nette.org/en/coding-standard#toc-file-header
|
||||
|
||||
# empty line before namespace
|
||||
PhpCsFixer\Fixer\NamespaceNotation\SingleBlankLineBeforeNamespaceFixer: ~
|
||||
# 1 Use statement per line
|
||||
PhpCsFixer\Fixer\Import\SingleImportPerStatementFixer: ~
|
||||
# Use statements are alphabetically ordered
|
||||
PhpCsFixer\Fixer\Import\OrderedImportsFixer: ~
|
||||
# disallow group use declarations use FooLibrary\Bar\Baz\{ ClassA, ClassB, ClassC, ClassD as Fizbo }
|
||||
SlevomatCodingStandard\Sniffs\Namespaces\DisallowGroupUseSniff: ~
|
||||
# Disallows leading backslash in use statement: use \Foo\Bar;
|
||||
SlevomatCodingStandard\Sniffs\Namespaces\UseDoesNotStartWithBackslashSniff: ~
|
||||
# Looks for unused imports from other namespaces.
|
||||
Nette\CodingStandard\Sniffs\Namespaces\UnusedUsesSniff:
|
||||
searchAnnotations: yes
|
||||
ignoredAnnotationNames: ['@testCase']
|
||||
ignoredAnnotations: ['@internal']
|
||||
# empty line before namespace
|
||||
PhpCsFixer\Fixer\NamespaceNotation\SingleBlankLineBeforeNamespaceFixer: ~
|
||||
# 1 Use statement per line
|
||||
PhpCsFixer\Fixer\Import\SingleImportPerStatementFixer: ~
|
||||
# Use statements are alphabetically ordered
|
||||
PhpCsFixer\Fixer\Import\OrderedImportsFixer: ~
|
||||
# disallow group use declarations use FooLibrary\Bar\Baz\{ ClassA, ClassB, ClassC, ClassD as Fizbo }
|
||||
SlevomatCodingStandard\Sniffs\Namespaces\DisallowGroupUseSniff: ~
|
||||
# Disallows leading backslash in use statement: use \Foo\Bar;
|
||||
SlevomatCodingStandard\Sniffs\Namespaces\UseDoesNotStartWithBackslashSniff: ~
|
||||
# Looks for unused imports from other namespaces.
|
||||
Nette\CodingStandard\Sniffs\Namespaces\UnusedUsesSniff:
|
||||
searchAnnotations: yes
|
||||
ignoredAnnotationNames: [ '@testCase' ]
|
||||
ignoredAnnotations: [ '@internal' ]
|
||||
|
||||
# Language Construct (should be placed before some other fixers)
|
||||
# Language Construct (should be placed before some other fixers)
|
||||
|
||||
# Functions should be used with `$strict` param set to `true`
|
||||
PhpCsFixer\Fixer\Strict\StrictParamFixer: ~
|
||||
# replaces is_null(parameter) expression with `null === parameter`.
|
||||
PhpCsFixer\Fixer\LanguageConstruct\IsNullFixer:
|
||||
use_yoda_style: true
|
||||
# Calling `unset` on multiple items should be done in one call.
|
||||
PhpCsFixer\Fixer\LanguageConstruct\CombineConsecutiveUnsetsFixer: ~
|
||||
# Replace all `<>` with `!=`.
|
||||
PhpCsFixer\Fixer\Operator\StandardizeNotEqualsFixer: ~
|
||||
# Include/Require and file path should be divided with a single space. File path should not be placed under brackets.
|
||||
PhpCsFixer\Fixer\ControlStructure\IncludeFixer: ~
|
||||
# Requires short ternary operator ?: when possible
|
||||
SlevomatCodingStandard\Sniffs\ControlStructures\RequireShortTernaryOperatorSniff: ~
|
||||
# Functions should be used with `$strict` param set to `true`
|
||||
PhpCsFixer\Fixer\Strict\StrictParamFixer: ~
|
||||
# replaces is_null(parameter) expression with `null === parameter`.
|
||||
PhpCsFixer\Fixer\LanguageConstruct\IsNullFixer:
|
||||
use_yoda_style: true
|
||||
# Calling `unset` on multiple items should be done in one call.
|
||||
PhpCsFixer\Fixer\LanguageConstruct\CombineConsecutiveUnsetsFixer: ~
|
||||
# Replace all `<>` with `!=`.
|
||||
PhpCsFixer\Fixer\Operator\StandardizeNotEqualsFixer: ~
|
||||
# Include/Require and file path should be divided with a single space. File path should not be placed under brackets.
|
||||
PhpCsFixer\Fixer\ControlStructure\IncludeFixer: ~
|
||||
# Requires short ternary operator ?: when possible
|
||||
SlevomatCodingStandard\Sniffs\ControlStructures\RequireShortTernaryOperatorSniff: ~
|
||||
|
||||
# Arrays - https://nette.org/en/coding-standard#toc-arrays
|
||||
# Arrays - https://nette.org/en/coding-standard#toc-arrays
|
||||
|
||||
# use short array fixes
|
||||
PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer:
|
||||
syntax: short
|
||||
# use trailing command in last array element
|
||||
PhpCsFixer\Fixer\ArrayNotation\TrailingCommaInMultilineArrayFixer: ~
|
||||
# PHP single-line arrays should not have trailing comma.
|
||||
# PhpCsFixer\Fixer\ArrayNotation\NoTrailingCommaInSinglelineArrayFixer: ~
|
||||
# In array declaration, there MUST NOT be a whitespace before each comma.
|
||||
PhpCsFixer\Fixer\ArrayNotation\NoWhitespaceBeforeCommaInArrayFixer: ~
|
||||
# Arrays should be formatted like function/method arguments, without leading or trailing single line space.
|
||||
PhpCsFixer\Fixer\ArrayNotation\TrimArraySpacesFixer: ~
|
||||
# In array declaration, there MUST be a whitespace after each comma.
|
||||
PhpCsFixer\Fixer\ArrayNotation\WhitespaceAfterCommaInArrayFixer: ~
|
||||
# use short array fixes
|
||||
PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer:
|
||||
syntax: short
|
||||
# use trailing command in last array element
|
||||
PhpCsFixer\Fixer\ArrayNotation\TrailingCommaInMultilineArrayFixer: ~
|
||||
# PHP single-line arrays should not have trailing comma.
|
||||
# PhpCsFixer\Fixer\ArrayNotation\NoTrailingCommaInSinglelineArrayFixer: ~
|
||||
# In array declaration, there MUST NOT be a whitespace before each comma.
|
||||
PhpCsFixer\Fixer\ArrayNotation\NoWhitespaceBeforeCommaInArrayFixer: ~
|
||||
# Arrays should be formatted like function/method arguments, without leading or trailing single line space.
|
||||
PhpCsFixer\Fixer\ArrayNotation\TrimArraySpacesFixer: ~
|
||||
# In array declaration, there MUST be a whitespace after each comma.
|
||||
PhpCsFixer\Fixer\ArrayNotation\WhitespaceAfterCommaInArrayFixer: ~
|
||||
|
||||
# Strings
|
||||
# Strings
|
||||
|
||||
# Convert `heredoc` to `nowdoc` where possible.
|
||||
PhpCsFixer\Fixer\StringNotation\HeredocToNowdocFixer: ~
|
||||
# Convert double quotes to single quotes for simple strings.
|
||||
PhpCsFixer\Fixer\StringNotation\SingleQuoteFixer: ~
|
||||
# Convert `heredoc` to `nowdoc` where possible.
|
||||
PhpCsFixer\Fixer\StringNotation\HeredocToNowdocFixer: ~
|
||||
# Convert double quotes to single quotes for simple strings.
|
||||
PhpCsFixer\Fixer\StringNotation\SingleQuoteFixer: ~
|
||||
|
||||
# Keywords and True/False/Null - https://nette.org/en/coding-standard#toc-keywords-and-true-false-null
|
||||
# Keywords and True/False/Null - https://nette.org/en/coding-standard#toc-keywords-and-true-false-null
|
||||
|
||||
# PHP keywords must be in lower case
|
||||
PhpCsFixer\Fixer\Casing\LowercaseKeywordsFixer: ~
|
||||
# The PHP constants `true`, `false`, and `null` MUST be in lower case
|
||||
PhpCsFixer\Fixer\Casing\LowercaseConstantsFixer: ~
|
||||
# PHP keywords must be in lower case
|
||||
PhpCsFixer\Fixer\Casing\LowercaseKeywordsFixer: ~
|
||||
# The PHP constants `true`, `false`, and `null` MUST be in lower case
|
||||
PhpCsFixer\Fixer\Casing\LowercaseConstantsFixer: ~
|
||||
|
||||
# Method and Functions Calls - https://nette.org/en/coding-standard#toc-method-and-function-calls
|
||||
# Method and Functions Calls - https://nette.org/en/coding-standard#toc-method-and-function-calls
|
||||
|
||||
# Function defined by PHP should be called using the correct casing
|
||||
PhpCsFixer\Fixer\Casing\NativeFunctionCasingFixer: ~
|
||||
# In the argument list, there must be one space after each comma, and there must no be a space before each comma
|
||||
PhpCsFixer\Fixer\FunctionNotation\MethodArgumentSpaceFixer: ~
|
||||
# This sniff checks that there are two blank lines between functions declarations and single between signatures.
|
||||
#Nette\CodingStandard\Sniffs\WhiteSpace\FunctionSpacingSniff: ~
|
||||
# Function defined by PHP should be called using the correct casing
|
||||
PhpCsFixer\Fixer\Casing\NativeFunctionCasingFixer: ~
|
||||
# In the argument list, there must be one space after each comma, and there must no be a space before each comma
|
||||
PhpCsFixer\Fixer\FunctionNotation\MethodArgumentSpaceFixer: ~
|
||||
# This sniff checks that there are two blank lines between functions declarations and single between signatures.
|
||||
#Nette\CodingStandard\Sniffs\WhiteSpace\FunctionSpacingSniff: ~
|
||||
|
||||
# Classes - https://nette.org/en/coding-standard#toc-classes
|
||||
# Classes - https://nette.org/en/coding-standard#toc-classes
|
||||
|
||||
# Inside a classy element "self" should be preferred to the class name itself.
|
||||
PhpCsFixer\Fixer\ClassNotation\SelfAccessorFixer: ~
|
||||
# class element order: constants, properties, from public to private
|
||||
PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer:
|
||||
order:
|
||||
- use_trait
|
||||
- constant
|
||||
- constant_public
|
||||
- constant_protected
|
||||
- constant_private
|
||||
- property_public
|
||||
- property_protected
|
||||
- property_private
|
||||
# Inside a classy element "self" should be preferred to the class name itself.
|
||||
PhpCsFixer\Fixer\ClassNotation\SelfAccessorFixer: ~
|
||||
# class element order: constants, properties, from public to private
|
||||
PhpCsFixer\Fixer\ClassNotation\OrderedClassElementsFixer:
|
||||
order:
|
||||
- use_trait
|
||||
- constant
|
||||
- constant_public
|
||||
- constant_protected
|
||||
- constant_private
|
||||
- property_public
|
||||
- property_protected
|
||||
- property_private
|
||||
|
||||
# Constants - https://nette.org/en/coding-standard#toc-constants
|
||||
# Constants - https://nette.org/en/coding-standard#toc-constants
|
||||
|
||||
# constant names are CAPITALIZED (manuall fixing only :()
|
||||
PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\UpperCaseConstantNameSniff: ~
|
||||
# constant names are CAPITALIZED (manuall fixing only :()
|
||||
PHP_CodeSniffer\Standards\Generic\Sniffs\NamingConventions\UpperCaseConstantNameSniff: ~
|
||||
|
||||
# Class Properties - https://nette.org/en/coding-standard#toc-class-properties
|
||||
# Class Properties - https://nette.org/en/coding-standard#toc-class-properties
|
||||
|
||||
# There MUST NOT be more than one property declared per statement.
|
||||
PhpCsFixer\Fixer\ClassNotation\SingleClassElementPerStatementFixer:
|
||||
elements: ['property']
|
||||
# There MUST NOT be more than one property declared per statement.
|
||||
PhpCsFixer\Fixer\ClassNotation\SingleClassElementPerStatementFixer:
|
||||
elements: [ 'property' ]
|
||||
|
||||
# Methods - https://nette.org/en/coding-standard#toc-methods
|
||||
# Methods - https://nette.org/en/coding-standard#toc-methods
|
||||
|
||||
# They must be declared in camelCase.
|
||||
PHP_CodeSniffer\Standards\PSR1\Sniffs\Methods\CamelCapsMethodNameSniff: ~
|
||||
# Checks that there's a single space between a typehint and a parameter name and no whitespace between a nullability symbol and a typehint
|
||||
SlevomatCodingStandard\Sniffs\TypeHints\ParameterTypeHintSpacingSniff: ~
|
||||
# Spaces should be properly placed in a function declaration.
|
||||
PhpCsFixer\Fixer\FunctionNotation\FunctionDeclarationFixer: ~
|
||||
# In function arguments there must not be arguments with default values before non-default ones.
|
||||
PhpCsFixer\Fixer\FunctionNotation\NoUnreachableDefaultArgumentValueFixer: ~
|
||||
# They must be declared in camelCase.
|
||||
PHP_CodeSniffer\Standards\PSR1\Sniffs\Methods\CamelCapsMethodNameSniff: ~
|
||||
# Checks that there's a single space between a typehint and a parameter name and no whitespace between a nullability symbol and a typehint
|
||||
SlevomatCodingStandard\Sniffs\TypeHints\ParameterTypeHintSpacingSniff: ~
|
||||
# Spaces should be properly placed in a function declaration.
|
||||
PhpCsFixer\Fixer\FunctionNotation\FunctionDeclarationFixer: ~
|
||||
# In function arguments there must not be arguments with default values before non-default ones.
|
||||
PhpCsFixer\Fixer\FunctionNotation\NoUnreachableDefaultArgumentValueFixer: ~
|
||||
|
||||
# Constans, Class Properties, Methods
|
||||
# Constans, Class Properties, Methods
|
||||
|
||||
# Constants and Properties should be separated by 1 blank line
|
||||
#PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer:
|
||||
# elements: [const, property]
|
||||
# Constants and Properties should be separated by 1 blank line
|
||||
#PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer:
|
||||
# elements: [const, property]
|
||||
|
||||
# Last property and 1st method should be separated by 2 spaces
|
||||
Nette\CodingStandard\Fixer\ClassNotation\LastPropertyAndFirstMethodSeparationFixer:
|
||||
space_count: 2
|
||||
# Last property and 1st method should be separated by 2 spaces
|
||||
Nette\CodingStandard\Fixer\ClassNotation\LastPropertyAndFirstMethodSeparationFixer:
|
||||
space_count: 2
|
||||
|
||||
# Control Statements - https://nette.org/en/coding-standard#toc-control-statements
|
||||
# Control Statements - https://nette.org/en/coding-standard#toc-control-statements
|
||||
|
||||
# The keyword `elseif` should be used instead of `else if` so that all control keywords look like single words.
|
||||
PhpCsFixer\Fixer\ControlStructure\ElseifFixer: ~
|
||||
# Remove useless semicolon statements.
|
||||
PhpCsFixer\Fixer\Semicolon\NoEmptyStatementFixer: ~
|
||||
# Remove trailing commas in list() calls.
|
||||
PhpCsFixer\Fixer\ControlStructure\NoTrailingCommaInListCallFixer: ~
|
||||
# Removes unneeded parentheses around control statements.
|
||||
PhpCsFixer\Fixer\ControlStructure\NoUnneededControlParenthesesFixer: ~
|
||||
# A case should be followed by a colon and not a semicolon.
|
||||
PhpCsFixer\Fixer\ControlStructure\SwitchCaseSemicolonToColonFixer: ~
|
||||
# The structure body must be indented once.
|
||||
# The closing brace must be on the next line after the body.
|
||||
# There should not be more than one statement per line.
|
||||
#Nette\CodingStandard\Fixer\Basic\BracesFixer:
|
||||
# allow_single_line_closure: true
|
||||
# changes if (1 === $cond) to if ($cond === 1)
|
||||
#SlevomatCodingStandard\Sniffs\ControlStructures\DisallowYodaComparisonSniff: ~
|
||||
# finds unreachable catch blocks:
|
||||
SlevomatCodingStandard\Sniffs\Exceptions\DeadCatchSniff: ~
|
||||
# The keyword `elseif` should be used instead of `else if` so that all control keywords look like single words.
|
||||
PhpCsFixer\Fixer\ControlStructure\ElseifFixer: ~
|
||||
# Remove useless semicolon statements.
|
||||
PhpCsFixer\Fixer\Semicolon\NoEmptyStatementFixer: ~
|
||||
# Remove trailing commas in list() calls.
|
||||
PhpCsFixer\Fixer\ControlStructure\NoTrailingCommaInListCallFixer: ~
|
||||
# Removes unneeded parentheses around control statements.
|
||||
PhpCsFixer\Fixer\ControlStructure\NoUnneededControlParenthesesFixer: ~
|
||||
# A case should be followed by a colon and not a semicolon.
|
||||
PhpCsFixer\Fixer\ControlStructure\SwitchCaseSemicolonToColonFixer: ~
|
||||
# The structure body must be indented once.
|
||||
# The closing brace must be on the next line after the body.
|
||||
# There should not be more than one statement per line.
|
||||
#Nette\CodingStandard\Fixer\Basic\BracesFixer:
|
||||
# allow_single_line_closure: true
|
||||
# changes if (1 === $cond) to if ($cond === 1)
|
||||
#SlevomatCodingStandard\Sniffs\ControlStructures\DisallowYodaComparisonSniff: ~
|
||||
# finds unreachable catch blocks:
|
||||
SlevomatCodingStandard\Sniffs\Exceptions\DeadCatchSniff: ~
|
||||
|
||||
# Casting
|
||||
# Casting
|
||||
|
||||
# A single space or none should be between cast and variable (int) $val
|
||||
PhpCsFixer\Fixer\CastNotation\CastSpacesFixer: ~
|
||||
# Cast should be written in lower case.
|
||||
PhpCsFixer\Fixer\CastNotation\LowercaseCastFixer: ~
|
||||
# Replaces `intval`, `floatval`, `doubleval`, `strval` and `boolval` function calls with according type casting operator
|
||||
PhpCsFixer\Fixer\CastNotation\ModernizeTypesCastingFixer: ~
|
||||
# Short cast `bool` using double exclamation mark should not be used
|
||||
PhpCsFixer\Fixer\CastNotation\NoShortBoolCastFixer: ~
|
||||
# Cast `(boolean)` and `(integer)` should be written as `(bool)` and `(int)`, `(double)` and `(real)` as `(float)`
|
||||
PhpCsFixer\Fixer\CastNotation\ShortScalarCastFixer: ~
|
||||
# A single space or none should be between cast and variable (int) $val
|
||||
PhpCsFixer\Fixer\CastNotation\CastSpacesFixer: ~
|
||||
# Cast should be written in lower case.
|
||||
PhpCsFixer\Fixer\CastNotation\LowercaseCastFixer: ~
|
||||
# Replaces `intval`, `floatval`, `doubleval`, `strval` and `boolval` function calls with according type casting operator
|
||||
PhpCsFixer\Fixer\CastNotation\ModernizeTypesCastingFixer: ~
|
||||
# Short cast `bool` using double exclamation mark should not be used
|
||||
PhpCsFixer\Fixer\CastNotation\NoShortBoolCastFixer: ~
|
||||
# Cast `(boolean)` and `(integer)` should be written as `(bool)` and `(int)`, `(double)` and `(real)` as `(float)`
|
||||
PhpCsFixer\Fixer\CastNotation\ShortScalarCastFixer: ~
|
||||
|
||||
# Language Whitespace
|
||||
# Language Whitespace
|
||||
|
||||
# Binary operators should be surrounded by at least one space. DO NOT USE
|
||||
#PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer: ~
|
||||
# Unary operators should be placed adjacent to their operands.
|
||||
PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer: ~
|
||||
# No space after the opening parenthesis and before the closing parenthesis
|
||||
PhpCsFixer\Fixer\Whitespace\NoSpacesInsideParenthesisFixer: ~
|
||||
# There MUST NOT be spaces around offset braces $a[0]
|
||||
PhpCsFixer\Fixer\Whitespace\NoSpacesAroundOffsetFixer: ~
|
||||
# There should not be space before or after object `T_OBJECT_OPERATOR` `->`.
|
||||
PhpCsFixer\Fixer\Operator\ObjectOperatorWithoutWhitespaceFixer: ~
|
||||
# Standardize spaces around ternary operator.
|
||||
PhpCsFixer\Fixer\Operator\TernaryOperatorSpacesFixer: ~
|
||||
# Concatenation $a . $b should be spaced according configuration
|
||||
PhpCsFixer\Fixer\Operator\ConcatSpaceFixer:
|
||||
spacing: one
|
||||
# Removes extra spaces between colon and case value.
|
||||
PhpCsFixer\Fixer\ControlStructure\SwitchCaseSpaceFixer: ~
|
||||
# Binary operators should be surrounded by at least one space. DO NOT USE
|
||||
#PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer: ~
|
||||
# Unary operators should be placed adjacent to their operands.
|
||||
PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer: ~
|
||||
# No space after the opening parenthesis and before the closing parenthesis
|
||||
PhpCsFixer\Fixer\Whitespace\NoSpacesInsideParenthesisFixer: ~
|
||||
# There MUST NOT be spaces around offset braces $a[0]
|
||||
PhpCsFixer\Fixer\Whitespace\NoSpacesAroundOffsetFixer: ~
|
||||
# There should not be space before or after object `T_OBJECT_OPERATOR` `->`.
|
||||
PhpCsFixer\Fixer\Operator\ObjectOperatorWithoutWhitespaceFixer: ~
|
||||
# Standardize spaces around ternary operator.
|
||||
PhpCsFixer\Fixer\Operator\TernaryOperatorSpacesFixer: ~
|
||||
# Concatenation $a . $b should be spaced according configuration
|
||||
PhpCsFixer\Fixer\Operator\ConcatSpaceFixer:
|
||||
spacing: one
|
||||
# Removes extra spaces between colon and case value.
|
||||
PhpCsFixer\Fixer\ControlStructure\SwitchCaseSpaceFixer: ~
|
||||
|
||||
# Comments
|
||||
# Comments
|
||||
|
||||
# Docblocks should have the same indentation as the documented subject.
|
||||
PhpCsFixer\Fixer\Phpdoc\PhpdocIndentFixer: ~
|
||||
# There should not be any empty comments.
|
||||
PhpCsFixer\Fixer\Comment\NoEmptyCommentFixer: ~
|
||||
# There should not be empty PHPDoc blocks.
|
||||
#PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer: ~
|
||||
# Phpdocs should start and end with content, excluding the very first and last line of the docblocks.
|
||||
PhpCsFixer\Fixer\Phpdoc\PhpdocTrimFixer: ~
|
||||
# Single-line comments comments with only one line of actual content should use the `//` syntax.
|
||||
PhpCsFixer\Fixer\Comment\SingleLineCommentStyleFixer:
|
||||
comment_types: ['hash']
|
||||
# Require comments with single-line content to be written as one-liners
|
||||
SlevomatCodingStandard\Sniffs\Commenting\RequireOneLinePropertyDocCommentSniff: ~
|
||||
# Docblocks should have the same indentation as the documented subject.
|
||||
PhpCsFixer\Fixer\Phpdoc\PhpdocIndentFixer: ~
|
||||
# There should not be any empty comments.
|
||||
PhpCsFixer\Fixer\Comment\NoEmptyCommentFixer: ~
|
||||
# There should not be empty PHPDoc blocks.
|
||||
#PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer: ~
|
||||
# Phpdocs should start and end with content, excluding the very first and last line of the docblocks.
|
||||
PhpCsFixer\Fixer\Phpdoc\PhpdocTrimFixer: ~
|
||||
# Single-line comments comments with only one line of actual content should use the `//` syntax.
|
||||
PhpCsFixer\Fixer\Comment\SingleLineCommentStyleFixer:
|
||||
comment_types: [ 'hash' ]
|
||||
# Require comments with single-line content to be written as one-liners
|
||||
SlevomatCodingStandard\Sniffs\Commenting\RequireOneLinePropertyDocCommentSniff: ~
|
||||
|
||||
|
||||
# Properties MUST not be explicitly initialized with `null`.
|
||||
#PhpCsFixer\Fixer\ClassNotation\NoNullPropertyInitializationFixer: ~
|
||||
# Properties MUST not be explicitly initialized with `null`.
|
||||
#PhpCsFixer\Fixer\ClassNotation\NoNullPropertyInitializationFixer: ~
|
||||
|
||||
PhpCsFixer\Fixer\ControlStructure\NoBreakCommentFixer:
|
||||
comment_text: 'break omitted'
|
||||
PhpCsFixer\Fixer\ControlStructure\NoBreakCommentFixer:
|
||||
comment_text: 'break omitted'
|
||||
|
||||
# declare(strict_types=1);
|
||||
PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer: ~
|
||||
# Enforces consistent formatting of return typehints: function foo(): ?int
|
||||
SlevomatCodingStandard\Sniffs\TypeHints\ReturnTypeHintSpacingSniff: ~
|
||||
# Use `null` coalescing operator `??` where possible.
|
||||
PhpCsFixer\Fixer\Operator\TernaryToNullCoalescingFixer: ~
|
||||
# declare(strict_types=1);
|
||||
PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer: ~
|
||||
# Enforces consistent formatting of return typehints: function foo(): ?int
|
||||
SlevomatCodingStandard\Sniffs\TypeHints\ReturnTypeHintSpacingSniff: ~
|
||||
# Use `null` coalescing operator `??` where possible.
|
||||
PhpCsFixer\Fixer\Operator\TernaryToNullCoalescingFixer: ~
|
||||
|
||||
Nette\CodingStandard\Fixer\ClassNotation\ClassAndTraitVisibilityRequiredFixer:
|
||||
elements: ['const', 'property', 'method']
|
||||
Nette\CodingStandard\Fixer\ClassNotation\ClassAndTraitVisibilityRequiredFixer:
|
||||
elements: [ 'const', 'property', 'method' ]
|
||||
|
||||
# short list() syntax []
|
||||
PhpCsFixer\Fixer\ListNotation\ListSyntaxFixer:
|
||||
syntax: short
|
||||
# short list() syntax []
|
||||
PhpCsFixer\Fixer\ListNotation\ListSyntaxFixer:
|
||||
syntax: short
|
||||
|
1
.ci/php-cs-fixer/.gitignore
vendored
1
.ci/php-cs-fixer/.gitignore
vendored
@@ -1 +1,2 @@
|
||||
vendor
|
||||
.php-cs-fixer.cache
|
||||
|
@@ -22,12 +22,12 @@
|
||||
$current = __DIR__;
|
||||
|
||||
$paths = [
|
||||
$current.'/../../app',
|
||||
$current.'/../../config',
|
||||
$current.'/../../database',
|
||||
$current.'/../../routes',
|
||||
$current.'/../../tests',
|
||||
$current.'/../../resources/lang',
|
||||
$current . '/../../app',
|
||||
$current . '/../../config',
|
||||
$current . '/../../database',
|
||||
$current . '/../../routes',
|
||||
$current . '/../../tests',
|
||||
$current . '/../../resources/lang',
|
||||
];
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
@@ -36,9 +36,9 @@ $finder = PhpCsFixer\Finder::create()
|
||||
|
||||
$config = new PhpCsFixer\Config();
|
||||
return $config->setRules([
|
||||
'@PSR12' => true,
|
||||
'declare_strict_types' => true,
|
||||
'strict_param' => true,
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
])
|
||||
'@PSR12' => true,
|
||||
'declare_strict_types' => true,
|
||||
'strict_param' => true,
|
||||
'array_syntax' => ['syntax' => 'short'],
|
||||
])
|
||||
->setFinder($finder);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"require": {
|
||||
"friendsofphp/php-cs-fixer": "^3.12"
|
||||
}
|
||||
"require": {
|
||||
"friendsofphp/php-cs-fixer": "^3.12"
|
||||
}
|
||||
}
|
||||
|
488
.ci/php-cs-fixer/composer.lock
generated
488
.ci/php-cs-fixer/composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -30,7 +30,7 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
# clean up php code
|
||||
cd $SCRIPT_DIR/php-cs-fixer
|
||||
composer update
|
||||
composer update --quiet
|
||||
rm -f .php-cs-fixer.cache
|
||||
PHP_CS_FIXER_IGNORE_ENV=true ./vendor/bin/php-cs-fixer fix --config $SCRIPT_DIR/php-cs-fixer/.php-cs-fixer.php --allow-risky=yes
|
||||
cd $SCRIPT_DIR/..
|
||||
|
37
.ci/phpmd.sh
Normal file
37
.ci/phpmd.sh
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# phpmd.sh
|
||||
# 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/>.
|
||||
#
|
||||
|
||||
|
||||
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
|
||||
cd $SCRIPT_DIR/phpmd
|
||||
composer update --quiet
|
||||
./vendor/bin/phpmd \
|
||||
$SCRIPT_DIR/../app text phpmd.xml \
|
||||
--exclude $SCRIPT_DIR/../app/resources/** \
|
||||
--exclude $SCRIPT_DIR/../app/frontend/** \
|
||||
--exclude $SCRIPT_DIR/../app/public/** \
|
||||
--exclude $SCRIPT_DIR/../app/vendor/** \
|
||||
|
||||
cd $SCRIPT_DIR/..
|
||||
|
||||
exit 0
|
1
.ci/phpmd/.gitignore
vendored
Normal file
1
.ci/phpmd/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
vendor
|
5
.ci/phpmd/composer.json
Normal file
5
.ci/phpmd/composer.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"require-dev": {
|
||||
"phpmd/phpmd": "^2.13"
|
||||
}
|
||||
}
|
1012
.ci/phpmd/composer.lock
generated
Normal file
1012
.ci/phpmd/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
72
.ci/phpmd/phpmd.xml
Normal file
72
.ci/phpmd/phpmd.xml
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ 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:
|
||||
phpmd database,app,tests html /gdrive-all/development/phpmd/phpmd.xml > public/report.html
|
||||
-->
|
||||
|
||||
<!-- Import the entire controversial code rule set -->
|
||||
<rule ref="rulesets/controversial.xml">
|
||||
<exclude name="CamelCasePropertyName" />
|
||||
</rule>
|
||||
|
||||
<!-- clean code -->
|
||||
<rule ref="rulesets/codesize.xml" />
|
||||
<rule ref="rulesets/design.xml" />
|
||||
<rule ref="rulesets/naming.xml" />
|
||||
<rule ref="rulesets/unusedcode.xml" />
|
||||
|
||||
<rule ref="rulesets/codesize.xml/CyclomaticComplexity">
|
||||
<properties>
|
||||
<property name="reportLevel" value="5"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/codesize.xml/NPathComplexity">
|
||||
<properties>
|
||||
<property name="minimum" value="128"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/codesize.xml/ExcessiveMethodLength">
|
||||
<properties>
|
||||
<property name="minimum" value="40"/>
|
||||
</properties>
|
||||
</rule>
|
||||
<rule ref="rulesets/codesize.xml/ExcessiveParameterList">
|
||||
<properties>
|
||||
<property name="minimum" value="5"/>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- include clean code manually -->
|
||||
<rule ref="rulesets/cleancode.xml/BooleanArgumentFlag" />
|
||||
<rule ref="rulesets/cleancode.xml/ElseExpression" />
|
||||
|
||||
<!-- no this one -->
|
||||
<!--<rule ref="rulesets/cleancode.xml/StaticAccess" />-->
|
||||
</ruleset>
|
@@ -59,3 +59,5 @@ fi
|
||||
|
||||
# restore .env file
|
||||
mv $SCRIPT_DIR/../.env.backup $SCRIPT_DIR/../.env
|
||||
|
||||
cd $SCRIPT_DIR/..
|
||||
|
@@ -1,321 +0,0 @@
|
||||
# You can leave this on "local". If you change it to production most console commands will ask for extra confirmation.
|
||||
# Never set it to "testing".
|
||||
APP_ENV=heroku
|
||||
|
||||
# Set to true if you want to see debug information in error screens.
|
||||
APP_DEBUG=false
|
||||
|
||||
# This should be your email address.
|
||||
# If you use Docker or similar, you can set this variable from a file by using SITE_OWNER_FILE
|
||||
SITE_OWNER=heroku@example.com
|
||||
|
||||
# The encryption key for your sessions. Keep this very secure.
|
||||
# If you generate a new one all existing attachments must be considered LOST.
|
||||
# Change it to a string of exactly 32 chars or use something like `php artisan key:generate` to generate it.
|
||||
# If you use Docker or similar, you can set this variable from a file by using APP_KEY_FILE
|
||||
APP_KEY=7ahyYVPVsmxjdhsweWCauGeJfwc92NP2
|
||||
|
||||
#
|
||||
# Firefly III will launch using this language (for new users and unauthenticated visitors)
|
||||
# For a list of available languages: https://github.com/firefly-iii/firefly-iii/tree/main/resources/lang
|
||||
#
|
||||
# If text is still in English, remember that not everything may have been translated.
|
||||
DEFAULT_LANGUAGE=en_US
|
||||
|
||||
# The locale defines how numbers are formatted.
|
||||
# by default this value is the same as whatever the language is.
|
||||
DEFAULT_LOCALE=equal
|
||||
|
||||
# Change this value to your preferred time zone.
|
||||
# Example: Europe/Amsterdam
|
||||
# For a list of supported time zones, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
TZ=UTC
|
||||
|
||||
# TRUSTED_PROXIES is a useful variable when using Docker and/or a reverse proxy.
|
||||
# Set it to ** and reverse proxies work just fine.
|
||||
TRUSTED_PROXIES=**
|
||||
|
||||
# The log channel defines where your log entries go to.
|
||||
# Several other options exist. You can use 'single' for one big fat error log (not recommended).
|
||||
# Also available are 'syslog', 'errorlog' and 'stdout' which will log to the system itself.
|
||||
# A rotating log option is 'daily', creates 5 files that (surprise) rotate.
|
||||
# Default setting 'stack' will log to 'daily' and to 'stdout' at the same time.
|
||||
|
||||
# - Docker + versions <= 4.8.1.8 and before: use "stdout"
|
||||
# - Docker + versions > 4.8.1.8 : use "docker_out"
|
||||
# - Docker + versions >= 5.1.1 : use "stack"
|
||||
# - For everything else (als not Docker) : use 'stack'
|
||||
|
||||
LOG_CHANNEL=stdout
|
||||
|
||||
# Log level. You can set this from least severe to most severe:
|
||||
# debug, info, notice, warning, error, critical, alert, emergency
|
||||
# If you set it to debug your logs will grow large, and fast. If you set it to emergency probably
|
||||
# nothing will get logged, ever.
|
||||
APP_LOG_LEVEL=notice
|
||||
|
||||
# Database credentials. Make sure the database exists. I recommend a dedicated user for Firefly III
|
||||
# For other database types, please see the FAQ: https://docs.firefly-iii.org/support/faq
|
||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||
# Use "pgsql" for PostgreSQL
|
||||
# Use "mysql" for MySQL and MariaDB.
|
||||
# Use "sqlite" for SQLite.
|
||||
DB_CONNECTION=pgsql
|
||||
|
||||
|
||||
# MySQL supports SSL. You can configure it here.
|
||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||
MYSQL_USE_SSL=false
|
||||
MYSQL_SSL_VERIFY_SERVER_CERT=true
|
||||
# You need to set at least of these options
|
||||
MYSQL_SSL_CAPATH=/etc/ssl/certs/
|
||||
MYSQL_SSL_CA=
|
||||
MYSQL_SSL_CERT=
|
||||
MYSQL_SSL_KEY=
|
||||
MYSQL_SSL_CIPHER=
|
||||
|
||||
# PostgreSQL supports SSL. You can configure it here.
|
||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||
PGSQL_SSL_MODE=prefer
|
||||
PGSQL_SSL_ROOT_CERT=null
|
||||
PGSQL_SSL_CERT=null
|
||||
PGSQL_SSL_KEY=null
|
||||
PGSQL_SSL_CRL_FILE=null
|
||||
|
||||
# If you're looking for performance improvements, you could install memcached.
|
||||
CACHE_DRIVER=file
|
||||
SESSION_DRIVER=file
|
||||
|
||||
# If you set either of these to 'redis', you might want to update these settings too
|
||||
# If you use Docker or similar, you can set REDIS_HOST_FILE, REDIS_PASSWORD_FILE or
|
||||
# REDIS_PORT_FILE to set the value from a file instead of from an environment variable
|
||||
|
||||
# can be tcp, unix or http
|
||||
REDIS_SCHEME=tcp
|
||||
|
||||
# use only when using 'unix' for REDIS_SCHEME. Leave empty otherwise.
|
||||
REDIS_PATH=
|
||||
|
||||
# use only when using 'tcp' or 'http' for REDIS_SCHEME. Leave empty otherwise.
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PORT=6379
|
||||
|
||||
REDIS_PASSWORD=null
|
||||
# always use quotes and make sure redis db "0" and "1" exists. Otherwise change accordingly.
|
||||
REDIS_DB="0"
|
||||
REDIS_CACHE_DB="1"
|
||||
|
||||
# Cookie settings. Should not be necessary to change these.
|
||||
# If you use Docker or similar, you can set COOKIE_DOMAIN_FILE to set
|
||||
# the value from a file instead of from an environment variable
|
||||
COOKIE_PATH="/"
|
||||
COOKIE_DOMAIN=
|
||||
COOKIE_SECURE=false
|
||||
|
||||
# If you want Firefly III to mail you, update these settings
|
||||
# For instructions, see: https://docs.firefly-iii.org/advanced-installation/email
|
||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||
MAIL_MAILER=log
|
||||
MAIL_HOST=null
|
||||
MAIL_PORT=2525
|
||||
MAIL_FROM=changeme@example.com
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
|
||||
# Other mail drivers:
|
||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||
MAILGUN_DOMAIN=
|
||||
MAILGUN_SECRET=
|
||||
|
||||
|
||||
# If you are on EU region in mailgun, use api.eu.mailgun.net, otherwise use api.mailgun.net
|
||||
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
||||
MAILGUN_ENDPOINT=api.mailgun.net
|
||||
|
||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||
MANDRILL_SECRET=
|
||||
SPARKPOST_SECRET=
|
||||
|
||||
|
||||
# Firefly III can send you the following messages
|
||||
SEND_REGISTRATION_MAIL=true
|
||||
SEND_ERROR_MESSAGE=true
|
||||
|
||||
# These messages contain (sensitive) transaction information:
|
||||
SEND_REPORT_JOURNALS=true
|
||||
|
||||
# Set a Mapbox API key here (see mapbox.com) so there might be a map available at various places.
|
||||
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
||||
MAPBOX_API_KEY=
|
||||
|
||||
# The map will default to this location:
|
||||
MAP_DEFAULT_LAT=51.983333
|
||||
MAP_DEFAULT_LONG=5.916667
|
||||
MAP_DEFAULT_ZOOM=6
|
||||
|
||||
# Firefly III currently supports two provider for live Currency Exchange Rates:
|
||||
# "fixer", and "ratesapi".
|
||||
# RatesApi.IO (see https://ratesapi.io) is a FREE and OPEN SOURCE live currency exchange rates,
|
||||
# built compatible with Fixer.IO, based on data published by European Central Bank, and doesn't require API key.
|
||||
CER_PROVIDER=ratesapi
|
||||
|
||||
# If you have select "fixer" as default currency exchange rates,
|
||||
# set a Fixer IO API key here (see https://fixer.io) to enable live currency exchange rates.
|
||||
# Please note that this WILL ONLY WORK FOR PAID fixer.io accounts because they severely limited
|
||||
# the free API up to the point where you might as well offer nothing.
|
||||
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
||||
FIXER_API_KEY=
|
||||
|
||||
# Firefly III has two options for user authentication. "eloquent" is the default,
|
||||
# and "ldap" for LDAP servers.
|
||||
# For full instructions on these settings please visit:
|
||||
# https://docs.firefly-iii.org/advanced-installation/authentication
|
||||
# If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
||||
LOGIN_PROVIDER=eloquent
|
||||
|
||||
#
|
||||
# It's also possible to change the way users are authenticated. You could use Authelia for example.
|
||||
# Authentication via the REMOTE_USER header is supported. Change the value below to "remote_user_guard".
|
||||
#
|
||||
# If you do this please read the documentation for instructions and warnings:
|
||||
# https://docs.firefly-iii.org/advanced-installation/authentication
|
||||
#
|
||||
# This function is available in Firefly III v5.3.0 and higher.
|
||||
AUTHENTICATION_GUARD=web
|
||||
|
||||
#
|
||||
# Likewise, it's impossible to log out users who's authentication is handled by an external system.
|
||||
# Enter a custom URL here that will force a logout (your authentication provider can tell you).
|
||||
# Setting this variable only works when AUTHENTICATION_GUARD != web
|
||||
#
|
||||
CUSTOM_LOGOUT_URL=
|
||||
|
||||
# LDAP connection configuration
|
||||
# OpenLDAP, FreeIPA or ActiveDirectory
|
||||
# # If you use Docker or similar, you can set this variable from a file by appending it with _FILE
|
||||
ADLDAP_CONNECTION_SCHEME=OpenLDAP
|
||||
ADLDAP_AUTO_CONNECT=true
|
||||
|
||||
# LDAP connection settings
|
||||
# You can set the following variables from a file by appending them with _FILE:
|
||||
# ADLDAP_CONTROLLERS, ADLDAP_PORT, ADLDAP_BASEDN
|
||||
ADLDAP_CONTROLLERS=
|
||||
ADLDAP_PORT=389
|
||||
ADLDAP_TIMEOUT=5
|
||||
ADLDAP_BASEDN=""
|
||||
ADLDAP_FOLLOW_REFFERALS=false
|
||||
|
||||
# SSL/TLS settings
|
||||
ADLDAP_USE_SSL=false
|
||||
ADLDAP_USE_TLS=false
|
||||
ADLDAP_SSL_CACERTDIR=
|
||||
ADLDAP_SSL_CACERTFILE=
|
||||
ADLDAP_SSL_CERTFILE=
|
||||
ADLDAP_SSL_KEYFILE=
|
||||
ADLDAP_SSL_CIPHER_SUITE=
|
||||
ADLDAP_SSL_REQUIRE_CERT=
|
||||
|
||||
# You can set the following variables from a file by appending them with _FILE:
|
||||
ADLDAP_ADMIN_USERNAME=
|
||||
ADLDAP_ADMIN_PASSWORD=
|
||||
|
||||
# You can set the following variables from a file by appending them with _FILE:
|
||||
ADLDAP_ACCOUNT_PREFIX=
|
||||
ADLDAP_ACCOUNT_SUFFIX=
|
||||
|
||||
|
||||
# LDAP authentication settings.
|
||||
ADLDAP_PASSWORD_SYNC=false
|
||||
ADLDAP_LOGIN_FALLBACK=false
|
||||
|
||||
ADLDAP_DISCOVER_FIELD=distinguishedname
|
||||
ADLDAP_AUTH_FIELD=distinguishedname
|
||||
|
||||
# Will allow SSO if your server provides an AUTH_USER field.
|
||||
# You can set the following variables from a file by appending them with _FILE:
|
||||
WINDOWS_SSO_ENABLED=false
|
||||
WINDOWS_SSO_DISCOVER=samaccountname
|
||||
WINDOWS_SSO_KEY=AUTH_USER
|
||||
|
||||
# field to sync as local username.
|
||||
# You can set the following variable from a file by appending it with _FILE:
|
||||
ADLDAP_SYNC_FIELD=userprincipalname
|
||||
|
||||
# You can disable the X-Frame-Options header if it interferes with tools like
|
||||
# Organizr. This is at your own risk. Applications running in frames run the risk
|
||||
# of leaking information to their parent frame.
|
||||
DISABLE_FRAME_HEADER=false
|
||||
|
||||
# You can disable the Content Security Policy header when you're using an ancient browser
|
||||
# or any version of Microsoft Edge / Internet Explorer (which amounts to the same thing really)
|
||||
# This leaves you with the risk of not being able to stop XSS bugs should they ever surface.
|
||||
# This is at your own risk.
|
||||
DISABLE_CSP_HEADER=false
|
||||
|
||||
# If you wish to track your own behavior over Firefly III, set valid analytics tracker information here.
|
||||
# Nobody uses this except for me on the demo site. But hey, feel free to use this if you want to.
|
||||
# Do not prepend the TRACKER_URL with http:// or https://
|
||||
# The only tracker supported is Matomo.
|
||||
# You can set the following variables from a file by appending them with _FILE:
|
||||
TRACKER_SITE_ID=
|
||||
TRACKER_URL=
|
||||
|
||||
# You can fine tune the start-up of a Docker container by editing these environment variables.
|
||||
# Use this at your own risk. Disabling certain checks and features may result in lost of inconsistent data.
|
||||
# However if you know what you're doing you can significantly speed up container start times.
|
||||
# Set each value to true to enable, or false to disable.
|
||||
|
||||
# Check if the SQLite database exists. Can be skipped if you're not using SQLite.
|
||||
# Won't significantly speed up things.
|
||||
DKR_CHECK_SQLITE=true
|
||||
|
||||
# Run database creation and migration commands. Disable this only if you're 100% sure the DB exists
|
||||
# and is up to date.
|
||||
DKR_RUN_MIGRATION=true
|
||||
|
||||
# Run database upgrade commands. Disable this only when you're 100% sure your DB is up-to-date
|
||||
# with the latest fixes (outside of migrations!)
|
||||
DKR_RUN_UPGRADE=true
|
||||
|
||||
# Verify database integrity. Includes all data checks and verifications.
|
||||
# Disabling this makes Firefly III assume your DB is intact.
|
||||
DKR_RUN_VERIFY=true
|
||||
|
||||
# Run database reporting commands. When disabled, Firefly III won't go over your data to report current state.
|
||||
# Disabling this should have no impact on data integrity or safety but it won't warn you of possible issues.
|
||||
DKR_RUN_REPORT=true
|
||||
|
||||
# Generate OAuth2 keys.
|
||||
# When disabled, Firefly III won't attempt to generate OAuth2 Passport keys. This won't be an issue, IFF (if and only if)
|
||||
# you had previously generated keys already and they're stored in your database for restoration.
|
||||
DKR_RUN_PASSPORT_INSTALL=true
|
||||
|
||||
# Leave the following configuration vars as is.
|
||||
# Unless you like to tinker and know what you're doing.
|
||||
APP_NAME=FireflyIII
|
||||
ADLDAP_CONNECTION=default
|
||||
BROADCAST_DRIVER=log
|
||||
QUEUE_DRIVER=sync
|
||||
CACHE_PREFIX=firefly
|
||||
SEARCH_RESULT_LIMIT=50
|
||||
PUSHER_KEY=
|
||||
PUSHER_SECRET=
|
||||
PUSHER_ID=
|
||||
DEMO_USERNAME=
|
||||
DEMO_PASSWORD=
|
||||
USE_ENCRYPTION=false
|
||||
IS_HEROKU=false
|
||||
FIREFLY_III_LAYOUT=v1
|
||||
|
||||
#
|
||||
# If you have trouble configuring your Firefly III installation, DON'T BOTHER setting this variable.
|
||||
# It won't work. It doesn't do ANYTHING. Don't believe the lies you read online. I'm not joking.
|
||||
# This configuration value WILL NOT HELP.
|
||||
#
|
||||
# This variable is ONLY used in some of the emails Firefly III sends around. Nowhere else.
|
||||
# So when configuring anything WEB related this variable doesn't do anything. Nothing
|
||||
#
|
||||
# If you're stuck I understand you get desperate but look SOMEWHERE ELSE.
|
||||
#
|
||||
APP_URL=http://localhost
|
@@ -1,31 +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
|
||||
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
|
18
.editorconfig
Normal file
18
.editorconfig
Normal file
@@ -0,0 +1,18 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.{yml,yaml}]
|
||||
indent_size = 2
|
||||
|
||||
[docker-compose.yml]
|
||||
indent_size = 4
|
47
.env.example
47
.env.example
@@ -45,12 +45,6 @@ TRUSTED_PROXIES=
|
||||
# Default setting 'stack' will log to 'daily' and to 'stdout' at the same time.
|
||||
LOG_CHANNEL=stack
|
||||
|
||||
#
|
||||
# Used when logging to papertrail:
|
||||
#
|
||||
PAPERTRAIL_HOST=
|
||||
PAPERTRAIL_PORT=
|
||||
|
||||
# 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
|
||||
@@ -58,11 +52,33 @@ PAPERTRAIL_PORT=
|
||||
APP_LOG_LEVEL=notice
|
||||
|
||||
# Audit log level.
|
||||
# Set this to "emergency" if you dont want to store audit logs, leave on info otherwise.
|
||||
AUDIT_LOG_LEVEL=info
|
||||
# The audit log is used to log notable Firefly III events on a separate channel.
|
||||
# These log entries may contain sensitive financial information.
|
||||
# The audit log is disabled by default.
|
||||
#
|
||||
# To enable it, set AUDIT_LOG_LEVEL to "info"
|
||||
# To disable it, set AUDIT_LOG_LEVEL to "emergency"
|
||||
AUDIT_LOG_LEVEL=emergency
|
||||
|
||||
#
|
||||
# If you want, you can redirect the audit logs to another channel.
|
||||
# Set 'audit_stdout', 'audit_syslog', 'audit_errorlog' to log to the system itself.
|
||||
# Use audit_daily to log to a rotating file.
|
||||
# Use audit_papertrail to log to papertrail.
|
||||
#
|
||||
# If you do this, the audit logs may be mixed with normal logs because the settings for these channels
|
||||
# are often the same as the settings for the normal logs.
|
||||
AUDIT_LOG_CHANNEL=
|
||||
|
||||
#
|
||||
# Used when logging to papertrail:
|
||||
# Also used when audit logs log to papertrail:
|
||||
#
|
||||
PAPERTRAIL_HOST=
|
||||
PAPERTRAIL_PORT=
|
||||
|
||||
# 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
|
||||
# For other database types, please see the FAQ: https://docs.firefly-iii.org/firefly-iii/faq/self-hosted/#i-want-to-use-sqlite
|
||||
# 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.
|
||||
@@ -134,7 +150,7 @@ COOKIE_SECURE=false
|
||||
COOKIE_SAMESITE=lax
|
||||
|
||||
# If you want Firefly III to email you, update these settings
|
||||
# For instructions, see: https://docs.firefly-iii.org/advanced-installation/email
|
||||
# For instructions, see: https://docs.firefly-iii.org/firefly-iii/advanced-installation/email/#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
|
||||
@@ -143,6 +159,7 @@ MAIL_FROM=changeme@example.com
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_SENDMAIL_COMMAND=
|
||||
|
||||
# Other mail drivers:
|
||||
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
|
||||
@@ -163,9 +180,8 @@ SEND_ERROR_MESSAGE=true
|
||||
# These messages contain (sensitive) transaction information:
|
||||
SEND_REPORT_JOURNALS=true
|
||||
|
||||
# Set this value to true if you want to set the location
|
||||
# of certain things, like transactions. Since this involves an external service, it's optional
|
||||
# and disabled by default.
|
||||
# Set this value to true if you want to set the location of certain things, like transactions.
|
||||
# Since this involves an external service, it's optional and disabled by default.
|
||||
ENABLE_EXTERNAL_MAP=false
|
||||
|
||||
# Set this value to true if you want Firefly III to download currency exchange rates
|
||||
@@ -188,7 +204,7 @@ MAP_DEFAULT_ZOOM=6
|
||||
# - 'web' (default, uses built in DB)
|
||||
# - 'remote_user_guard' for Authelia etc
|
||||
# Read more about these settings in the documentation.
|
||||
# https://docs.firefly-iii.org/advanced-installation/authentication
|
||||
# https://docs.firefly-iii.org/firefly-iii/advanced-installation/authentication
|
||||
#
|
||||
# LDAP is no longer supported :(
|
||||
#
|
||||
@@ -241,7 +257,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 +314,6 @@ PUSHER_SECRET=
|
||||
PUSHER_ID=
|
||||
DEMO_USERNAME=
|
||||
DEMO_PASSWORD=
|
||||
IS_HEROKU=false
|
||||
FIREFLY_III_LAYOUT=v1
|
||||
|
||||
#
|
||||
|
17
.gitattributes
vendored
17
.gitattributes
vendored
@@ -1,8 +1,11 @@
|
||||
* text=auto
|
||||
*.css linguist-vendored
|
||||
*.scss linguist-vendored
|
||||
*.js linguist-vendored
|
||||
* text=auto eol=lf
|
||||
|
||||
*.blade.php diff=html
|
||||
*.css diff=css
|
||||
*.html diff=html
|
||||
*.md diff=markdown
|
||||
*.php diff=php
|
||||
|
||||
/.github export-ignore
|
||||
CHANGELOG.md export-ignore
|
||||
/tests export-ignore
|
||||
/phpunit.xml export-ignore
|
||||
/.ci export-ignore
|
||||
.styleci.yml export-ignore
|
||||
|
29
.github/code_of_conduct.md
vendored
29
.github/code_of_conduct.md
vendored
@@ -2,7 +2,10 @@
|
||||
|
||||
## Our Pledge
|
||||
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
||||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making
|
||||
participation in our project and our community a harassment-free experience for everyone, regardless of age, body size,
|
||||
disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race,
|
||||
religion, or sexual identity and orientation.
|
||||
|
||||
## Our Standards
|
||||
|
||||
@@ -24,23 +27,35 @@ Examples of unacceptable behavior by participants include:
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
|
||||
appropriate and fair corrective action in response to any instances of unacceptable behavior.
|
||||
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
|
||||
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
|
||||
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the
|
||||
project or its community. Examples of representing a project or community include using an official project e-mail
|
||||
address, posting via an official social media account, or acting as an appointed representative at an online or offline
|
||||
event. Representation of a project may be further defined and clarified by project maintainers.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at james@firefly-iii.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at
|
||||
james@firefly-iii.org. The project team will review and investigate all complaints, and will respond in a way that it
|
||||
deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the
|
||||
reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
|
||||
repercussions as determined by other members of the project's leadership.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available
|
||||
at [http://contributor-covenant.org/version/1/4][version]
|
||||
|
||||
[homepage]: http://contributor-covenant.org
|
||||
|
||||
[version]: http://contributor-covenant.org/version/1/4/
|
||||
|
4
.github/contributing.md
vendored
4
.github/contributing.md
vendored
@@ -1,3 +1,3 @@
|
||||
# [Contributing guidelines](https://docs.firefly-iii.org/other-pages/contributing)
|
||||
# [Contributing guidelines](https://docs.firefly-iii.org/firefly-iii/support/#contributing-code)
|
||||
|
||||
[Contributing guidelines](https://docs.firefly-iii.org/other-pages/contributing)
|
||||
[Contributing guidelines](https://docs.firefly-iii.org/firefly-iii/support/#contributing-code)
|
||||
|
8
.github/dependabot.yml
vendored
8
.github/dependabot.yml
vendored
@@ -5,7 +5,7 @@ updates:
|
||||
- package-ecosystem: "composer"
|
||||
directory: "/" # Location of package manifests
|
||||
target-branch: develop
|
||||
labels: ["bug"]
|
||||
labels: [ "bug" ]
|
||||
versioning-strategy: increase
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
@@ -14,15 +14,15 @@ updates:
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
target-branch: develop
|
||||
labels: ["bug"]
|
||||
labels: [ "bug" ]
|
||||
versioning-strategy: increase
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
directory: "/"
|
||||
target-branch: develop
|
||||
labels: ["bug"]
|
||||
labels: [ "bug" ]
|
||||
versioning-strategy: increase
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
|
10
.github/its_you_not_me.md
vendored
10
.github/its_you_not_me.md
vendored
@@ -2,9 +2,11 @@
|
||||
|
||||
Sometimes bugs reported to Firefly III are configuration and system problems on the user's side.
|
||||
|
||||
If you run into any of the following problems, there's a good chance it's not a Firefly III issue, but a configuration issue.
|
||||
If you run into any of the following problems, there's a good chance it's not a Firefly III issue, but a configuration
|
||||
issue.
|
||||
|
||||
- ⚠️ Firefly III can't connect to the database when starting or the password is wrong, even though you're sure it's correct.
|
||||
- ⚠️ Firefly III can't connect to the database when starting or the password is wrong, even though you're sure it's
|
||||
correct.
|
||||
- ⚠️ Errors about a missing `APP_KEY` or other encryption/hash problems
|
||||
- ⚠️ You can't login due to `419` errors (page expired)
|
||||
- ⚠️ Any `500` error when starting Firefly III
|
||||
@@ -13,4 +15,6 @@ If you run into any of the following problems, there's a good chance it's not a
|
||||
- ⚠️ Firefly III does not work behind your reverse proxy
|
||||
- ⚠️ You can't connect to the Data Importer due to 404's or authentication issues.
|
||||
|
||||
If you run into an issue like this, please start a [discussion](https://github.com/firefly-iii/firefly-iii/discussions) or chat on [Gitter.im](https://gitter.im/firefly-iii/firefly-iii). There's a good chance it's not a bug but something we can fix rather quickly :+1:
|
||||
If you run into an issue like this, please start a [discussion](https://github.com/firefly-iii/firefly-iii/discussions)
|
||||
or chat on [Gitter.im](https://gitter.im/firefly-iii/firefly-iii). There's a good chance it's not a bug but something we
|
||||
can fix rather quickly :+1:
|
||||
|
6
.github/pull_request_template.md
vendored
6
.github/pull_request_template.md
vendored
@@ -11,8 +11,8 @@ Fixes issue # (if relevant)
|
||||
|
||||
Changes in this pull request:
|
||||
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
@JC5
|
||||
|
8
.github/support.md
vendored
8
.github/support.md
vendored
@@ -4,12 +4,13 @@
|
||||
|
||||
## Reporting an issue
|
||||
|
||||
First of all: thank you for reporting a bug instead of ditching the tool altogether. Bugs have a lot of priority!
|
||||
First of all: thank you for reporting a bug instead of ditching the tool altogether. Bugs have a lot of priority!
|
||||
|
||||
1. Open bugs will have open issues, so search for one first.
|
||||
2. If your feature request is already there, vote on it with :+1: or :-1: reactions.
|
||||
3. Do NOT hijack old issues with the bug you found, open your own issue.
|
||||
4. If relevant, take the time and see if the [demo site](https://demo.firefly-iii.org/) is also suffering from your issue.
|
||||
4. If relevant, take the time and see if the [demo site](https://demo.firefly-iii.org/) is also suffering from your
|
||||
issue.
|
||||
5. If relevant, read the [documentation](https://docs.firefly-iii.org/).
|
||||
|
||||
Please follow these guidelines when opening new issues:
|
||||
@@ -25,7 +26,8 @@ Only then [create a new issue](https://github.com/firefly-iii/firefly-iii/issues
|
||||
## Issue closure and abandonment policy
|
||||
|
||||
- Issues can be converted into discussions if it's not a bug or feature request.
|
||||
- Features that won't be implemented will be labelled "wontfix". [This isn't personal](https://docs.firefly-iii.org/firefly-iii/about-firefly-iii/what-its-not/).
|
||||
- Features that won't be implemented will be labelled "
|
||||
wontfix". [This isn't personal](https://docs.firefly-iii.org/firefly-iii/about-firefly-iii/what-its-not/).
|
||||
- Issues can be closed if they're duplicates of other issues.
|
||||
- Issues can be closed if the answer is in the FAQ.
|
||||
- Issues will be closed automatically after 14 days.
|
||||
|
3
.github/workflows/cleanup.yml
vendored
3
.github/workflows/cleanup.yml
vendored
@@ -56,9 +56,12 @@ jobs:
|
||||
|
||||
const workflows = [
|
||||
'cleanup.yml',
|
||||
'closed-issues.yml',
|
||||
'depsreview.yaml',
|
||||
'laravel.yml',
|
||||
'lock.yml',
|
||||
'qodana.yml',
|
||||
'sonarcloud.yml',
|
||||
'stale.yml'
|
||||
]
|
||||
|
||||
|
20
.github/workflows/closed-issues.yml
vendored
20
.github/workflows/closed-issues.yml
vendored
@@ -7,16 +7,16 @@ jobs:
|
||||
auto_comment:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
uses: aws-actions/closed-issue-message@v1
|
||||
- uses: aws-actions/closed-issue-message@v1
|
||||
with:
|
||||
message: |
|
||||
Hi there! This is an automatic reply. `Share and enjoy`
|
||||
|
||||
This issue is now closed. Please be aware that closed issues are not actively monitored. If you reply, you may get no response.
|
||||
|
||||
- If the original bug is not actually fixed, please feel free to open a new issue. Please refer to this issue for clarity.
|
||||
- Follow-up questions can also be posted in a new [discussion](https://github.com/firefly-iii/firefly-iii/discussions/)
|
||||
|
||||
Thank you for your consideration.
|
||||
Hi there! This is an automatic reply. `Share and enjoy`
|
||||
|
||||
This issue is now 🔒 closed. Please be aware that closed issues are **not** watched.
|
||||
|
||||
- If the original bug is not actually fixed, please feel free to open [a new issue](https://github.com/firefly-iii/firefly-iii/issues/new/choose). Please refer to this issue for clarity.
|
||||
- Follow-up questions must be posted in a new [discussion](https://github.com/firefly-iii/firefly-iii/discussions/)
|
||||
- Further replies to this issue will get **no response**.
|
||||
|
||||
Thank you for your contributions.
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
2
.github/workflows/depsreview.yaml
vendored
2
.github/workflows/depsreview.yaml
vendored
@@ -1,5 +1,5 @@
|
||||
name: 'Dependency Review'
|
||||
on: [pull_request]
|
||||
on: [ pull_request ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
2
.github/workflows/qodana.yml
vendored
2
.github/workflows/qodana.yml
vendored
@@ -5,8 +5,6 @@ on:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
pull_request:
|
||||
types: [ opened, synchronize, reopened ]
|
||||
jobs:
|
||||
qodana:
|
||||
runs-on: ubuntu-latest
|
||||
|
47
.github/workflows/sonarcloud.yml
vendored
Normal file
47
.github/workflows/sonarcloud.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
name: Sonarcloud
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- develop
|
||||
jobs:
|
||||
sonarcloud:
|
||||
name: SonarCloud
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- 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:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_PERSONAL_ACCESS_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -7,4 +7,4 @@ npm-debug.log
|
||||
yarn-error.log
|
||||
.env
|
||||
/.ci/php-cs-fixer/vendor
|
||||
/.ci/coverage
|
||||
coverage.xml
|
||||
|
65
app.json
65
app.json
@@ -1,65 +0,0 @@
|
||||
{
|
||||
"name": "Firefly III",
|
||||
"description": "A free and open source personal finances manager",
|
||||
"repository": "https://github.com/firefly-iii/firefly-iii",
|
||||
"website": "https://firefly-iii.org/",
|
||||
"logo": "https://raw.githubusercontent.com/firefly-iii/firefly-iii/main/public/mstile-150x150.png",
|
||||
"keywords": [
|
||||
"finance",
|
||||
"finances",
|
||||
"manager",
|
||||
"management",
|
||||
"euro",
|
||||
"dollar",
|
||||
"laravel",
|
||||
"money",
|
||||
"currency",
|
||||
"financials",
|
||||
"financial",
|
||||
"budgets",
|
||||
"administration",
|
||||
"tool",
|
||||
"tooling",
|
||||
"help",
|
||||
"helper",
|
||||
"assistant",
|
||||
"planning",
|
||||
"organizing",
|
||||
"bills",
|
||||
"personal finance",
|
||||
"budgets",
|
||||
"budgeting",
|
||||
"budgeting tool",
|
||||
"budgeting application",
|
||||
"transactions",
|
||||
"self hosted",
|
||||
"self-hosted",
|
||||
"transfers",
|
||||
"management"
|
||||
],
|
||||
"addons": [
|
||||
{
|
||||
"plan": "heroku-postgresql",
|
||||
"options": {
|
||||
"version": "12"
|
||||
}
|
||||
}
|
||||
],
|
||||
"scripts": {
|
||||
"postdeploy": "php artisan migrate:refresh --seed;php artisan firefly:instructions install"
|
||||
},
|
||||
"buildpacks": [
|
||||
{
|
||||
"url": "heroku/php"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/heroku/heroku-buildpack-locale"
|
||||
}
|
||||
],
|
||||
"env": {
|
||||
"APP_KEY": {
|
||||
"description": "This key is used to create app cookies en secure attachments.",
|
||||
"value": "base64:If1gJN4pyycXTq+WS5TjneDympKuu+8SKvTl6RZnhJg="
|
||||
}
|
||||
}
|
||||
}
|
@@ -67,7 +67,7 @@ class AccountController extends Controller
|
||||
* Documentation for this endpoint:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getAccountsAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws JsonException
|
||||
@@ -81,8 +81,9 @@ class AccountController extends Controller
|
||||
$query = $data['query'];
|
||||
$date = $data['date'] ?? today(config('app.timezone'));
|
||||
|
||||
$return = [];
|
||||
$result = $this->repository->searchAccount((string)$query, $types, $data['limit']);
|
||||
$return = [];
|
||||
$result = $this->repository->searchAccount((string)$query, $types, $data['limit']);
|
||||
// TODO this code is duplicated in the V2 Autocomplete controller, which means this code is due to be deprecated.
|
||||
$defaultCurrency = app('amount')->getDefaultCurrency();
|
||||
|
||||
/** @var Account $account */
|
||||
@@ -92,7 +93,11 @@ class AccountController extends Controller
|
||||
|
||||
if (in_array($account->accountType->type, $this->balanceTypes, true)) {
|
||||
$balance = app('steam')->balance($account, $date);
|
||||
$nameWithBalance = sprintf('%s (%s)', $account->name, app('amount')->formatAnything($currency, $balance, false));
|
||||
$nameWithBalance = sprintf(
|
||||
'%s (%s)',
|
||||
$account->name,
|
||||
app('amount')->formatAnything($currency, $balance, false)
|
||||
);
|
||||
}
|
||||
|
||||
$return[] = [
|
||||
@@ -109,14 +114,14 @@ class AccountController extends Controller
|
||||
}
|
||||
|
||||
// custom order.
|
||||
$order = [AccountType::ASSET, AccountType::REVENUE, AccountType::EXPENSE];
|
||||
usort(
|
||||
$return,
|
||||
function ($a, $b) use ($order) {
|
||||
$pos_a = array_search($a['type'], $order, true);
|
||||
$pos_b = array_search($b['type'], $order, true);
|
||||
function ($a, $b) {
|
||||
$order = [AccountType::ASSET, AccountType::REVENUE, AccountType::EXPENSE];
|
||||
$posA = array_search($a['type'], $order, true);
|
||||
$posB = array_search($b['type'], $order, true);
|
||||
|
||||
return $pos_a - $pos_b;
|
||||
return $posA - $posB;
|
||||
}
|
||||
);
|
||||
|
||||
|
@@ -60,7 +60,7 @@ class BillController extends Controller
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getBillsAC
|
||||
* TODO expand API to add active field.
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -59,7 +59,7 @@ class BudgetController extends Controller
|
||||
* Documentation for this endpoint is at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getBudgetsAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -59,7 +59,7 @@ class CategoryController extends Controller
|
||||
* Documentation for this endpoint is at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getCategoriesAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -59,7 +59,7 @@ class CurrencyController extends Controller
|
||||
* Documentation for this endpoint is at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getCurrenciesAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
@@ -87,7 +87,7 @@ class CurrencyController extends Controller
|
||||
* Documentation for this endpoint is at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getCurrenciesCodeAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @deprecated
|
||||
|
@@ -59,7 +59,7 @@ class ObjectGroupController extends Controller
|
||||
* Documentation for this endpoint is at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getObjectGroupsAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -63,7 +63,7 @@ class PiggyBankController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getPiggiesAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
@@ -98,7 +98,7 @@ class PiggyBankController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getPiggiesBalanceAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -57,7 +57,7 @@ class RecurrenceController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getRecurringAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -56,7 +56,7 @@ class RuleController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getRulesAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -56,7 +56,7 @@ class RuleGroupController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getRuleGroupsAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -59,7 +59,7 @@ class TagController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getTagAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -64,7 +64,7 @@ class TransactionController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getTransactionsAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
@@ -94,7 +94,7 @@ class TransactionController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getTransactionsIDAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -55,7 +55,7 @@ class TransactionTypeController extends Controller
|
||||
* This endpoint is documented at
|
||||
* * https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/autocomplete/getTransactionTypesAC
|
||||
*
|
||||
* @param AutocompleteRequest $request
|
||||
* @param AutocompleteRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -76,7 +76,7 @@ class AccountController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/charts/getChartAccountOverview
|
||||
*
|
||||
* @param DateRequest $request
|
||||
* @param DateRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -113,7 +113,7 @@ class AccountController extends Controller
|
||||
if (null === $currency) {
|
||||
$currency = $default;
|
||||
}
|
||||
$currentSet = [
|
||||
$currentSet = [
|
||||
'label' => $account->name,
|
||||
'currency_id' => (string)$currency->id,
|
||||
'currency_code' => $currency->code,
|
||||
@@ -125,6 +125,7 @@ class AccountController extends Controller
|
||||
'yAxisID' => 0, // 0, 1, 2
|
||||
'entries' => [],
|
||||
];
|
||||
// TODO this code is also present in the V2 chart account controller so this method is due to be deprecated.
|
||||
$currentStart = clone $start;
|
||||
$range = app('steam')->balanceInRange($account, $start, clone $end);
|
||||
// 2022-10-11 this method no longer converts to float.
|
||||
|
@@ -102,15 +102,22 @@ abstract class Controller extends BaseController
|
||||
} catch (BadRequestException $e) {
|
||||
Log::error(sprintf('Request field "%s" contains a non-scalar value. Value set to NULL.', $field));
|
||||
Log::error($e->getMessage());
|
||||
Log::error($e->getTraceAsString());
|
||||
$value = null;
|
||||
}
|
||||
$obj = null;
|
||||
if (null !== $date) {
|
||||
try {
|
||||
$obj = Carbon::parse($date);
|
||||
} catch (InvalidDateException|InvalidFormatException $e) {
|
||||
} catch (InvalidDateException | InvalidFormatException $e) {
|
||||
// don't care
|
||||
app('log')->warning(sprintf('Ignored invalid date "%s" in API controller parameter check: %s', substr($date, 0, 20), $e->getMessage()));
|
||||
app('log')->warning(
|
||||
sprintf(
|
||||
'Ignored invalid date "%s" in API controller parameter check: %s',
|
||||
substr($date, 0, 20),
|
||||
$e->getMessage()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
$bag->set($field, $obj);
|
||||
@@ -124,6 +131,7 @@ abstract class Controller extends BaseController
|
||||
} catch (BadRequestException $e) {
|
||||
Log::error(sprintf('Request field "%s" contains a non-scalar value. Value set to NULL.', $integer));
|
||||
Log::error($e->getMessage());
|
||||
Log::error($e->getTraceAsString());
|
||||
$value = null;
|
||||
}
|
||||
if (null !== $value) {
|
||||
@@ -136,7 +144,7 @@ abstract class Controller extends BaseController
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ParameterBag $bag
|
||||
* @param ParameterBag $bag
|
||||
*
|
||||
* @return ParameterBag
|
||||
*/
|
||||
@@ -148,6 +156,7 @@ abstract class Controller extends BaseController
|
||||
} catch (BadRequestException $e) {
|
||||
Log::error('Request field "sort" contains a non-scalar value. Value set to NULL.');
|
||||
Log::error($e->getMessage());
|
||||
Log::error($e->getTraceAsString());
|
||||
$param = '';
|
||||
}
|
||||
if ('' === $param) {
|
||||
@@ -170,7 +179,6 @@ abstract class Controller extends BaseController
|
||||
return $bag;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method to help build URL's.
|
||||
*
|
||||
@@ -191,7 +199,7 @@ abstract class Controller extends BaseController
|
||||
$params[$key] = $value;
|
||||
}
|
||||
|
||||
return $return.http_build_query($params);
|
||||
return $return . http_build_query($params);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -201,7 +209,7 @@ abstract class Controller extends BaseController
|
||||
{
|
||||
// create some objects:
|
||||
$manager = new Manager();
|
||||
$baseUrl = request()->getSchemeAndHttpHost().'/api/v1';
|
||||
$baseUrl = request()->getSchemeAndHttpHost() . '/api/v1';
|
||||
$manager->setSerializer(new JsonApiSerializer($baseUrl));
|
||||
|
||||
return $manager;
|
||||
|
@@ -64,7 +64,7 @@ class TransactionController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/bulkUpdateTransactions
|
||||
*
|
||||
* @param TransactionRequest $request
|
||||
* @param TransactionRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
@@ -89,7 +89,7 @@ class TransactionController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $params
|
||||
* @param array $params
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
|
@@ -58,7 +58,7 @@ class DestroyController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/destroyData
|
||||
*
|
||||
* @param DestroyRequest $request
|
||||
* @param DestroyRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -279,6 +279,9 @@ class DestroyController extends Controller
|
||||
$tagRepository->destroyAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
private function destroyObjectGroups(): void
|
||||
{
|
||||
/** @var ObjectGroupRepositoryInterface $repository */
|
||||
@@ -287,7 +290,7 @@ class DestroyController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $types
|
||||
* @param array $types
|
||||
*/
|
||||
private function destroyAccounts(array $types): void
|
||||
{
|
||||
@@ -312,7 +315,7 @@ class DestroyController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $types
|
||||
* @param array $types
|
||||
*/
|
||||
private function destroyTransactions(array $types): void
|
||||
{
|
||||
|
@@ -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
|
||||
@@ -57,7 +59,7 @@ class ExportController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportAccounts
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
@@ -70,10 +72,12 @@ class ExportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $key
|
||||
* @param string $key
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
* @throws ContainerExceptionInterface
|
||||
* @throws NotFoundExceptionInterface
|
||||
*/
|
||||
private function returnExport(string $key): LaravelResponse
|
||||
{
|
||||
@@ -86,7 +90,7 @@ class ExportController extends Controller
|
||||
$response
|
||||
->header('Content-Description', 'File Transfer')
|
||||
->header('Content-Type', 'application/octet-stream')
|
||||
->header('Content-Disposition', 'attachment; filename='.$fileName)
|
||||
->header('Content-Disposition', 'attachment; filename=' . $fileName)
|
||||
->header('Content-Transfer-Encoding', 'binary')
|
||||
->header('Connection', 'Keep-Alive')
|
||||
->header('Expires', '0')
|
||||
@@ -101,7 +105,7 @@ class ExportController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportBills
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
@@ -117,7 +121,7 @@ class ExportController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportBudgets
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
@@ -133,7 +137,7 @@ class ExportController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportCategories
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
@@ -149,7 +153,7 @@ class ExportController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportPiggies
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
@@ -165,7 +169,7 @@ class ExportController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportRecurring
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
@@ -181,7 +185,7 @@ class ExportController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportRules
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
@@ -197,7 +201,7 @@ class ExportController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportTags
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
@@ -213,7 +217,7 @@ class ExportController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/exportTransactions
|
||||
*
|
||||
* @param ExportRequest $request
|
||||
* @param ExportRequest $request
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
|
@@ -37,12 +37,16 @@ use FireflyIII\Models\TransactionGroup;
|
||||
use FireflyIII\Models\TransactionJournal;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
|
||||
/**
|
||||
* Class PurgeController
|
||||
*/
|
||||
class PurgeController extends Controller
|
||||
{
|
||||
/**
|
||||
* TODO cleanup and use repositories.
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/data/purgeData
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function purge(): JsonResponse
|
||||
|
@@ -76,7 +76,7 @@ class AccountController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightExpenseAsset
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
@@ -107,7 +107,7 @@ class AccountController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightExpenseExpense
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -61,7 +61,7 @@ class BillController extends Controller
|
||||
*
|
||||
* Expenses per bill, possibly filtered by bill and account.
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
@@ -124,7 +124,7 @@ class BillController extends Controller
|
||||
*
|
||||
* Expenses for no bill filtered by account.
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -68,7 +68,7 @@ class BudgetController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightExpenseBudget
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
@@ -105,7 +105,7 @@ class BudgetController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightExpenseNoBudget
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -69,7 +69,7 @@ class CategoryController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightTransferCategory
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
@@ -106,7 +106,7 @@ class CategoryController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightTransferNoCategory
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -38,7 +38,7 @@ class PeriodController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightExpenseTotal
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -60,7 +60,7 @@ class TagController extends Controller
|
||||
*
|
||||
* Expenses for no tag filtered by account.
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
@@ -113,7 +113,7 @@ class TagController extends Controller
|
||||
*
|
||||
* Expenses per tag, possibly filtered by tag and account.
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -76,7 +76,7 @@ class AccountController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightIncomeAsset
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
@@ -106,7 +106,7 @@ class AccountController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightIncomeRevenue
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -69,7 +69,7 @@ class CategoryController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightIncomeCategory
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
@@ -106,7 +106,7 @@ class CategoryController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightIncomeNoCategory
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -38,7 +38,7 @@ class PeriodController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightIncomeTotal
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -61,7 +61,7 @@ class TagController extends Controller
|
||||
*
|
||||
* Expenses for no tag filtered by account.
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
@@ -117,7 +117,7 @@ class TagController extends Controller
|
||||
*
|
||||
* Expenses per tag, possibly filtered by tag and account.
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -61,7 +61,7 @@ class AccountController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightTransfers
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -68,7 +68,7 @@ class CategoryController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightTransferCategory
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
@@ -105,7 +105,7 @@ class CategoryController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightTransferNoCategory
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -38,7 +38,7 @@ class PeriodController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightTransferTotal
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -58,7 +58,7 @@ class TagController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/insight/insightTransferNoTag
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
@@ -114,7 +114,7 @@ class TagController extends Controller
|
||||
*
|
||||
* Transfers per tag, possibly filtered by tag and account.
|
||||
*
|
||||
* @param GenericRequest $request
|
||||
* @param GenericRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -61,7 +61,7 @@ class DestroyController extends Controller
|
||||
*
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Account $account
|
||||
* @param Account $account
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -73,7 +73,7 @@ class ListController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/accounts/listAttachmentByAccount
|
||||
*
|
||||
* @param Account $account
|
||||
* @param Account $account
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -89,7 +89,7 @@ class ListController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.accounts.attachments', [$account->id]).$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.accounts.attachments', [$account->id]) . $this->buildParams());
|
||||
|
||||
/** @var AttachmentTransformer $transformer */
|
||||
$transformer = app(AttachmentTransformer::class);
|
||||
@@ -105,7 +105,7 @@ class ListController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/accounts/listPiggyBankByAccount
|
||||
*
|
||||
* @param Account $account
|
||||
* @param Account $account
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -125,7 +125,7 @@ class ListController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($piggyBanks, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.accounts.piggy-banks', [$account->id]).$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.accounts.piggy-banks', [$account->id]) . $this->buildParams());
|
||||
|
||||
/** @var PiggyBankTransformer $transformer */
|
||||
$transformer = app(PiggyBankTransformer::class);
|
||||
@@ -144,8 +144,8 @@ class ListController extends Controller
|
||||
* Show all transaction groups related to the account.
|
||||
*
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Account $account
|
||||
* @param Request $request
|
||||
* @param Account $account
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -177,7 +177,7 @@ class ListController extends Controller
|
||||
}
|
||||
|
||||
$paginator = $collector->getPaginatedGroups();
|
||||
$paginator->setPath(route('api.v1.accounts.transactions', [$account->id]).$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.accounts.transactions', [$account->id]) . $this->buildParams());
|
||||
$groups = $paginator->getCollection();
|
||||
|
||||
/** @var TransactionGroupTransformer $transformer */
|
||||
|
@@ -71,7 +71,7 @@ class ShowController extends Controller
|
||||
*
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -98,7 +98,7 @@ class ShowController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($accounts, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.accounts.index').$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.accounts.index') . $this->buildParams());
|
||||
|
||||
/** @var AccountTransformer $transformer */
|
||||
$transformer = app(AccountTransformer::class);
|
||||
@@ -116,7 +116,7 @@ class ShowController extends Controller
|
||||
*
|
||||
* Show single instance.
|
||||
*
|
||||
* @param Account $account
|
||||
* @param Account $account
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -63,7 +63,7 @@ class StoreController extends Controller
|
||||
*
|
||||
* Store a new instance.
|
||||
*
|
||||
* @param StoreRequest $request
|
||||
* @param StoreRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -29,8 +29,8 @@ use FireflyIII\Models\Account;
|
||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||
use FireflyIII\Transformers\AccountTransformer;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use League\Fractal\Resource\Item;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use League\Fractal\Resource\Item;
|
||||
use Preferences;
|
||||
|
||||
/**
|
||||
@@ -66,8 +66,8 @@ class UpdateController extends Controller
|
||||
*
|
||||
* Update account.
|
||||
*
|
||||
* @param UpdateRequest $request
|
||||
* @param Account $account
|
||||
* @param UpdateRequest $request
|
||||
* @param Account $account
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
@@ -75,7 +75,7 @@ class UpdateController extends Controller
|
||||
{
|
||||
Log::debug(sprintf('Now in %s', __METHOD__));
|
||||
$data = $request->getUpdateData();
|
||||
$data['type'] = config('firefly.shortNamesByFullName.'.$account->accountType->type);
|
||||
$data['type'] = config('firefly.shortNamesByFullName.' . $account->accountType->type);
|
||||
$account = $this->repository->update($account, $data);
|
||||
$manager = $this->getManager();
|
||||
$account->refresh();
|
||||
|
@@ -65,7 +65,7 @@ class DestroyController extends Controller
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
*
|
||||
* @param Attachment $attachment
|
||||
* @param Attachment $attachment
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -71,7 +71,7 @@ class ShowController extends Controller
|
||||
*
|
||||
* Download an attachment.
|
||||
*
|
||||
* @param Attachment $attachment
|
||||
* @param Attachment $attachment
|
||||
*
|
||||
* @return LaravelResponse
|
||||
* @throws FireflyException
|
||||
@@ -96,7 +96,7 @@ class ShowController extends Controller
|
||||
$response
|
||||
->header('Content-Description', 'File Transfer')
|
||||
->header('Content-Type', 'application/octet-stream')
|
||||
->header('Content-Disposition', 'attachment; filename='.$quoted)
|
||||
->header('Content-Disposition', 'attachment; filename=' . $quoted)
|
||||
->header('Content-Transfer-Encoding', 'binary')
|
||||
->header('Connection', 'Keep-Alive')
|
||||
->header('Expires', '0')
|
||||
@@ -132,7 +132,7 @@ class ShowController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.attachments.index').$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.attachments.index') . $this->buildParams());
|
||||
|
||||
/** @var AttachmentTransformer $transformer */
|
||||
$transformer = app(AttachmentTransformer::class);
|
||||
@@ -150,7 +150,7 @@ class ShowController extends Controller
|
||||
*
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param Attachment $attachment
|
||||
* @param Attachment $attachment
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -34,8 +34,8 @@ use FireflyIII\Transformers\AttachmentTransformer;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
use League\Fractal\Resource\Item;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use League\Fractal\Resource\Item;
|
||||
|
||||
/**
|
||||
* Class StoreController
|
||||
@@ -71,7 +71,7 @@ class StoreController extends Controller
|
||||
*
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param StoreRequest $request
|
||||
* @param StoreRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -96,8 +96,8 @@ class StoreController extends Controller
|
||||
* Upload an attachment.
|
||||
*
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Attachment $attachment
|
||||
* @param Request $request
|
||||
* @param Attachment $attachment
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -67,8 +67,8 @@ class UpdateController extends Controller
|
||||
*
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param UpdateRequest $request
|
||||
* @param Attachment $attachment
|
||||
* @param UpdateRequest $request
|
||||
* @param Attachment $attachment
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -88,7 +88,7 @@ class ShowController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($availableBudgets, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.available-budgets.index').$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.available-budgets.index') . $this->buildParams());
|
||||
|
||||
/** @var AvailableBudgetTransformer $transformer */
|
||||
$transformer = app(AvailableBudgetTransformer::class);
|
||||
@@ -106,7 +106,7 @@ class ShowController extends Controller
|
||||
*
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param AvailableBudget $availableBudget
|
||||
* @param AvailableBudget $availableBudget
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -59,7 +59,7 @@ class DestroyController extends Controller
|
||||
*
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Bill $bill
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -72,7 +72,7 @@ class ListController extends Controller
|
||||
*
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @param Bill $bill
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -88,7 +88,7 @@ class ListController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.bills.attachments', [$bill->id]).$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.bills.attachments', [$bill->id]) . $this->buildParams());
|
||||
|
||||
/** @var AttachmentTransformer $transformer */
|
||||
$transformer = app(AttachmentTransformer::class);
|
||||
@@ -106,7 +106,7 @@ class ListController extends Controller
|
||||
*
|
||||
* List all of them.
|
||||
*
|
||||
* @param Bill $bill
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -125,7 +125,7 @@ class ListController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($rules, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.bills.rules', [$bill->id]).$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.bills.rules', [$bill->id]) . $this->buildParams());
|
||||
|
||||
/** @var RuleTransformer $transformer */
|
||||
$transformer = app(RuleTransformer::class);
|
||||
@@ -142,9 +142,9 @@ class ListController extends Controller
|
||||
*
|
||||
* Show all transactions.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Request $request
|
||||
*
|
||||
* @param Bill $bill
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -184,7 +184,7 @@ class ListController extends Controller
|
||||
|
||||
// get paginator.
|
||||
$paginator = $collector->getPaginatedGroups();
|
||||
$paginator->setPath(route('api.v1.bills.transactions', [$bill->id]).$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.bills.transactions', [$bill->id]) . $this->buildParams());
|
||||
$transactions = $paginator->getCollection();
|
||||
|
||||
/** @var TransactionGroupTransformer $transformer */
|
||||
|
@@ -94,7 +94,7 @@ class ShowController extends Controller
|
||||
*
|
||||
* Show the specified bill.
|
||||
*
|
||||
* @param Bill $bill
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -65,7 +65,7 @@ class StoreController extends Controller
|
||||
*
|
||||
* Store a bill.
|
||||
*
|
||||
* @param StoreRequest $request
|
||||
* @param StoreRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
|
@@ -62,8 +62,8 @@ class UpdateController extends Controller
|
||||
*
|
||||
* Update a bill.
|
||||
*
|
||||
* @param UpdateRequest $request
|
||||
* @param Bill $bill
|
||||
* @param UpdateRequest $request
|
||||
* @param Bill $bill
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -59,7 +59,7 @@ class DestroyController extends Controller
|
||||
*
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -74,7 +74,7 @@ class ListController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/listAttachmentByBudget
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -90,7 +90,7 @@ class ListController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.budgets.attachments', [$budget->id]).$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.budgets.attachments', [$budget->id]) . $this->buildParams());
|
||||
|
||||
/** @var AttachmentTransformer $transformer */
|
||||
$transformer = app(AttachmentTransformer::class);
|
||||
@@ -108,7 +108,7 @@ class ListController extends Controller
|
||||
*
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -122,7 +122,7 @@ class ListController extends Controller
|
||||
$count = $collection->count();
|
||||
$budgetLimits = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
||||
$paginator = new LengthAwarePaginator($budgetLimits, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.budgets.budget-limits', [$budget->id]).$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.budgets.budget-limits', [$budget->id]) . $this->buildParams());
|
||||
|
||||
/** @var BudgetLimitTransformer $transformer */
|
||||
$transformer = app(BudgetLimitTransformer::class);
|
||||
@@ -139,9 +139,9 @@ class ListController extends Controller
|
||||
*
|
||||
* Show all transactions.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Request $request
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -186,7 +186,7 @@ class ListController extends Controller
|
||||
}
|
||||
|
||||
$paginator = $collector->getPaginatedGroups();
|
||||
$paginator->setPath(route('api.v1.budgets.transactions', [$budget->id]).$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.budgets.transactions', [$budget->id]) . $this->buildParams());
|
||||
$transactions = $paginator->getCollection();
|
||||
|
||||
/** @var TransactionGroupTransformer $transformer */
|
||||
@@ -204,7 +204,7 @@ class ListController extends Controller
|
||||
*
|
||||
* Show all transactions.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -249,7 +249,7 @@ class ListController extends Controller
|
||||
}
|
||||
|
||||
$paginator = $collector->getPaginatedGroups();
|
||||
$paginator->setPath(route('api.v1.budgets.without-budget').$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.budgets.without-budget') . $this->buildParams());
|
||||
$transactions = $paginator->getCollection();
|
||||
|
||||
/** @var TransactionGroupTransformer $transformer */
|
||||
|
@@ -86,7 +86,7 @@ class ShowController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($budgets, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.budgets.index').$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.budgets.index') . $this->buildParams());
|
||||
|
||||
/** @var BudgetTransformer $transformer */
|
||||
$transformer = app(BudgetTransformer::class);
|
||||
@@ -101,7 +101,7 @@ class ShowController extends Controller
|
||||
/**
|
||||
* Show a budget.
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -62,7 +62,7 @@ class StoreController extends Controller
|
||||
*
|
||||
* Store a budget.
|
||||
*
|
||||
* @param StoreRequest $request
|
||||
* @param StoreRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
|
@@ -62,8 +62,8 @@ class UpdateController extends Controller
|
||||
*
|
||||
* Update a budget.
|
||||
*
|
||||
* @param UpdateRequest $request
|
||||
* @param Budget $budget
|
||||
* @param UpdateRequest $request
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -64,8 +64,8 @@ class DestroyController extends Controller
|
||||
*
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit $budgetLimit
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit $budgetLimit
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
|
@@ -71,9 +71,9 @@ class ListController extends Controller
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/listTransactionByBudgetLimit
|
||||
* Show all transactions.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit $budgetLimit
|
||||
* @param Request $request
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit $budgetLimit
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -109,7 +109,7 @@ class ListController extends Controller
|
||||
$collector->setRange($budgetLimit->start_date, $budgetLimit->end_date);
|
||||
$collector->setTypes($types);
|
||||
$paginator = $collector->getPaginatedGroups();
|
||||
$paginator->setPath(route('api.v1.budgets.limits.transactions', [$budget->id, $budgetLimit->id]).$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.budgets.limits.transactions', [$budget->id, $budgetLimit->id]) . $this->buildParams());
|
||||
$transactions = $paginator->getCollection();
|
||||
|
||||
/** @var TransactionGroupTransformer $transformer */
|
||||
|
@@ -75,8 +75,8 @@ class ShowController extends Controller
|
||||
*
|
||||
* Display a listing of the budget limits for this budget.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Budget $budget
|
||||
* @param Request $request
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -90,7 +90,7 @@ class ShowController extends Controller
|
||||
$count = $collection->count();
|
||||
$budgetLimits = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
||||
$paginator = new LengthAwarePaginator($budgetLimits, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.budgets.limits.index', [$budget->id]).$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.budgets.limits.index', [$budget->id]) . $this->buildParams());
|
||||
|
||||
/** @var BudgetLimitTransformer $transformer */
|
||||
$transformer = app(BudgetLimitTransformer::class);
|
||||
@@ -108,7 +108,7 @@ class ShowController extends Controller
|
||||
*
|
||||
* Display a listing of the budget limits for this budget.
|
||||
*
|
||||
* @param SameDateRequest $request
|
||||
* @param SameDateRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -122,7 +122,7 @@ class ShowController extends Controller
|
||||
$count = $collection->count();
|
||||
$budgetLimits = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
||||
$paginator = new LengthAwarePaginator($budgetLimits, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.budget-limits.index').$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.budget-limits.index') . $this->buildParams());
|
||||
|
||||
/** @var BudgetLimitTransformer $transformer */
|
||||
$transformer = app(BudgetLimitTransformer::class);
|
||||
@@ -138,9 +138,9 @@ class ShowController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/getBudgetLimit
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit $budgetLimit
|
||||
* @param Request $request
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit $budgetLimit
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
|
@@ -65,8 +65,8 @@ class StoreController extends Controller
|
||||
*
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param StoreRequest $request
|
||||
* @param Budget $budget
|
||||
* @param StoreRequest $request
|
||||
* @param Budget $budget
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -69,9 +69,9 @@ class UpdateController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/budgets/updateBudgetLimit
|
||||
*
|
||||
* @param UpdateRequest $request
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit $budgetLimit
|
||||
* @param UpdateRequest $request
|
||||
* @param Budget $budget
|
||||
* @param BudgetLimit $budgetLimit
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
|
@@ -59,7 +59,7 @@ class DestroyController extends Controller
|
||||
*
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param Category $category
|
||||
* @param Category $category
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -69,7 +69,7 @@ class ListController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/categories/listAttachmentByCategory
|
||||
*
|
||||
* @param Category $category
|
||||
* @param Category $category
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -85,7 +85,7 @@ class ListController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.categories.attachments', [$category->id]).$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.categories.attachments', [$category->id]) . $this->buildParams());
|
||||
|
||||
/** @var AttachmentTransformer $transformer */
|
||||
$transformer = app(AttachmentTransformer::class);
|
||||
@@ -103,9 +103,9 @@ class ListController extends Controller
|
||||
*
|
||||
* Show all transactions.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Request $request
|
||||
*
|
||||
* @param Category $category
|
||||
* @param Category $category
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -143,7 +143,7 @@ class ListController extends Controller
|
||||
}
|
||||
|
||||
$paginator = $collector->getPaginatedGroups();
|
||||
$paginator->setPath(route('api.v1.categories.transactions', [$category->id]).$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.categories.transactions', [$category->id]) . $this->buildParams());
|
||||
$transactions = $paginator->getCollection();
|
||||
|
||||
/** @var TransactionGroupTransformer $transformer */
|
||||
|
@@ -82,7 +82,7 @@ class ShowController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($categories, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.categories.index').$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.categories.index') . $this->buildParams());
|
||||
|
||||
/** @var CategoryTransformer $transformer */
|
||||
$transformer = app(CategoryTransformer::class);
|
||||
@@ -99,7 +99,7 @@ class ShowController extends Controller
|
||||
*
|
||||
* Show the category.
|
||||
*
|
||||
* @param Category $category
|
||||
* @param Category $category
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -62,7 +62,7 @@ class StoreController extends Controller
|
||||
*
|
||||
* Store new category.
|
||||
*
|
||||
* @param StoreRequest $request
|
||||
* @param StoreRequest $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
|
@@ -62,8 +62,8 @@ class UpdateController extends Controller
|
||||
*
|
||||
* Update the category.
|
||||
*
|
||||
* @param UpdateRequest $request
|
||||
* @param Category $category
|
||||
* @param UpdateRequest $request
|
||||
* @param Category $category
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -62,7 +62,7 @@ class DestroyController extends Controller
|
||||
*
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param ObjectGroup $objectGroup
|
||||
* @param ObjectGroup $objectGroup
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -68,7 +68,7 @@ class ListController extends Controller
|
||||
*
|
||||
* List all bills in this object group
|
||||
*
|
||||
* @param ObjectGroup $objectGroup
|
||||
* @param ObjectGroup $objectGroup
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -85,7 +85,7 @@ class ListController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($bills, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.currencies.bills', [$objectGroup->id]).$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.currencies.bills', [$objectGroup->id]) . $this->buildParams());
|
||||
|
||||
/** @var BillTransformer $transformer */
|
||||
$transformer = app(BillTransformer::class);
|
||||
@@ -103,7 +103,7 @@ class ListController extends Controller
|
||||
*
|
||||
* List all piggies under the object group.
|
||||
*
|
||||
* @param ObjectGroup $objectGroup
|
||||
* @param ObjectGroup $objectGroup
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -123,7 +123,7 @@ class ListController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($piggyBanks, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.object-groups.piggy-banks', [$objectGroup->id]).$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.object-groups.piggy-banks', [$objectGroup->id]) . $this->buildParams());
|
||||
|
||||
/** @var PiggyBankTransformer $transformer */
|
||||
$transformer = app(PiggyBankTransformer::class);
|
||||
|
@@ -69,7 +69,7 @@ class ShowController extends Controller
|
||||
*
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -88,7 +88,7 @@ class ShowController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($objectGroups, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.object-groups.index').$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.object-groups.index') . $this->buildParams());
|
||||
|
||||
/** @var ObjectGroupTransformer $transformer */
|
||||
$transformer = app(ObjectGroupTransformer::class);
|
||||
@@ -106,7 +106,7 @@ class ShowController extends Controller
|
||||
*
|
||||
* Show single instance.
|
||||
*
|
||||
* @param ObjectGroup $objectGroup
|
||||
* @param ObjectGroup $objectGroup
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -63,8 +63,8 @@ class UpdateController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/object_groups/updateObjectGroup
|
||||
*
|
||||
* @param UpdateRequest $request
|
||||
* @param ObjectGroup $objectGroup
|
||||
* @param UpdateRequest $request
|
||||
* @param ObjectGroup $objectGroup
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -59,7 +59,7 @@ class DestroyController extends Controller
|
||||
*
|
||||
* Delete the resource.
|
||||
*
|
||||
* @param PiggyBank $piggyBank
|
||||
* @param PiggyBank $piggyBank
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
|
@@ -63,7 +63,7 @@ class ListController extends Controller
|
||||
* This endpoint is documented at:
|
||||
* https://api-docs.firefly-iii.org/?urls.primaryName=2.0.0%20(v1)#/piggy_banks/listAttachmentByPiggyBank
|
||||
*
|
||||
* @param PiggyBank $piggyBank
|
||||
* @param PiggyBank $piggyBank
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -79,7 +79,7 @@ class ListController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($attachments, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.piggy-banks.attachments', [$piggyBank->id]).$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.piggy-banks.attachments', [$piggyBank->id]) . $this->buildParams());
|
||||
|
||||
/** @var AttachmentTransformer $transformer */
|
||||
$transformer = app(AttachmentTransformer::class);
|
||||
@@ -97,7 +97,7 @@ class ListController extends Controller
|
||||
*
|
||||
* List single resource.
|
||||
*
|
||||
* @param PiggyBank $piggyBank
|
||||
* @param PiggyBank $piggyBank
|
||||
*
|
||||
* @return JsonResponse
|
||||
* @throws FireflyException
|
||||
@@ -114,7 +114,7 @@ class ListController extends Controller
|
||||
|
||||
// make paginator:
|
||||
$paginator = new LengthAwarePaginator($events, $count, $pageSize, $this->parameters->get('page'));
|
||||
$paginator->setPath(route('api.v1.piggy-banks.events', [$piggyBank->id]).$this->buildParams());
|
||||
$paginator->setPath(route('api.v1.piggy-banks.events', [$piggyBank->id]) . $this->buildParams());
|
||||
|
||||
/** @var PiggyBankEventTransformer $transformer */
|
||||
$transformer = app(PiggyBankEventTransformer::class);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user