mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 04:03:26 +00:00
Some cleaning up [skip ci]
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace FireflyIII\Providers;
|
||||
|
||||
use Auth;
|
||||
use FireflyIII\Exceptions\FireflyException;
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
@@ -34,10 +33,10 @@ class JournalServiceProvider extends ServiceProvider
|
||||
$this->app->bind(
|
||||
'FireflyIII\Repositories\Journal\JournalRepositoryInterface',
|
||||
function (Application $app, array $arguments) {
|
||||
if (!isset($arguments[0]) && Auth::check()) {
|
||||
return app('FireflyIII\Repositories\Journal\JournalRepository', [Auth::user()]);
|
||||
if (!isset($arguments[0]) && $app->auth->check()) {
|
||||
return app('FireflyIII\Repositories\Journal\JournalRepository', [$app->auth->user()]);
|
||||
} else {
|
||||
if (!isset($arguments[0]) && !Auth::check()) {
|
||||
if (!isset($arguments[0]) && !$app->auth->check()) {
|
||||
throw new FireflyException('There is no user present.');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user