When in Repository A the code looks like this:
class ARepository extends Repository implements IARepository
{
public function __construct(User $model, protected IBRepository $bRepository)
{
parent::__construct($model);
}
public function delete(int $id, int $bId = null): void
{
User::query()->whereKey($id)->delete();
$this->bRepository->delete($bId);
}
}