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 'amount' => $amount
] ]
); );
return true; return true;
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -251,6 +251,7 @@ class BudgetRepository implements BudgetRepositoryInterface
->lessThan(0) ->lessThan(0)
->transactionTypes(['Withdrawal']) ->transactionTypes(['Withdrawal'])
->sum('transactions.amount'); ->sum('transactions.amount');
return floatval($noBudgetSet) * -1; 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!'); App::abort(500, '"from"-account is null, so we cannot continue!');
// @codeCoverageIgnoreStart // @codeCoverageIgnoreStart
} }
// @codeCoverageIgnoreEnd // @codeCoverageIgnoreEnd
return [$from, $to]; return [$from, $to];

View File

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

View File

@ -115,6 +115,24 @@ class TagControllerTest extends TestCase
$this->assertResponseOk(); $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() public function testMultipleDeposits()
{ {
$tag = FactoryMuffin::create('FireflyIII\Models\Tag'); $tag = FactoryMuffin::create('FireflyIII\Models\Tag');
@ -137,25 +155,6 @@ class TagControllerTest extends TestCase
$this->assertResponseOk(); $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() public function testShow()
{ {
$tag = FactoryMuffin::create('FireflyIII\Models\Tag'); $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->description, $data['description']);
$this->assertEquals($result->amount, 50); $this->assertEquals($result->amount, 50);
} }
/** /**
* @covers FireflyIII\Repositories\Journal\JournalRepository::update * @covers FireflyIII\Repositories\Journal\JournalRepository::update
* @covers FireflyIII\Repositories\Journal\JournalRepository::updateTags * @covers FireflyIII\Repositories\Journal\JournalRepository::updateTags