From edf9dbc6e8b785eb01986325a3bdb0e8f543e88f Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 26 Apr 2016 14:56:42 +0200 Subject: [PATCH] Some cleaning up [skip ci] --- app/Console/Kernel.php | 12 ------------ app/Export/Exporter/CsvExporter.php | 1 + app/Providers/JournalServiceProvider.php | 7 +++---- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 2ac5b06021..8eedc53bf6 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -53,16 +53,4 @@ class Kernel extends ConsoleKernel UpgradeFireflyInstructions::class, VerifyDatabase::class, ]; - - /** - * Define the application's command schedule. - * - * @param \Illuminate\Console\Scheduling\Schedule $schedule - * - * @return void - * - */ - protected function schedule(Schedule $schedule) - { - } } diff --git a/app/Export/Exporter/CsvExporter.php b/app/Export/Exporter/CsvExporter.php index ca095951bb..1919a4d447 100644 --- a/app/Export/Exporter/CsvExporter.php +++ b/app/Export/Exporter/CsvExporter.php @@ -62,6 +62,7 @@ class CsvExporter extends BasicExporter implements ExporterInterface $rows = []; // add header: + /** @var Entry $first */ $first = $this->getEntries()->first(); $rows[] = array_keys(get_object_vars($first)); diff --git a/app/Providers/JournalServiceProvider.php b/app/Providers/JournalServiceProvider.php index 1bff963407..b11e176021 100644 --- a/app/Providers/JournalServiceProvider.php +++ b/app/Providers/JournalServiceProvider.php @@ -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.'); } }