Skip to content

Commit 69270e2

Browse files
CAFernandesclaude
andcommitted
fix: Relaxa verificação de tipo para aceitar ORMInterface
- Muda verificação de instanceof ORM para instanceof ORMInterface - Permite que RepositoryFactory aceite qualquer implementação da interface - Torna o código mais flexível e compatível com diferentes implementações 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 80c7f5d commit 69270e2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/CycleServiceProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ private function registerRepositoryFactory(): void
353353
'cycle.repository',
354354
function () use ($self) {
355355
$orm = $self->app->getContainer()->get('cycle.orm');
356-
if (!$orm instanceof ORM) {
357-
throw new \RuntimeException('cycle.orm não é ORM');
356+
if (!$orm instanceof ORMInterface) {
357+
throw new \RuntimeException('cycle.orm não é ORMInterface');
358358
}
359359
return new RepositoryFactory($orm);
360360
}

0 commit comments

Comments
 (0)