diff --git a/src/JSON.php b/src/JSON.php index 9289c59..df942da 100644 --- a/src/JSON.php +++ b/src/JSON.php @@ -2,13 +2,13 @@ namespace Naoray\NovaJson; -use Laravel\Nova\Makeable; +use Illuminate\Database\Eloquent\Model; +use Illuminate\Http\Resources\MergeValue; use Illuminate\Support\Str; use Laravel\Nova\Fields\Field; use Laravel\Nova\Fields\Hidden; -use Illuminate\Database\Eloquent\Model; -use Illuminate\Http\Resources\MergeValue; use Laravel\Nova\Http\Requests\NovaRequest; +use Laravel\Nova\Makeable; use Naoray\NovaJson\Exceptions\AttributeCast; class JSON extends MergeValue @@ -170,7 +170,7 @@ protected function prepareField(Field $field) return; } - if (!$model->hasCast($this->attribute)) { + if (! $model->hasCast($this->attribute)) { throw AttributeCast::notFoundFor($this->attribute); } diff --git a/tests/JSONTest.php b/tests/JSONTest.php index 77a47b5..81b39b6 100644 --- a/tests/JSONTest.php +++ b/tests/JSONTest.php @@ -2,11 +2,11 @@ namespace Naoray\NovaJson\Tests; -use Naoray\NovaJson\JSON; +use Illuminate\Foundation\Auth\User as Authenticatable; use Laravel\Nova\Fields\Text; use Laravel\Nova\Http\Requests\NovaRequest; use Naoray\NovaJson\Exceptions\AttributeCast; -use Illuminate\Foundation\Auth\User as Authenticatable; +use Naoray\NovaJson\JSON; class JSONTest extends TestCase {