Code cleanup.

This commit is contained in:
James Cole
2016-04-28 05:50:29 +02:00
parent 2d368f226e
commit 19d7e27fa9
13 changed files with 42 additions and 71 deletions

View File

@@ -35,10 +35,9 @@ class AccountServiceProvider extends ServiceProvider
function (Application $app, array $arguments) {
if (!isset($arguments[0]) && $app->auth->check()) {
return app('FireflyIII\Repositories\Account\AccountRepository', [$app->auth->user()]);
} else {
if (!isset($arguments[0]) && !$app->auth->check()) {
throw new FireflyException('There is no user present.');
}
}
if (!isset($arguments[0]) && !$app->auth->check()) {
throw new FireflyException('There is no user present.');
}
return app('FireflyIII\Repositories\Account\AccountRepository', $arguments);