diff --git a/src/Core/CoreServiceProvider.php b/src/Core/CoreServiceProvider.php index 8248c3a5a..c65f70cfd 100644 --- a/src/Core/CoreServiceProvider.php +++ b/src/Core/CoreServiceProvider.php @@ -38,7 +38,9 @@ class CoreServiceProvider extends ServiceProvider $bus->mapUsing(function ($command) { return Bus::simpleMapping( - $command, 'Flarum\Core\Commands', 'Flarum\Core\Handlers\Commands' + $command, + 'Flarum\Core\Commands', + 'Flarum\Core\Handlers\Commands' ); }); } diff --git a/src/Core/Support/MappedMorphToTrait.php b/src/Core/Support/MappedMorphToTrait.php index f1054cba3..98fdb98bc 100644 --- a/src/Core/Support/MappedMorphToTrait.php +++ b/src/Core/Support/MappedMorphToTrait.php @@ -20,19 +20,29 @@ trait MappedMorphToTrait // there are multiple types in the morph and we can't use single queries. if (is_null($typeValue = $this->$type)) { return new MappedMorphTo( - $this->newQuery(), $this, $id, null, $type, $name, $classes + $this->newQuery(), + $this, + $id, + null, + $type, + $name, + $classes ); - } - - // If we are not eager loading the relationship we will essentially treat this - // as a belongs-to style relationship since morph-to extends that class and - // we will pass in the appropriate values so that it behaves as expected. - else { + } else { + // If we are not eager loading the relationship we will essentially treat this + // as a belongs-to style relationship since morph-to extends that class and + // we will pass in the appropriate values so that it behaves as expected. $class = $classes[$typeValue]; $instance = new $class; return new MappedMorphTo( - $instance->newQuery(), $this, $id, $instance->getKeyName(), $type, $name, $classes + $instance->newQuery(), + $this, + $id, + $instance->getKeyName(), + $type, + $name, + $classes ); } }