mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Some cleaning up.
This commit is contained in:
@@ -4,6 +4,9 @@ use Illuminate\Console\Command;
|
|||||||
use Symfony\Component\Console\Input\InputArgument;
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
use Symfony\Component\Console\Input\InputOption;
|
use Symfony\Component\Console\Input\InputOption;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class Cleanup
|
||||||
|
*/
|
||||||
class Cleanup extends Command
|
class Cleanup extends Command
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -21,9 +24,7 @@ class Cleanup extends Command
|
|||||||
protected $name = 'firefly:cleanup';
|
protected $name = 'firefly:cleanup';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new command instance.
|
|
||||||
*
|
*
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
@@ -219,7 +219,7 @@ class Piggybank
|
|||||||
*/
|
*/
|
||||||
public function validateRepeatedExpenses()
|
public function validateRepeatedExpenses()
|
||||||
{
|
{
|
||||||
if(!\Auth::check()) {
|
if (!\Auth::check()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/** @var \FireflyIII\Database\PiggyBank\RepeatedExpense $repository */
|
/** @var \FireflyIII\Database\PiggyBank\RepeatedExpense $repository */
|
||||||
|
@@ -19,6 +19,9 @@ class Transaction
|
|||||||
{
|
{
|
||||||
\Cache::forget('account.' . $transaction->account_id . '.latestBalance');
|
\Cache::forget('account.' . $transaction->account_id . '.latestBalance');
|
||||||
\Cache::forget('account.' . $transaction->account_id . '.lastActivityDate');
|
\Cache::forget('account.' . $transaction->account_id . '.lastActivityDate');
|
||||||
|
|
||||||
|
// delete transaction:
|
||||||
|
$transaction->delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -14,7 +14,6 @@ class TransactionJournal
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param \TransactionJournal $journal
|
* @param \TransactionJournal $journal
|
||||||
* @param int $id
|
|
||||||
*/
|
*/
|
||||||
public function store(\TransactionJournal $journal)
|
public function store(\TransactionJournal $journal)
|
||||||
{
|
{
|
||||||
|
@@ -130,7 +130,7 @@ class Date
|
|||||||
case 'half-year':
|
case 'half-year':
|
||||||
$month = intval($theCurrentEnd->format('m'));
|
$month = intval($theCurrentEnd->format('m'));
|
||||||
$currentEnd->endOfYear();
|
$currentEnd->endOfYear();
|
||||||
if($month <= 6) {
|
if ($month <= 6) {
|
||||||
$currentEnd->subMonths(6);
|
$currentEnd->subMonths(6);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@@ -29,6 +29,11 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
|||||||
//$this->
|
//$this->
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $class
|
||||||
|
*
|
||||||
|
* @return m\MockInterface
|
||||||
|
*/
|
||||||
public function mock($class)
|
public function mock($class)
|
||||||
{
|
{
|
||||||
$mock = Mockery::mock($class);
|
$mock = Mockery::mock($class);
|
||||||
|
@@ -1,6 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (!function_exists('mf')) {
|
if (!function_exists('mf')) {
|
||||||
|
/**
|
||||||
|
* @param $n
|
||||||
|
* @param bool $coloured
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
function mf($n, $coloured = true)
|
function mf($n, $coloured = true)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user