Code clean up.

This commit is contained in:
James Cole
2017-11-15 11:33:07 +01:00
parent ef837f20dd
commit 57dcdfa0c4
60 changed files with 398 additions and 347 deletions

View File

@@ -85,14 +85,18 @@ class LoginController extends Controller
$hasTable = Schema::hasTable('users'); $hasTable = Schema::hasTable('users');
if (!$hasTable) { if (!$hasTable) {
$message = 'Firefly III could not find the "users" table. This is a strong indication your database credentials are wrong or the database has not been initialized. Did you follow the installation instructions correctly?'; $message
= 'Firefly III could not find the "users" table. This is a strong indication your database credentials are wrong or the database has not been initialized. Did you follow the installation instructions correctly?';
return view('error', compact('message')); return view('error', compact('message'));
} }
// check for presence of currency: // check for presence of currency:
$currency = TransactionCurrency::where('code', 'EUR')->first(); $currency = TransactionCurrency::where('code', 'EUR')->first();
if (is_null($currency)) { if (is_null($currency)) {
$message = 'Firefly III could not find the EURO currency. This is a strong indication the database has not been initialized correctly. Did you follow the installation instructions?'; $message
= 'Firefly III could not find the EURO currency. This is a strong indication the database has not been initialized correctly. Did you follow the installation instructions?';
return view('error', compact('message')); return view('error', compact('message'));
} }

View File

@@ -795,7 +795,9 @@ Breadcrumbs::register(
'rule-groups.select-transactions', 'rule-groups.select-transactions',
function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) { function (BreadCrumbGenerator $breadcrumbs, RuleGroup $ruleGroup) {
$breadcrumbs->parent('rules.index'); $breadcrumbs->parent('rules.index');
$breadcrumbs->push(trans('firefly.rule_group_select_transactions', ['title' => $ruleGroup->title]), route('rule-groups.select-transactions', [$ruleGroup])); $breadcrumbs->push(
trans('firefly.rule_group_select_transactions', ['title' => $ruleGroup->title]), route('rule-groups.select-transactions', [$ruleGroup])
);
} }
); );

View File

@@ -140,6 +140,7 @@ class ImportRoutine
if ($this->journals->count() < 1) { if ($this->journals->count() < 1) {
Log::info(sprintf('Will not create tag, %d journals imported.', $this->journals->count())); Log::info(sprintf('Will not create tag, %d journals imported.', $this->journals->count()));
return new Tag; return new Tag;
} }

View File

@@ -176,7 +176,7 @@ return [
'is_safe' => [ 'is_safe' => [
'date', 'text', 'select', 'balance', 'optionsList', 'checkbox', 'amount', 'tags', 'integer', 'textarea', 'location', 'date', 'text', 'select', 'balance', 'optionsList', 'checkbox', 'amount', 'tags', 'integer', 'textarea', 'location',
'multiRadio', 'file', 'multiCheckbox', 'staticText', 'amountSmall', 'password', 'nonSelectableBalance', 'nonSelectableAmount', 'multiRadio', 'file', 'multiCheckbox', 'staticText', 'amountSmall', 'password', 'nonSelectableBalance', 'nonSelectableAmount',
'number' 'number',
], ],
], ],
'Form' => [ 'Form' => [

View File

@@ -27,13 +27,13 @@ return [
[ [
'4.3' => 'Make sure you run the migrations and clear your cache. If you need more help, please check Github or the Firefly III website.', '4.3' => 'Make sure you run the migrations and clear your cache. If you need more help, please check Github or the Firefly III website.',
'4.6.3' => 'This will be the last version to require PHP7.0. Future versions will require PHP7.1 minimum.', '4.6.3' => 'This will be the last version to require PHP7.0. Future versions will require PHP7.1 minimum.',
'4.6.4' => 'This version of Firefly III requires PHP7.1.' '4.6.4' => 'This version of Firefly III requires PHP7.1.',
], ],
'install' => 'install' =>
[ [
'4.3' => 'Welcome to Firefly! Make sure you follow the installation guide. If you need more help, please check Github or the Firefly III website. The installation guide has a FAQ which you should check out as well.', '4.3' => 'Welcome to Firefly! Make sure you follow the installation guide. If you need more help, please check Github or the Firefly III website. The installation guide has a FAQ which you should check out as well.',
'4.6.3' => 'This will be the last version to require PHP7.0. Future versions will require PHP7.1 minimum.', '4.6.3' => 'This will be the last version to require PHP7.0. Future versions will require PHP7.1 minimum.',
'4.6.4' => 'This version of Firefly III requires PHP7.1.' '4.6.4' => 'This version of Firefly III requires PHP7.1.',
], ],
], ],
]; ];

View File

@@ -28,7 +28,7 @@
} }
p.tagcloud .label { p.tagcloud .label {
line-height:2; line-height: 2;
} }
.handle { .handle {

View File

@@ -26,6 +26,7 @@
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-cyrillic-ext.woff2') format('woff2'); src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-cyrillic-ext.woff2') format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
} }
/* cyrillic */ /* cyrillic */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -34,6 +35,7 @@
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-cyrillic.woff2') format('woff2'); src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-cyrillic.woff2') format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
} }
/* greek-ext */ /* greek-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -42,6 +44,7 @@
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-greek-ext.woff2') format('woff2'); src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-greek-ext.woff2') format('woff2');
unicode-range: U+1F00-1FFF; unicode-range: U+1F00-1FFF;
} }
/* greek */ /* greek */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -50,6 +53,7 @@
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-greek.woff2') format('woff2'); src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-greek.woff2') format('woff2');
unicode-range: U+0370-03FF; unicode-range: U+0370-03FF;
} }
/* vietnamese */ /* vietnamese */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -58,6 +62,7 @@
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-vietnamese.woff2') format('woff2'); src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-vietnamese.woff2') format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
} }
/* latin-ext */ /* latin-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -66,6 +71,7 @@
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-latin-ext.woff2') format('woff2'); src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-latin-ext.woff2') format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
} }
/* latin */ /* latin */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -74,6 +80,7 @@
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-latin.woff2') format('woff2'); src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightItalic'), url('../fonts/SourceSansPro-LightItalic-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
} }
/* cyrillic-ext */ /* cyrillic-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -82,6 +89,7 @@
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-cyrillic-ext.woff2') format('woff2'); src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-cyrillic-ext.woff2') format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
} }
/* cyrillic */ /* cyrillic */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -90,6 +98,7 @@
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-cyrillic.woff2') format('woff2'); src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-cyrillic.woff2') format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
} }
/* greek-ext */ /* greek-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -98,6 +107,7 @@
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-greek-ext.woff2') format('woff2'); src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-greek-ext.woff2') format('woff2');
unicode-range: U+1F00-1FFF; unicode-range: U+1F00-1FFF;
} }
/* greek */ /* greek */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -106,6 +116,7 @@
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-greek.woff2') format('woff2'); src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-greek.woff2') format('woff2');
unicode-range: U+0370-03FF; unicode-range: U+0370-03FF;
} }
/* vietnamese */ /* vietnamese */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -114,6 +125,7 @@
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-vietnamese.woff2') format('woff2'); src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-vietnamese.woff2') format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
} }
/* latin-ext */ /* latin-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -122,6 +134,7 @@
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-latin-ext.woff2') format('woff2'); src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-latin-ext.woff2') format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
} }
/* latin */ /* latin */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -130,6 +143,7 @@
src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-latin.woff2') format('woff2'); src: local('Source Sans Pro Italic'), local('SourceSansPro-Italic'), url('../fonts/SourceSansPro-Italic-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
} }
/* cyrillic-ext */ /* cyrillic-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -138,6 +152,7 @@
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-cyrillic-ext.woff2') format('woff2'); src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-cyrillic-ext.woff2') format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
} }
/* cyrillic */ /* cyrillic */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -146,6 +161,7 @@
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-cyrillic.woff2') format('woff2'); src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-cyrillic.woff2') format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
} }
/* greek-ext */ /* greek-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -154,6 +170,7 @@
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-greek-ext.woff2') format('woff2'); src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-greek-ext.woff2') format('woff2');
unicode-range: U+1F00-1FFF; unicode-range: U+1F00-1FFF;
} }
/* greek */ /* greek */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -162,6 +179,7 @@
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-greek.woff2') format('woff2'); src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-greek.woff2') format('woff2');
unicode-range: U+0370-03FF; unicode-range: U+0370-03FF;
} }
/* vietnamese */ /* vietnamese */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -170,6 +188,7 @@
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-vietnamese.woff2') format('woff2'); src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-vietnamese.woff2') format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
} }
/* latin-ext */ /* latin-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -178,6 +197,7 @@
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-latin-ext.woff2') format('woff2'); src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-latin-ext.woff2') format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
} }
/* latin */ /* latin */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -186,6 +206,7 @@
src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-latin.woff2') format('woff2'); src: local('Source Sans Pro SemiBold Italic'), local('SourceSansPro-SemiBoldItalic'), url('../fonts/SourceSansPro-SemiBoldItalic-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
} }
/* cyrillic-ext */ /* cyrillic-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -194,6 +215,7 @@
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-cyrillic-ext.woff2') format('woff2'); src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-cyrillic-ext.woff2') format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
} }
/* cyrillic */ /* cyrillic */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -202,6 +224,7 @@
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-cyrillic.woff2') format('woff2'); src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-cyrillic.woff2') format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
} }
/* greek-ext */ /* greek-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -210,6 +233,7 @@
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-greek-ext.woff2') format('woff2'); src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-greek-ext.woff2') format('woff2');
unicode-range: U+1F00-1FFF; unicode-range: U+1F00-1FFF;
} }
/* greek */ /* greek */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -218,6 +242,7 @@
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-greek.woff2') format('woff2'); src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-greek.woff2') format('woff2');
unicode-range: U+0370-03FF; unicode-range: U+0370-03FF;
} }
/* vietnamese */ /* vietnamese */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -226,6 +251,7 @@
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-vietnamese.woff2') format('woff2'); src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-vietnamese.woff2') format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
} }
/* latin-ext */ /* latin-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -234,6 +260,7 @@
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-latin-ext.woff2') format('woff2'); src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-latin-ext.woff2') format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
} }
/* latin */ /* latin */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -242,6 +269,7 @@
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-latin.woff2') format('woff2'); src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url('../fonts/SourceSansPro-Light-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
} }
/* cyrillic-ext */ /* cyrillic-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -250,6 +278,7 @@
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-cyrillic-ext.woff2') format('woff2'); src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-cyrillic-ext.woff2') format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
} }
/* cyrillic */ /* cyrillic */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -258,6 +287,7 @@
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-cyrillic.woff2') format('woff2'); src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-cyrillic.woff2') format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
} }
/* greek-ext */ /* greek-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -266,6 +296,7 @@
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-greek-ext.woff2') format('woff2'); src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-greek-ext.woff2') format('woff2');
unicode-range: U+1F00-1FFF; unicode-range: U+1F00-1FFF;
} }
/* greek */ /* greek */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -274,6 +305,7 @@
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-greek.woff2') format('woff2'); src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-greek.woff2') format('woff2');
unicode-range: U+0370-03FF; unicode-range: U+0370-03FF;
} }
/* vietnamese */ /* vietnamese */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -282,6 +314,7 @@
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-vietnamese.woff2') format('woff2'); src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-vietnamese.woff2') format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
} }
/* latin-ext */ /* latin-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -290,6 +323,7 @@
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-latin-ext.woff2') format('woff2'); src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-latin-ext.woff2') format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
} }
/* latin */ /* latin */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -298,6 +332,7 @@
src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-latin.woff2') format('woff2'); src: local('Source Sans Pro Regular'), local('SourceSansPro-Regular'), url('../fonts/SourceSansPro-Regular-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
} }
/* cyrillic-ext */ /* cyrillic-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -306,6 +341,7 @@
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-cyrillic-ext.woff2') format('woff2'); src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-cyrillic-ext.woff2') format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
} }
/* cyrillic */ /* cyrillic */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -314,6 +350,7 @@
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-cyrillic.woff2') format('woff2'); src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-cyrillic.woff2') format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
} }
/* greek-ext */ /* greek-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -322,6 +359,7 @@
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-greek-ext.woff2') format('woff2'); src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-greek-ext.woff2') format('woff2');
unicode-range: U+1F00-1FFF; unicode-range: U+1F00-1FFF;
} }
/* greek */ /* greek */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -330,6 +368,7 @@
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-greek.woff2') format('woff2'); src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-greek.woff2') format('woff2');
unicode-range: U+0370-03FF; unicode-range: U+0370-03FF;
} }
/* vietnamese */ /* vietnamese */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -338,6 +377,7 @@
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-vietnamese.woff2') format('woff2'); src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-vietnamese.woff2') format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
} }
/* latin-ext */ /* latin-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -346,6 +386,7 @@
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-latin-ext.woff2') format('woff2'); src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-latin-ext.woff2') format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
} }
/* latin */ /* latin */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -354,6 +395,7 @@
src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-latin.woff2') format('woff2'); src: local('Source Sans Pro SemiBold'), local('SourceSansPro-SemiBold'), url('../fonts/SourceSansPro-SemiBold-latin.woff2') format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215;
} }
/* cyrillic-ext */ /* cyrillic-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -362,6 +404,7 @@
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-cyrillic-ext.woff2') format('woff2'); src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-cyrillic-ext.woff2') format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F; unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
} }
/* cyrillic */ /* cyrillic */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -370,6 +413,7 @@
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-cyrillic.woff2') format('woff2'); src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-cyrillic.woff2') format('woff2');
unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
} }
/* greek-ext */ /* greek-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -378,6 +422,7 @@
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-greek-ext.woff2') format('woff2'); src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-greek-ext.woff2') format('woff2');
unicode-range: U+1F00-1FFF; unicode-range: U+1F00-1FFF;
} }
/* greek */ /* greek */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -386,6 +431,7 @@
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-greek.woff2') format('woff2'); src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-greek.woff2') format('woff2');
unicode-range: U+0370-03FF; unicode-range: U+0370-03FF;
} }
/* vietnamese */ /* vietnamese */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -394,6 +440,7 @@
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-vietnamese.woff2') format('woff2'); src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-vietnamese.woff2') format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB; unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
} }
/* latin-ext */ /* latin-ext */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
@@ -402,6 +449,7 @@
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-latin-ext.woff2') format('woff2'); src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url('../fonts/SourceSansPro-Bold-latin-ext.woff2') format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF; unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
} }
/* latin */ /* latin */
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';

View File

@@ -40,7 +40,7 @@ define('LARAVEL_START', microtime(true));
| |
*/ */
require __DIR__.'/../vendor/autoload.php'; require __DIR__ . '/../vendor/autoload.php';
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@@ -54,7 +54,7 @@ require __DIR__.'/../vendor/autoload.php';
| |
*/ */
$app = require_once __DIR__.'/../bootstrap/app.php'; $app = require_once __DIR__ . '/../bootstrap/app.php';
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View File

@@ -120,7 +120,7 @@ function callExport() {
var response = jqXHR.responseJSON; var response = jqXHR.responseJSON;
var errorText = 'The export failed. Please check the log files to find out why.'; var errorText = 'The export failed. Please check the log files to find out why.';
if (typeof response === 'object') { if (typeof response === 'object') {
errorText =response.message; errorText = response.message;
} }
showError(errorText); showError(errorText);

View File

@@ -42,5 +42,5 @@ function setupIntro(steps) {
} }
function reportIntroFinished() { function reportIntroFinished() {
$.post(routeForFinishedTour, {_token:token}); $.post(routeForFinishedTour, {_token: token});
} }

View File

@@ -58,7 +58,7 @@ function testRuleTriggers(e) {
var obj = $(e.target); var obj = $(e.target);
var ruleId = parseInt(obj.data('id')); var ruleId = parseInt(obj.data('id'));
var icon = obj; var icon = obj;
if(obj.prop("tagName") === 'A') { if (obj.prop("tagName") === 'A') {
icon = $('i', obj); icon = $('i', obj);
} }
// change icon: // change icon:

View File

@@ -31,7 +31,14 @@ $(function () {
*/ */
// make map: // make map:
var mymap = L.map('tag_location_map', {zoomControl: false, touchZoom: false, doubleClickZoom: false, scrollWheelZoom: false, boxZoom: false, dragging: false}).setView([latitude, longitude], zoomLevel); var mymap = L.map('tag_location_map', {
zoomControl: false,
touchZoom: false,
doubleClickZoom: false,
scrollWheelZoom: false,
boxZoom: false,
dragging: false
}).setView([latitude, longitude], zoomLevel);
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', { L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', {
attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>', attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://mapbox.com">Mapbox</a>',
@@ -40,7 +47,7 @@ $(function () {
accessToken: mapboxToken accessToken: mapboxToken
}).addTo(mymap); }).addTo(mymap);
if(doPlaceMarker) { if (doPlaceMarker) {
var marker = L.marker([latitude, longitude]).addTo(mymap); var marker = L.marker([latitude, longitude]).addTo(mymap);
} }
} }

View File

@@ -30,7 +30,7 @@ $(function () {
source: data, source: data,
autoSelect: true autoSelect: true
}); });
$input.change(function() { $input.change(function () {
var current = $input.typeahead("getActive"); var current = $input.typeahead("getActive");
if (current) { if (current) {
// Some item from your model is active! // Some item from your model is active!

View File

@@ -35,7 +35,7 @@ trait CreatesApplication
*/ */
public function createApplication() public function createApplication()
{ {
$app = require __DIR__.'/../bootstrap/app.php'; $app = require __DIR__ . '/../bootstrap/app.php';
$app->make(Kernel::class)->bootstrap(); $app->make(Kernel::class)->bootstrap();

View File

@@ -23,15 +23,10 @@ declare(strict_types=1);
namespace Tests\Feature\Controllers; namespace Tests\Feature\Controllers;
use Amount;
use FireflyIII\Helpers\Collector\JournalCollectorInterface;
use FireflyIII\Models\Budget; use FireflyIII\Models\Budget;
use FireflyIII\Models\Category; use FireflyIII\Models\Category;
use FireflyIII\Models\Tag; use FireflyIII\Models\Tag;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournal;
use FireflyIII\Models\TransactionType;
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface; use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
use FireflyIII\Repositories\Category\CategoryRepositoryInterface; use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
use FireflyIII\Repositories\Journal\JournalRepositoryInterface; use FireflyIII\Repositories\Journal\JournalRepositoryInterface;

View File

@@ -25,7 +25,6 @@ declare(strict_types=1);
namespace Tests\Feature; namespace Tests\Feature;
use Tests\TestCase; use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ExampleTest extends TestCase class ExampleTest extends TestCase
{ {

View File

@@ -25,7 +25,6 @@ declare(strict_types=1);
namespace Tests\Unit; namespace Tests\Unit;
use Tests\TestCase; use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class ExampleTest extends TestCase class ExampleTest extends TestCase
{ {

View File

@@ -22,6 +22,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace Tests\Unit\TransactionRules\Actions; namespace Tests\Unit\TransactionRules\Actions;
use FireflyIII\Models\RuleAction; use FireflyIII\Models\RuleAction;
use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournal;
use FireflyIII\TransactionRules\Actions\ClearCategory; use FireflyIII\TransactionRules\Actions\ClearCategory;

View File

@@ -58,7 +58,7 @@ class PrependDescriptionTest extends TestCase
$journal = TransactionJournal::find(7); $journal = TransactionJournal::find(7);
// assert result // assert result
$this->assertEquals($prepend.$description, $journal->description); $this->assertEquals($prepend . $description, $journal->description);
} }
} }

View File

@@ -166,6 +166,7 @@ class SetDestinationAccountTest extends TestCase
/** /**
* Test this on a split journal. * Test this on a split journal.
*
* @covers \FireflyIII\TransactionRules\Actions\SetDestinationAccount::__construct() * @covers \FireflyIII\TransactionRules\Actions\SetDestinationAccount::__construct()
* @covers \FireflyIII\TransactionRules\Actions\SetDestinationAccount::act() * @covers \FireflyIII\TransactionRules\Actions\SetDestinationAccount::act()
*/ */

View File

@@ -27,7 +27,6 @@ namespace Tests\Unit\TransactionRules\Actions;
use FireflyIII\Models\Note; use FireflyIII\Models\Note;
use FireflyIII\Models\RuleAction; use FireflyIII\Models\RuleAction;
use FireflyIII\Models\TransactionJournal; use FireflyIII\Models\TransactionJournal;
use FireflyIII\TransactionRules\Actions\ClearNotes;
use FireflyIII\TransactionRules\Actions\SetNotes; use FireflyIII\TransactionRules\Actions\SetNotes;
use Tests\TestCase; use Tests\TestCase;

View File

@@ -35,18 +35,6 @@ use Tests\TestCase;
*/ */
class AmountLessTest extends TestCase class AmountLessTest extends TestCase
{ {
/**
* @covers \FireflyIII\TransactionRules\Triggers\AmountLess::triggered
*/
public function testTriggeredLess()
{
$journal = new TransactionJournal;
$journal->destination_amount = '12.34';
$trigger = AmountLess::makeFromStrings('12.50', false);
$result = $trigger->triggered($journal);
$this->assertTrue($result);
}
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\AmountLess::triggered * @covers \FireflyIII\TransactionRules\Triggers\AmountLess::triggered
*/ */
@@ -59,6 +47,18 @@ class AmountLessTest extends TestCase
$this->assertFalse($result); $this->assertFalse($result);
} }
/**
* @covers \FireflyIII\TransactionRules\Triggers\AmountLess::triggered
*/
public function testTriggeredLess()
{
$journal = new TransactionJournal;
$journal->destination_amount = '12.34';
$trigger = AmountLess::makeFromStrings('12.50', false);
$result = $trigger->triggered($journal);
$this->assertTrue($result);
}
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\AmountLess::triggered * @covers \FireflyIII\TransactionRules\Triggers\AmountLess::triggered
*/ */

View File

@@ -47,19 +47,6 @@ class DescriptionContainsTest extends TestCase
$this->assertTrue($result); $this->assertTrue($result);
} }
/**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::triggered
*/
public function testTriggeredNot()
{
$journal = new TransactionJournal;
$journal->description = 'Lorem IPSUM bla bla ';
$trigger = DescriptionContains::makeFromStrings('blurb', false);
$result = $trigger->triggered($journal);
$this->assertFalse($result);
}
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::triggered * @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::triggered
*/ */
@@ -84,6 +71,18 @@ class DescriptionContainsTest extends TestCase
$this->assertTrue($result); $this->assertTrue($result);
} }
/**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::triggered
*/
public function testTriggeredNot()
{
$journal = new TransactionJournal;
$journal->description = 'Lorem IPSUM bla bla ';
$trigger = DescriptionContains::makeFromStrings('blurb', false);
$result = $trigger->triggered($journal);
$this->assertFalse($result);
}
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::triggered * @covers \FireflyIII\TransactionRules\Triggers\DescriptionContains::triggered
*/ */

View File

@@ -50,16 +50,15 @@ class DescriptionEndsTest extends TestCase
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered * @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered
*/ */
public function testTriggeredNot() public function testTriggeredClose()
{ {
$journal = new TransactionJournal; $journal = new TransactionJournal;
$journal->description = 'Lorem IPSUM blabla'; $journal->description = 'Something is going to happen';
$trigger = DescriptionEnds::makeFromStrings('lorem', false); $trigger = DescriptionEnds::makeFromStrings('happe', false);
$result = $trigger->triggered($journal); $result = $trigger->triggered($journal);
$this->assertFalse($result); $this->assertFalse($result);
} }
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered * @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered
*/ */
@@ -75,11 +74,11 @@ class DescriptionEndsTest extends TestCase
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered * @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered
*/ */
public function testTriggeredClose() public function testTriggeredLongSearch()
{ {
$journal = new TransactionJournal; $journal = new TransactionJournal;
$journal->description = 'Something is going to happen'; $journal->description = 'Something';
$trigger = DescriptionEnds::makeFromStrings('happe', false); $trigger = DescriptionEnds::makeFromStrings('Something is', false);
$result = $trigger->triggered($journal); $result = $trigger->triggered($journal);
$this->assertFalse($result); $this->assertFalse($result);
} }
@@ -99,11 +98,11 @@ class DescriptionEndsTest extends TestCase
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered * @covers \FireflyIII\TransactionRules\Triggers\DescriptionEnds::triggered
*/ */
public function testTriggeredLongSearch() public function testTriggeredNot()
{ {
$journal = new TransactionJournal; $journal = new TransactionJournal;
$journal->description = 'Something'; $journal->description = 'Lorem IPSUM blabla';
$trigger = DescriptionEnds::makeFromStrings('Something is', false); $trigger = DescriptionEnds::makeFromStrings('lorem', false);
$result = $trigger->triggered($journal); $result = $trigger->triggered($journal);
$this->assertFalse($result); $this->assertFalse($result);
} }

View File

@@ -50,16 +50,15 @@ class DescriptionIsTest extends TestCase
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionIs::triggered * @covers \FireflyIII\TransactionRules\Triggers\DescriptionIs::triggered
*/ */
public function testTriggeredNot() public function testTriggeredClose()
{ {
$journal = new TransactionJournal; $journal = new TransactionJournal;
$journal->description = 'Lorem IPSUM blabla'; $journal->description = 'Something is going to happen';
$trigger = DescriptionIs::makeFromStrings('lorem', false); $trigger = DescriptionIs::makeFromStrings('Something is going to happe', false);
$result = $trigger->triggered($journal); $result = $trigger->triggered($journal);
$this->assertFalse($result); $this->assertFalse($result);
} }
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionIs::triggered * @covers \FireflyIII\TransactionRules\Triggers\DescriptionIs::triggered
*/ */
@@ -75,11 +74,11 @@ class DescriptionIsTest extends TestCase
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionIs::triggered * @covers \FireflyIII\TransactionRules\Triggers\DescriptionIs::triggered
*/ */
public function testTriggeredClose() public function testTriggeredNot()
{ {
$journal = new TransactionJournal; $journal = new TransactionJournal;
$journal->description = 'Something is going to happen'; $journal->description = 'Lorem IPSUM blabla';
$trigger = DescriptionIs::makeFromStrings('Something is going to happe', false); $trigger = DescriptionIs::makeFromStrings('lorem', false);
$result = $trigger->triggered($journal); $result = $trigger->triggered($journal);
$this->assertFalse($result); $this->assertFalse($result);
} }

View File

@@ -50,16 +50,15 @@ class DescriptionStartsTest extends TestCase
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered * @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered
*/ */
public function testTriggeredNot() public function testTriggeredClose()
{ {
$journal = new TransactionJournal; $journal = new TransactionJournal;
$journal->description = 'Lorem IPSUM blabla'; $journal->description = 'Something is going to happen';
$trigger = DescriptionStarts::makeFromStrings('blabla', false); $trigger = DescriptionStarts::makeFromStrings('omething', false);
$result = $trigger->triggered($journal); $result = $trigger->triggered($journal);
$this->assertFalse($result); $this->assertFalse($result);
} }
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered * @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered
*/ */
@@ -75,11 +74,11 @@ class DescriptionStartsTest extends TestCase
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered * @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered
*/ */
public function testTriggeredClose() public function testTriggeredLongSearch()
{ {
$journal = new TransactionJournal; $journal = new TransactionJournal;
$journal->description = 'Something is going to happen'; $journal->description = 'Something';
$trigger = DescriptionStarts::makeFromStrings('omething', false); $trigger = DescriptionStarts::makeFromStrings('Something is', false);
$result = $trigger->triggered($journal); $result = $trigger->triggered($journal);
$this->assertFalse($result); $this->assertFalse($result);
} }
@@ -87,11 +86,11 @@ class DescriptionStartsTest extends TestCase
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered * @covers \FireflyIII\TransactionRules\Triggers\DescriptionStarts::triggered
*/ */
public function testTriggeredLongSearch() public function testTriggeredNot()
{ {
$journal = new TransactionJournal; $journal = new TransactionJournal;
$journal->description = 'Something'; $journal->description = 'Lorem IPSUM blabla';
$trigger = DescriptionStarts::makeFromStrings('Something is', false); $trigger = DescriptionStarts::makeFromStrings('blabla', false);
$result = $trigger->triggered($journal); $result = $trigger->triggered($journal);
$this->assertFalse($result); $this->assertFalse($result);
} }

View File

@@ -62,6 +62,16 @@ class FromAccountIsTest extends TestCase
$this->assertFalse($result); $this->assertFalse($result);
} }
/**
* @covers \FireflyIII\TransactionRules\Triggers\FromAccountIs::willMatchEverything
*/
public function testWillMatchEverythingEmpty()
{
$value = '';
$result = FromAccountIs::willMatchEverything($value);
$this->assertTrue($result);
}
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\FromAccountIs::willMatchEverything * @covers \FireflyIII\TransactionRules\Triggers\FromAccountIs::willMatchEverything
*/ */
@@ -82,15 +92,4 @@ class FromAccountIsTest extends TestCase
$this->assertTrue($result); $this->assertTrue($result);
} }
/**
* @covers \FireflyIII\TransactionRules\Triggers\FromAccountIs::willMatchEverything
*/
public function testWillMatchEverythingEmpty()
{
$value = '';
$result = FromAccountIs::willMatchEverything($value);
$this->assertTrue($result);
}
} }

View File

@@ -44,7 +44,7 @@ class FromAccountStartsTest extends TestCase
$transaction = $journal->transactions()->where('amount', '<', 0)->first(); $transaction = $journal->transactions()->where('amount', '<', 0)->first();
$account = $transaction->account; $account = $transaction->account;
$trigger = FromAccountStarts::makeFromStrings(substr($account->name,0, -3), false); $trigger = FromAccountStarts::makeFromStrings(substr($account->name, 0, -3), false);
$result = $trigger->triggered($journal); $result = $trigger->triggered($journal);
$this->assertTrue($result); $this->assertTrue($result);
} }

View File

@@ -53,22 +53,6 @@ class NotesAreTest extends TestCase
$this->assertTrue($result); $this->assertTrue($result);
} }
/**
* @covers \FireflyIII\TransactionRules\Triggers\NotesAre::triggered
*/
public function testTriggeredEmpty()
{
$journal = TransactionJournal::find(40);
$journal->notes()->delete();
$note = new Note();
$note->noteable()->associate($journal);
$note->text = '';
$note->save();
$trigger = NotesAre::makeFromStrings('', false);
$result = $trigger->triggered($journal);
$this->assertFalse($result);
}
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\NotesAre::triggered * @covers \FireflyIII\TransactionRules\Triggers\NotesAre::triggered
*/ */
@@ -85,6 +69,22 @@ class NotesAreTest extends TestCase
$this->assertFalse($result); $this->assertFalse($result);
} }
/**
* @covers \FireflyIII\TransactionRules\Triggers\NotesAre::triggered
*/
public function testTriggeredEmpty()
{
$journal = TransactionJournal::find(40);
$journal->notes()->delete();
$note = new Note();
$note->noteable()->associate($journal);
$note->text = '';
$note->save();
$trigger = NotesAre::makeFromStrings('', false);
$result = $trigger->triggered($journal);
$this->assertFalse($result);
}
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\NotesAre::triggered * @covers \FireflyIII\TransactionRules\Triggers\NotesAre::triggered
*/ */

View File

@@ -53,38 +53,6 @@ class NotesContainTest extends TestCase
$this->assertTrue($result); $this->assertTrue($result);
} }
/**
* @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered
*/
public function testTriggeredEmpty()
{
$journal = TransactionJournal::find(44);
$journal->notes()->delete();
$note = new Note();
$note->noteable()->associate($journal);
$note->text = '';
$note->save();
$trigger = NotesContain::makeFromStrings('', false);
$result = $trigger->triggered($journal);
$this->assertFalse($result);
}
/**
* @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered
*/
public function testTriggeredPartial()
{
$journal = TransactionJournal::find(45);
$journal->notes()->delete();
$note = new Note();
$note->noteable()->associate($journal);
$note->text = 'Some note';
$note->save();
$trigger = NotesContain::makeFromStrings('Some note contains', false);
$result = $trigger->triggered($journal);
$this->assertFalse($result);
}
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered * @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered
*/ */
@@ -101,6 +69,22 @@ class NotesContainTest extends TestCase
$this->assertFalse($result); $this->assertFalse($result);
} }
/**
* @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered
*/
public function testTriggeredEmpty()
{
$journal = TransactionJournal::find(44);
$journal->notes()->delete();
$note = new Note();
$note->noteable()->associate($journal);
$note->text = '';
$note->save();
$trigger = NotesContain::makeFromStrings('', false);
$result = $trigger->triggered($journal);
$this->assertFalse($result);
}
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered * @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered
*/ */
@@ -113,6 +97,22 @@ class NotesContainTest extends TestCase
$this->assertFalse($result); $this->assertFalse($result);
} }
/**
* @covers \FireflyIII\TransactionRules\Triggers\NotesContain::triggered
*/
public function testTriggeredPartial()
{
$journal = TransactionJournal::find(45);
$journal->notes()->delete();
$note = new Note();
$note->noteable()->associate($journal);
$note->text = 'Some note';
$note->save();
$trigger = NotesContain::makeFromStrings('Some note contains', false);
$result = $trigger->triggered($journal);
$this->assertFalse($result);
}
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\NotesContain::willMatchEverything * @covers \FireflyIII\TransactionRules\Triggers\NotesContain::willMatchEverything
*/ */

View File

@@ -36,6 +36,20 @@ use Tests\TestCase;
class TagIsTest extends TestCase class TagIsTest extends TestCase
{ {
/**
* @covers \FireflyIII\TransactionRules\Triggers\TagIs::triggered
*/
public function testNotTriggered()
{
$journal = TransactionJournal::find(58);
$journal->tags()->detach();
$this->assertEquals(0, $journal->tags()->count());
$trigger = TagIs::makeFromStrings('SomeTag', false);
$result = $trigger->triggered($journal);
$this->assertFalse($result);
}
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\TagIs::triggered * @covers \FireflyIII\TransactionRules\Triggers\TagIs::triggered
*/ */
@@ -58,20 +72,6 @@ class TagIsTest extends TestCase
$this->assertTrue($result); $this->assertTrue($result);
} }
/**
* @covers \FireflyIII\TransactionRules\Triggers\TagIs::triggered
*/
public function testNotTriggered()
{
$journal = TransactionJournal::find(58);
$journal->tags()->detach();
$this->assertEquals(0, $journal->tags()->count());
$trigger = TagIs::makeFromStrings('SomeTag', false);
$result = $trigger->triggered($journal);
$this->assertFalse($result);
}
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\TagIs::willMatchEverything * @covers \FireflyIII\TransactionRules\Triggers\TagIs::willMatchEverything
*/ */

View File

@@ -62,16 +62,6 @@ class ToAccountIsTest extends TestCase
$this->assertFalse($result); $this->assertFalse($result);
} }
/**
* @covers \FireflyIII\TransactionRules\Triggers\ToAccountIs::willMatchEverything
*/
public function testWillMatchEverythingNotNull()
{
$value = 'x';
$result = ToAccountIs::willMatchEverything($value);
$this->assertFalse($result);
}
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\ToAccountIs::willMatchEverything * @covers \FireflyIII\TransactionRules\Triggers\ToAccountIs::willMatchEverything
*/ */
@@ -82,6 +72,16 @@ class ToAccountIsTest extends TestCase
$this->assertTrue($result); $this->assertTrue($result);
} }
/**
* @covers \FireflyIII\TransactionRules\Triggers\ToAccountIs::willMatchEverything
*/
public function testWillMatchEverythingNotNull()
{
$value = 'x';
$result = ToAccountIs::willMatchEverything($value);
$this->assertFalse($result);
}
/** /**
* @covers \FireflyIII\TransactionRules\Triggers\ToAccountIs::willMatchEverything * @covers \FireflyIII\TransactionRules\Triggers\ToAccountIs::willMatchEverything
*/ */

View File

@@ -44,7 +44,7 @@ class ToAccountStartsTest extends TestCase
$transaction = $journal->transactions()->where('amount', '>', 0)->first(); $transaction = $journal->transactions()->where('amount', '>', 0)->first();
$account = $transaction->account; $account = $transaction->account;
$trigger = ToAccountStarts::makeFromStrings(substr($account->name,0, -3), false); $trigger = ToAccountStarts::makeFromStrings(substr($account->name, 0, -3), false);
$result = $trigger->triggered($journal); $result = $trigger->triggered($journal);
$this->assertTrue($result); $this->assertTrue($result);
} }