Skip to content

Firefly III: a personal finances manager

Updated various files after upgrade to laravel 5.2

James Cole8c37ef3a9557
diff --git a/app/Commands/Command.php b/app/Commands/Command.php
deleted file mode 100644
index 1212b4e554..0000000000
--- a/app/Commands/Command.php
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php namespace FireflyIII\Commands;
-/**
- * Class Command
- *
- * @codeCoverageIgnore
- * @package FireflyIII\Commands
- */
-abstract class Command
-{
-
-
-}
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php
old mode 100644
new mode 100755
index 6f8232dbc0..3a0a63ee81
--- a/app/Console/Kernel.php
+++ b/app/Console/Kernel.php
@@ -1,37 +1,27 @@
-<?php namespace FireflyIII\Console;
+<?php
+
+namespace FireflyIII\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
-/**
- * Class Kernel
- *
- * @codeCoverageIgnore
- * @package FireflyIII\Console
- */
class Kernel extends ConsoleKernel
{
-
/**
* The Artisan commands provided by your application.
*
* @var array
*/
- protected $commands
- = [
- ];
+ protected $commands = [
+ ];
/**
* Define the application's command schedule.
*
- * @param \Illuminate\Console\Scheduling\Schedule $schedule
- *
- * @SuppressWarnings(PHPMD.UnusedFormalParameter)
- *
+ * @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
}
-
}
diff --git a/app/Events/Event.php b/app/Events/Event.php
old mode 100644
new mode 100755
index 6d2ccc442c..4550f8fd5c
--- a/app/Events/Event.php
+++ b/app/Events/Event.php
@@ -1,14 +1,8 @@
-<?php namespace FireflyIII\Events;
+<?php
+
+namespace FireflyIII\Events;
-/**
- * Class Event
- *
- * @codeCoverageIgnore
- * @package FireflyIII\Events
- */
abstract class Event
{
-
//
-
}
diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php
old mode 100644
new mode 100755
index 0c8281c825..855f3a6cd4
--- a/app/Exceptions/Handler.php
+++ b/app/Exceptions/Handler.php
@@ -1,59 +1,51 @@
-<?php namespace FireflyIII\Exceptions;
+<?php
+
+namespace FireflyIII\Exceptions;
use Exception;
-use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
+use Illuminate\Auth\Access\AuthorizationException;
+use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
+use Illuminate\Foundation\Validation\ValidationException;
+use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
+use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
-/**
- * Class Handler
- *
- * @codeCoverageIgnore
- * @package FireflyIII\Exceptions
- */
class Handler extends ExceptionHandler
{
-
/**
* A list of the exception types that should not be reported.
*
* @var array
*/
- protected $dontReport
- = [
- 'Symfony\Component\HttpKernel\Exception\HttpException'
- ];
+ protected $dontReport = [
+ AuthorizationException::class,
+ HttpException::class,
+ ModelNotFoundException::class,
+ ValidationException::class,
+ ];
/**
- * Render an exception into an HTTP response.
+ * Report or log an exception.
*
- * @param \Illuminate\Http\Request $request
- * @param \Exception $e
- * @SuppressWarnings(PHPMD.ShortVariable)
+ * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
- * @return \Illuminate\Http\Response
+ * @param \Exception $e
+ * @return void
*/
- public function render($request, Exception $e)
+ public function report(Exception $e)
{
- if ($e instanceof HttpException) {
- return $this->renderHttpException($e);
- } else {
- return parent::render($request, $e);
- }
+ return parent::report($e);
}
/**
- * Report or log an exception.
- *
- * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
- * @SuppressWarnings(PHPMD.ShortVariable)
- *
- * @param \Exception $e
+ * Render an exception into an HTTP response.
*
- * @return void
+ * @param \Illuminate\Http\Request $request
+ * @param \Exception $e
+ * @return \Illuminate\Http\Response
*/
- public function report(Exception $e)
+ public function render($request, Exception $e)
{
- parent::report($e);
+ return parent::render($request, $e);
}
-
}
diff --git a/app/User.php b/app/User.php
old mode 100644
new mode 100755
index d1924bbccc..606030315e
--- a/app/User.php
+++ b/app/User.php
@@ -1,73 +1,27 @@
-<?php namespace FireflyIII;
-
-use Carbon\Carbon;
-use FireflyIII\Models\Account;
-use FireflyIII\Models\Attachment;
-use FireflyIII\Models\Bill;
-use FireflyIII\Models\Budget;
-use FireflyIII\Models\Category;
-use FireflyIII\Models\Preference;
-use FireflyIII\Models\Role;
-use FireflyIII\Models\Tag;
-use FireflyIII\Models\TransactionJournal;
-use Illuminate\Auth\Authenticatable;
-use Illuminate\Auth\Passwords\CanResetPassword;
-use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
-use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
-use Illuminate\Database\Eloquent\Model;
-use Illuminate\Database\Query\Builder;
-use Illuminate\Support\Collection;
-use Zizaco\Entrust\Traits\EntrustUserTrait;
-
-/**
- * Class User
- *
- * @package FireflyIII
- * @property integer $id
- * @property Carbon $created_at
- * @property Carbon $updated_at
- * @property string $email
- * @property string $password
- * @property string $reset
- * @property string $remember_token
- * @property-read Collection|Account[] $accounts
- * @property-read Collection|Tag[] $tags
- * @property-read Collection|Bill[] $bills
- * @property-read Collection|Budget[] $budgets
- * @property-read Collection|Category[] $categories
- * @property-read Collection|Preference[] $preferences
- * @property-read Collection|TransactionJournal[] $transactionjournals
- * @property-read Collection|Role $roles
- * @method static Builder|User whereId($value)
- * @method static Builder|User whereCreatedAt($value)
- * @method static Builder|User whereUpdatedAt($value)
- * @method static Builder|User whereEmail($value)
- * @method static Builder|User wherePassword($value)
- * @method static Builder|User whereReset($value)
- * @method static Builder|User whereRememberToken($value)
- * @property boolean $blocked
- * @property-read Collection|Attachment[] $attachments
- * @method static Builder|User whereBlocked($value)
- * @property string $blocked_code
- * @method static Builder|User whereBlockedCode($value)
- */
-class User extends Model implements AuthenticatableContract, CanResetPasswordContract
-{
+<?php
+
+namespace FireflyIII;
- use Authenticatable, CanResetPassword, EntrustUserTrait;
+use Illuminate\Foundation\Auth\User as Authenticatable;
+class User extends Authenticatable
+{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['email', 'password', 'blocked', 'blocked_code'];
+
+
/**
* The attributes excluded from the model's JSON form.
*
* @var array
*/
protected $hidden = ['password', 'remember_token'];
+
+
/**
* The database table used by the model.
*