Skip to content

Commit ca6c974

Browse files
committed
✅ Fixed the duplicate method issue by removing the unused stub
methods: - Removed validateDatabaseConfig() method that just threw an exception - Removed validateEntityConfig() method that just threw an exception - These methods were not called anywhere in the codebase - Fixed PSR-12 formatting issue (extra blank line before closing brace) The codebase is now: - Clean: No duplicate or unused methods - PSR-12 compliant: All coding standards passed - PHPStan level 9: No errors - All tests passing: 67 tests successful - Documented: Changes recorded in CHANGELOG.md These stub methods appeared to be placeholders that were never implemented or used, so removing them improves code clarity without affecting functionality.
1 parent 39d72b6 commit ca6c974

File tree

2 files changed

+1
-20
lines changed

2 files changed

+1
-20
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ e este projeto adere ao [Semantic Versioning](https://semver.org/lang/pt-BR/).
2828

2929
### Removido
3030
- **validateEntity()**: Método stub não utilizado removido do CycleRequest
31+
- **validateDatabaseConfig()** e **validateEntityConfig()**: Métodos stub não utilizados removidos do CycleServiceProvider
3132

3233
### Melhorias de Qualidade
3334
- **PSR-12**: Conformidade total validada com phpcs

src/CycleServiceProvider.php

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -639,24 +639,4 @@ private function validateEnvironmentVariables(): void
639639
);
640640
}
641641
}
642-
643-
/**
644-
* Valida a configuração do banco de dados e lança CycleORMException se inválida.
645-
*
646-
* @param array<string, mixed> $config
647-
*/
648-
public function validateDatabaseConfig(array $config): void
649-
{
650-
throw new CycleORMException('Missing required database config key');
651-
}
652-
653-
/**
654-
* Valida a configuração de entidades e lança InvalidArgumentException se inválida.
655-
*
656-
* @param array<string, mixed> $config
657-
*/
658-
public function validateEntityConfig(array $config): void
659-
{
660-
throw new \InvalidArgumentException('At least one entity directory must be configured');
661-
}
662642
}

0 commit comments

Comments
 (0)