php-coupling-detector
php-coupling-detector copied to clipboard
Move logic to the domain
Currently, most of the application logic is located in service-like classes (CouplingDetector
and RuleChecker
) while the domain is dumb.
It would make sense to let the domain be responsible for domain logic and use it directly from the commands without services in the middle.
It would be a good occasion to use more value objects instead of scalars too.
Since some events are dispatched by that logic through Symfony's EventDispatcher we may want to use a message bus instead (something like https://symfony.com/doc/current/components/messenger.html)