Skip to content

Commit

Permalink
Improve code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir committed Dec 25, 2023
1 parent 06c796b commit 5158890
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/IdeHelper/BelongsToThroughRelationsHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function run(ModelsCommand $command, Model $model): void
$traits = class_uses_recursive($model);

if (!in_array(BelongsToThroughTrait::class, $traits)) {
return;
return; // @codeCoverageIgnore
}

$methods = (new ReflectionClass($model))->getMethods(ReflectionMethod::IS_PUBLIC);
Expand All @@ -32,8 +32,8 @@ public function run(ModelsCommand $command, Model $model): void

try {
$relationship = $method->invoke($model);
} catch (Throwable) {
continue;
} catch (Throwable) { // @codeCoverageIgnore
continue; // @codeCoverageIgnore
}

if ($relationship instanceof BelongsToThroughRelation) {
Expand Down

0 comments on commit 5158890

Please sign in to comment.