mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Some refactoring [skip ci]
This commit is contained in:
parent
f1dcc41e42
commit
24bdc319dd
@ -3,8 +3,8 @@
|
|||||||
namespace FireflyIII\Database\Account;
|
namespace FireflyIII\Database\Account;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Database\CommonDatabaseCalls;
|
use FireflyIII\Database\CommonDatabaseCallsInterface;
|
||||||
use FireflyIII\Database\CUD;
|
use FireflyIII\Database\CUDInterface;
|
||||||
use FireflyIII\Database\SwitchUser;
|
use FireflyIII\Database\SwitchUser;
|
||||||
use FireflyIII\Exception\NotImplementedException;
|
use FireflyIII\Exception\NotImplementedException;
|
||||||
use Illuminate\Database\Eloquent\Builder;
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
@ -18,7 +18,7 @@ use Illuminate\Support\MessageBag;
|
|||||||
* @package FireflyIII\Database
|
* @package FireflyIII\Database
|
||||||
* @implements FireflyIII\Database\Account\AccountInterface
|
* @implements FireflyIII\Database\Account\AccountInterface
|
||||||
*/
|
*/
|
||||||
class Account implements CUD, CommonDatabaseCalls, AccountInterface
|
class Account implements CUDInterface, CommonDatabaseCallsInterface, AccountInterface
|
||||||
{
|
{
|
||||||
use SwitchUser;
|
use SwitchUser;
|
||||||
|
|
||||||
@ -661,4 +661,4 @@ class Account implements CUD, CommonDatabaseCalls, AccountInterface
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace FireflyIII\Database\AccountType;
|
namespace FireflyIII\Database\AccountType;
|
||||||
|
|
||||||
use FireflyIII\Database\CommonDatabaseCalls;
|
use FireflyIII\Database\CommonDatabaseCallsInterface;
|
||||||
use FireflyIII\Database\CUD;
|
use FireflyIII\Database\CUDInterface;
|
||||||
use FireflyIII\Exception\FireflyException;
|
use FireflyIII\Exception\FireflyException;
|
||||||
use FireflyIII\Exception\NotImplementedException;
|
use FireflyIII\Exception\NotImplementedException;
|
||||||
use Illuminate\Database\Eloquent\Model as Eloquent;
|
use Illuminate\Database\Eloquent\Model as Eloquent;
|
||||||
@ -14,7 +14,7 @@ use Illuminate\Support\Collection;
|
|||||||
*
|
*
|
||||||
* @package FireflyIII\Database
|
* @package FireflyIII\Database
|
||||||
*/
|
*/
|
||||||
class AccountType implements CUD, CommonDatabaseCalls
|
class AccountType implements CUDInterface, CommonDatabaseCallsInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,8 +4,8 @@ namespace FireflyIII\Database\Bill;
|
|||||||
|
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Database\CommonDatabaseCalls;
|
use FireflyIII\Database\CommonDatabaseCallsInterface;
|
||||||
use FireflyIII\Database\CUD;
|
use FireflyIII\Database\CUDInterface;
|
||||||
use FireflyIII\Database\SwitchUser;
|
use FireflyIII\Database\SwitchUser;
|
||||||
use FireflyIII\Exception\NotImplementedException;
|
use FireflyIII\Exception\NotImplementedException;
|
||||||
use Illuminate\Database\Eloquent\Model as Eloquent;
|
use Illuminate\Database\Eloquent\Model as Eloquent;
|
||||||
@ -17,7 +17,7 @@ use Illuminate\Support\MessageBag;
|
|||||||
*
|
*
|
||||||
* @package FireflyIII\Database
|
* @package FireflyIII\Database
|
||||||
*/
|
*/
|
||||||
class Bill implements CUD, CommonDatabaseCalls, BillInterface
|
class Bill implements CUDInterface, CommonDatabaseCallsInterface, BillInterface
|
||||||
{
|
{
|
||||||
use SwitchUser;
|
use SwitchUser;
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
namespace FireflyIII\Database\Budget;
|
namespace FireflyIII\Database\Budget;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Database\CommonDatabaseCalls;
|
use FireflyIII\Database\CommonDatabaseCallsInterface;
|
||||||
use FireflyIII\Database\CUD;
|
use FireflyIII\Database\CUDInterface;
|
||||||
use FireflyIII\Database\SwitchUser;
|
use FireflyIII\Database\SwitchUser;
|
||||||
use FireflyIII\Exception\FireflyException;
|
use FireflyIII\Exception\FireflyException;
|
||||||
use FireflyIII\Exception\NotImplementedException;
|
use FireflyIII\Exception\NotImplementedException;
|
||||||
@ -17,7 +17,7 @@ use Illuminate\Database\Eloquent\Builder;
|
|||||||
*
|
*
|
||||||
* @package FireflyIII\Database
|
* @package FireflyIII\Database
|
||||||
*/
|
*/
|
||||||
class Budget implements CUD, CommonDatabaseCalls, BudgetInterface
|
class Budget implements CUDInterface, CommonDatabaseCallsInterface, BudgetInterface
|
||||||
{
|
{
|
||||||
use SwitchUser;
|
use SwitchUser;
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ use Illuminate\Database\Eloquent\Model as Eloquent;
|
|||||||
*
|
*
|
||||||
* @package FireflyIII\Database
|
* @package FireflyIII\Database
|
||||||
*/
|
*/
|
||||||
interface CUD
|
interface CUDInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
@ -2,8 +2,8 @@
|
|||||||
namespace FireflyIII\Database\Category;
|
namespace FireflyIII\Database\Category;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Database\CommonDatabaseCalls;
|
use FireflyIII\Database\CommonDatabaseCallsInterface;
|
||||||
use FireflyIII\Database\CUD;
|
use FireflyIII\Database\CUDInterface;
|
||||||
use FireflyIII\Database\SwitchUser;
|
use FireflyIII\Database\SwitchUser;
|
||||||
use FireflyIII\Exception\FireflyException;
|
use FireflyIII\Exception\FireflyException;
|
||||||
use FireflyIII\Exception\NotImplementedException;
|
use FireflyIII\Exception\NotImplementedException;
|
||||||
@ -16,7 +16,7 @@ use Illuminate\Support\MessageBag;
|
|||||||
*
|
*
|
||||||
* @package FireflyIII\Database
|
* @package FireflyIII\Database
|
||||||
*/
|
*/
|
||||||
class Category implements CUD, CommonDatabaseCalls
|
class Category implements CUDInterface, CommonDatabaseCallsInterface
|
||||||
{
|
{
|
||||||
use SwitchUser;
|
use SwitchUser;
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ use Illuminate\Support\Collection;
|
|||||||
*
|
*
|
||||||
* @package FireflyIII\Database
|
* @package FireflyIII\Database
|
||||||
*/
|
*/
|
||||||
interface CommonDatabaseCalls
|
interface CommonDatabaseCallsInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Returns an object with id $id.
|
* Returns an object with id $id.
|
@ -2,8 +2,8 @@
|
|||||||
namespace FireflyIII\Database\PiggyBank;
|
namespace FireflyIII\Database\PiggyBank;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Database\CommonDatabaseCalls;
|
use FireflyIII\Database\CommonDatabaseCallsInterface;
|
||||||
use FireflyIII\Database\CUD;
|
use FireflyIII\Database\CUDInterface;
|
||||||
use FireflyIII\Exception\FireflyException;
|
use FireflyIII\Exception\FireflyException;
|
||||||
use FireflyIII\Exception\NotImplementedException;
|
use FireflyIII\Exception\NotImplementedException;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
@ -13,7 +13,7 @@ use Illuminate\Support\Collection;
|
|||||||
*
|
*
|
||||||
* @package FireflyIII\Database
|
* @package FireflyIII\Database
|
||||||
*/
|
*/
|
||||||
class PiggyBank extends PiggyBankShared implements CUD, CommonDatabaseCalls, PiggyBankInterface
|
class PiggyBank extends PiggyBankShared implements CUDInterface, CommonDatabaseCallsInterface, PiggyBankInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param \PiggyBank $piggyBank
|
* @param \PiggyBank $piggyBank
|
||||||
|
@ -4,8 +4,8 @@ namespace FireflyIII\Database\PiggyBank;
|
|||||||
|
|
||||||
|
|
||||||
use FireflyIII\Collection\PiggyBankPart;
|
use FireflyIII\Collection\PiggyBankPart;
|
||||||
use FireflyIII\Database\CommonDatabaseCalls;
|
use FireflyIII\Database\CommonDatabaseCallsInterface;
|
||||||
use FireflyIII\Database\CUD;
|
use FireflyIII\Database\CUDInterface;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -13,7 +13,7 @@ use Illuminate\Support\Collection;
|
|||||||
*
|
*
|
||||||
* @package FireflyIII\Database
|
* @package FireflyIII\Database
|
||||||
*/
|
*/
|
||||||
class RepeatedExpense extends PiggyBankShared implements CUD, CommonDatabaseCalls, PiggyBankInterface
|
class RepeatedExpense extends PiggyBankShared implements CUDInterface, CommonDatabaseCallsInterface, PiggyBankInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace FireflyIII\Database\Transaction;
|
namespace FireflyIII\Database\Transaction;
|
||||||
|
|
||||||
use FireflyIII\Database\CommonDatabaseCalls;
|
use FireflyIII\Database\CommonDatabaseCallsInterface;
|
||||||
use FireflyIII\Database\CUD;
|
use FireflyIII\Database\CUDInterface;
|
||||||
use FireflyIII\Database\SwitchUser;
|
use FireflyIII\Database\SwitchUser;
|
||||||
use FireflyIII\Exception\FireflyException;
|
use FireflyIII\Exception\FireflyException;
|
||||||
use FireflyIII\Exception\NotImplementedException;
|
use FireflyIII\Exception\NotImplementedException;
|
||||||
@ -16,7 +16,7 @@ use Illuminate\Support\MessageBag;
|
|||||||
*
|
*
|
||||||
* @package FireflyIII\Database
|
* @package FireflyIII\Database
|
||||||
*/
|
*/
|
||||||
class Transaction implements CUD, CommonDatabaseCalls
|
class Transaction implements CUDInterface, CommonDatabaseCallsInterface
|
||||||
{
|
{
|
||||||
use SwitchUser;
|
use SwitchUser;
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
namespace FireflyIII\Database\TransactionCurrency;
|
namespace FireflyIII\Database\TransactionCurrency;
|
||||||
|
|
||||||
use FireflyIII\Database\CommonDatabaseCalls;
|
use FireflyIII\Database\CommonDatabaseCallsInterface;
|
||||||
use FireflyIII\Database\CUD;
|
use FireflyIII\Database\CUDInterface;
|
||||||
use FireflyIII\Exception\NotImplementedException;
|
use FireflyIII\Exception\NotImplementedException;
|
||||||
use Illuminate\Database\Eloquent\Model as Eloquent;
|
use Illuminate\Database\Eloquent\Model as Eloquent;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
@ -14,7 +14,7 @@ use Illuminate\Support\MessageBag;
|
|||||||
*
|
*
|
||||||
* @package FireflyIII\Database
|
* @package FireflyIII\Database
|
||||||
*/
|
*/
|
||||||
class TransactionCurrency implements TransactionCurrencyInterface, CommonDatabaseCalls, CUD
|
class TransactionCurrency implements TransactionCurrencyInterface, CommonDatabaseCallsInterface, CUDInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4,8 +4,8 @@ namespace FireflyIII\Database\TransactionJournal;
|
|||||||
|
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use FireflyIII\Database\CommonDatabaseCalls;
|
use FireflyIII\Database\CommonDatabaseCallsInterface;
|
||||||
use FireflyIII\Database\CUD;
|
use FireflyIII\Database\CUDInterface;
|
||||||
use FireflyIII\Database\SwitchUser;
|
use FireflyIII\Database\SwitchUser;
|
||||||
use FireflyIII\Exception\FireflyException;
|
use FireflyIII\Exception\FireflyException;
|
||||||
use FireflyIII\Exception\NotImplementedException;
|
use FireflyIII\Exception\NotImplementedException;
|
||||||
@ -18,7 +18,7 @@ use Illuminate\Support\MessageBag;
|
|||||||
*
|
*
|
||||||
* @package FireflyIII\Database
|
* @package FireflyIII\Database
|
||||||
*/
|
*/
|
||||||
class TransactionJournal implements TransactionJournalInterface, CUD, CommonDatabaseCalls
|
class TransactionJournal implements TransactionJournalInterface, CUDInterface, CommonDatabaseCallsInterface
|
||||||
{
|
{
|
||||||
use SwitchUser;
|
use SwitchUser;
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
namespace FireflyIII\Database\TransactionType;
|
namespace FireflyIII\Database\TransactionType;
|
||||||
|
|
||||||
|
|
||||||
use FireflyIII\Database\CommonDatabaseCalls;
|
use FireflyIII\Database\CommonDatabaseCallsInterface;
|
||||||
use FireflyIII\Database\CUD;
|
use FireflyIII\Database\CUDInterface;
|
||||||
use FireflyIII\Exception\FireflyException;
|
use FireflyIII\Exception\FireflyException;
|
||||||
use FireflyIII\Exception\NotImplementedException;
|
use FireflyIII\Exception\NotImplementedException;
|
||||||
use Illuminate\Database\Eloquent\Model as Eloquent;
|
use Illuminate\Database\Eloquent\Model as Eloquent;
|
||||||
@ -16,7 +16,7 @@ use Illuminate\Support\Collection;
|
|||||||
*
|
*
|
||||||
* @package FireflyIII\Database
|
* @package FireflyIII\Database
|
||||||
*/
|
*/
|
||||||
class TransactionType implements CUD, CommonDatabaseCalls
|
class TransactionType implements CUDInterface, CommonDatabaseCallsInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
namespace FireflyIII\Shared\Mail;
|
namespace FireflyIII\Shared\Mail;
|
||||||
|
|
||||||
use Swift_RfcComplianceException;
|
use Swift_RfcComplianceException;
|
||||||
|
use Illuminate\Mail\Message;
|
||||||
/**
|
/**
|
||||||
* Class Registration
|
* Class Registration
|
||||||
*
|
*
|
||||||
@ -28,7 +28,8 @@ class Registration implements RegistrationInterface
|
|||||||
$data = ['password' => $password];
|
$data = ['password' => $password];
|
||||||
try {
|
try {
|
||||||
\Mail::send(
|
\Mail::send(
|
||||||
['emails.user.register-html', 'emails.user.register-text'], $data, function ($message) use ($email) {
|
['emails.user.register-html', 'emails.user.register-text'], $data, function (Message $message) use ($email) {
|
||||||
|
|
||||||
$message->to($email, $email)->subject('Welcome to Firefly!');
|
$message->to($email, $email)->subject('Welcome to Firefly!');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -51,7 +52,7 @@ class Registration implements RegistrationInterface
|
|||||||
$data = ['reset' => $reset];
|
$data = ['reset' => $reset];
|
||||||
try {
|
try {
|
||||||
\Mail::send(
|
\Mail::send(
|
||||||
['emails.user.remindMe-html', 'emails.user.remindMe-text'], $data, function ($message) use ($email) {
|
['emails.user.remindMe-html', 'emails.user.remindMe-text'], $data, function (Message $message) use ($email) {
|
||||||
$message->to($email, $email)->subject('Forgot your password?');
|
$message->to($email, $email)->subject('Forgot your password?');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -77,7 +78,8 @@ class Registration implements RegistrationInterface
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
\Mail::send(
|
\Mail::send(
|
||||||
['emails.user.verify-html', 'emails.user.verify-text'], $data, function ($message) use ($email) {
|
['emails.user.verify-html', 'emails.user.verify-text'], $data, function (Message $message) use ($email) {
|
||||||
|
|
||||||
$message->to($email, $email)->subject('Verify your e-mail address.');
|
$message->to($email, $email)->subject('Verify your e-mail address.');
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -11,7 +11,7 @@ $requested = $paths['public'].$uri;
|
|||||||
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
|
// This file allows us to emulate Apache's "mod_rewrite" functionality from the
|
||||||
// built-in PHP web server. This provides a convenient way to test a Laravel
|
// built-in PHP web server. This provides a convenient way to test a Laravel
|
||||||
// application without having installed a "real" web server software here.
|
// application without having installed a "real" web server software here.
|
||||||
if ($uri !== '/' and file_exists($requested))
|
if ($uri !== '/' && file_exists($requested))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user