Skip to content

Commit

Permalink
composer fix-style
Browse files Browse the repository at this point in the history
  • Loading branch information
laravel-ide-helper authored and actions-user committed Feb 22, 2021
1 parent 7aa4a45 commit 7249004
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions config/ide-helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@
|
*/

'model_hooks' => array(
'model_hooks' => [
// App\Support\IdeHelper\MyModelHook::class
),
],

/*
|--------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/Console/ModelsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -1326,12 +1326,12 @@ protected function getReflectionNamedType(ReflectionNamedType $paramType): strin
*/
protected function runModelHooks($model): void
{
$hooks = $this->laravel['config']->get('ide-helper.model_hooks', array());
$hooks = $this->laravel['config']->get('ide-helper.model_hooks', []);

foreach ($hooks as $hook) {
$hookInstance = $this->laravel->make($hook);

if (! $hookInstance instanceof ModelHookInterface) {
if (!$hookInstance instanceof ModelHookInterface) {
throw new \RuntimeException(
'Your IDE helper model hook must implement Barryvdh\LaravelIdeHelper\Contracts\ModelHookInterface'
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\ModelHooks\Hooks;

use Barryvdh\LaravelIdeHelper\Console\ModelsCommand;
Expand Down
2 changes: 2 additions & 0 deletions tests/Console/ModelsCommand/ModelHooks/Models/Simple.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\ModelHooks\Models;

use Illuminate\Database\Eloquent\Model;
Expand Down
2 changes: 2 additions & 0 deletions tests/Console/ModelsCommand/ModelHooks/Test.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php

declare(strict_types=1);

namespace Barryvdh\LaravelIdeHelper\Tests\Console\ModelsCommand\ModelHooks;

use Barryvdh\LaravelIdeHelper\Console\ModelsCommand;
Expand Down

0 comments on commit 7249004

Please sign in to comment.