Cleanup [skip ci]

This commit is contained in:
James Cole 2015-05-14 09:51:54 +02:00
parent d543c033a3
commit 1dcf7407e6
26 changed files with 84 additions and 47 deletions

View File

@ -91,6 +91,7 @@ class ConnectJournalToPiggyBank
'amount' => $amount
]
);
return true;
}

View File

@ -18,6 +18,7 @@ class Help implements HelpInterface
/**
* @codeCoverageIgnore
*
* @param $key
*
* @return string
@ -29,6 +30,7 @@ class Help implements HelpInterface
/**
* @codeCoverageIgnore
*
* @param $route
*
* @return array
@ -57,6 +59,7 @@ class Help implements HelpInterface
/**
* @codeCoverageIgnore
*
* @param $route
*
* @return bool
@ -68,6 +71,7 @@ class Help implements HelpInterface
/**
* @codeCoverageIgnore
*
* @param $route
* @param array $content
*
@ -81,6 +85,7 @@ class Help implements HelpInterface
/**
* @codeCoverageIgnore
*
* @param $route
*
* @return bool

View File

@ -38,6 +38,7 @@ class AuthController extends Controller
*
* @param \Illuminate\Contracts\Auth\Guard $auth
* @param \Illuminate\Contracts\Auth\Registrar $registrar
*
* @codeCoverageIgnore
*
*/

View File

@ -7,6 +7,7 @@ use Illuminate\Foundation\Auth\ResetsPasswords;
/**
* Class PasswordController
*
* @codeCoverageIgnore
* @package FireflyIII\Http\Controllers\Auth
*/

View File

@ -3,7 +3,6 @@
namespace FireflyIII\Http\Middleware;
use App;
use Closure;
use FireflyIII\Models\PiggyBank;
use FireflyIII\Models\PiggyBankRepetition;

View File

@ -133,6 +133,7 @@ class Account extends Model
/**
* @codeCoverageIgnore
*
* @param $value
*
* @return string
@ -160,6 +161,7 @@ class Account extends Model
/**
* @codeCoverageIgnore
*
* @param EloquentBuilder $query
* @param array $types
*/
@ -174,6 +176,7 @@ class Account extends Model
/**
* @codeCoverageIgnore
*
* @param EloquentBuilder $query
* @param string $name
* @param string $value
@ -191,6 +194,7 @@ class Account extends Model
/**
* @codeCoverageIgnore
*
* @param $value
*/
public function setNameAttribute($value)

View File

@ -79,6 +79,7 @@ class Category extends Model
/**
* @codeCoverageIgnore
*
* @param $value
*/
public function setNameAttribute($value)
@ -89,6 +90,7 @@ class Category extends Model
/**
* @codeCoverageIgnore
*
* @param $value
*
* @return string

View File

@ -64,6 +64,7 @@ class PiggyBank extends Model
/**
* @codeCoverageIgnore
*
* @param $value
*
* @return int
@ -93,6 +94,7 @@ class PiggyBank extends Model
/**
* @codeCoverageIgnore
*
* @param $value
*/
public function setNameAttribute($value)
@ -103,6 +105,7 @@ class PiggyBank extends Model
/**
* @codeCoverageIgnore
*
* @param $value
*
* @return string

View File

@ -18,6 +18,7 @@ class Reminder extends Model
/**
* @codeCoverageIgnore
*
* @param $value
*
* @return int
@ -38,6 +39,7 @@ class Reminder extends Model
/**
* @codeCoverageIgnore
*
* @param $value
*
* @return mixed
@ -53,6 +55,7 @@ class Reminder extends Model
/**
* @codeCoverageIgnore
*
* @param $value
*
* @return bool
@ -73,6 +76,7 @@ class Reminder extends Model
/**
* @codeCoverageIgnore
*
* @param EloquentBuilder $query
* @param Carbon $start
* @param Carbon $end
@ -86,6 +90,7 @@ class Reminder extends Model
/**
* @codeCoverageIgnore
*
* @param EloquentBuilder $query
*
* @return $this
@ -100,6 +105,7 @@ class Reminder extends Model
/**
* @codeCoverageIgnore
*
* @param $value
*/
public function setMetadataAttribute($value)

View File

@ -77,6 +77,7 @@ class Tag extends Model
/**
* @codeCoverageIgnore
*
* @param $value
*
* @return string
@ -88,6 +89,7 @@ class Tag extends Model
/**
* @codeCoverageIgnore
*
* @param $value
*
* @return string
@ -99,6 +101,7 @@ class Tag extends Model
/**
* @codeCoverageIgnore
*
* @param $value
*/
public function setDescriptionAttribute($value)
@ -108,6 +111,7 @@ class Tag extends Model
/**
* @codeCoverageIgnore
*
* @param $value
*/
public function setTagAttribute($value)

View File

@ -116,6 +116,7 @@ class TransactionJournal extends Model
/**
* @codeCoverageIgnore
*
* @param $value
*
* @return string
@ -140,6 +141,7 @@ class TransactionJournal extends Model
/**
* @codeCoverageIgnore
*
* @param EloquentBuilder $query
* @param Account $account
*/
@ -154,6 +156,7 @@ class TransactionJournal extends Model
/**
* @codeCoverageIgnore
*
* @param EloquentBuilder $query
* @param Carbon $date
*
@ -166,6 +169,7 @@ class TransactionJournal extends Model
/**
* @codeCoverageIgnore
*
* @param EloquentBuilder $query
* @param Carbon $date
*
@ -178,6 +182,7 @@ class TransactionJournal extends Model
/**
* @codeCoverageIgnore
*
* @param EloquentBuilder $query
* @param $amount
*/
@ -195,6 +200,7 @@ class TransactionJournal extends Model
/**
* @codeCoverageIgnore
*
* @param EloquentBuilder $query
* @param Carbon $date
*
@ -207,6 +213,7 @@ class TransactionJournal extends Model
/**
* @codeCoverageIgnore
*
* @param EloquentBuilder $query
* @param array $types
*/
@ -239,6 +246,7 @@ class TransactionJournal extends Model
/**
* @codeCoverageIgnore
*
* @param $value
*/
public function setDescriptionAttribute($value)

View File

@ -10,9 +10,9 @@ use FireflyIII\Support\Preferences;
use FireflyIII\Support\Steam;
use FireflyIII\Support\Twig\Budget;
use FireflyIII\Support\Twig\General;
use FireflyIII\Support\Twig\Translation;
use FireflyIII\Support\Twig\Journal;
use FireflyIII\Support\Twig\PiggyBank;
use FireflyIII\Support\Twig\Translation;
use FireflyIII\Validation\FireflyValidator;
use Illuminate\Support\ServiceProvider;
use Twig;

View File

@ -251,6 +251,7 @@ class BudgetRepository implements BudgetRepositoryInterface
->lessThan(0)
->transactionTypes(['Withdrawal'])
->sum('transactions.amount');
return floatval($noBudgetSet) * -1;
}

View File

@ -391,6 +391,7 @@ class JournalRepository implements JournalRepositoryInterface
App::abort(500, '"from"-account is null, so we cannot continue!');
// @codeCoverageIgnoreStart
}
// @codeCoverageIgnoreEnd
return [$from, $to];

View File

@ -111,6 +111,7 @@ class TagRepository implements TagRepositoryInterface
return false;
}
// @codeCoverageIgnoreStart
return false;
}

View File

@ -115,6 +115,24 @@ class TagControllerTest extends TestCase
$this->assertResponseOk();
}
public function testHideTagHelp()
{
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
$this->be($tag->user);
$this->call('POST', '/tags/hideTagHelp/true', ['_token' => 'replaceMe']);
$this->assertResponseOk();
}
public function testIndex()
{
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
$this->be($tag->user);
$this->call('GET', '/tags');
$this->assertResponseOk();
}
public function testMultipleDeposits()
{
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
@ -137,25 +155,6 @@ class TagControllerTest extends TestCase
$this->assertResponseOk();
}
public function testHideTagHelp()
{
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
$this->be($tag->user);
$this->call('POST', '/tags/hideTagHelp/true', ['_token' => 'replaceMe']);
$this->assertResponseOk();
}
public function testIndex()
{
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');
$this->be($tag->user);
$this->call('GET', '/tags');
$this->assertResponseOk();
}
public function testShow()
{
$tag = FactoryMuffin::create('FireflyIII\Models\Tag');

View File

@ -478,6 +478,7 @@ class JournalRepositoryTest extends TestCase
$this->assertEquals($result->description, $data['description']);
$this->assertEquals($result->amount, 50);
}
/**
* @covers FireflyIII\Repositories\Journal\JournalRepository::update
* @covers FireflyIII\Repositories\Journal\JournalRepository::updateTags