Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BC: Rename boolean methods of PlanSubscription #11

Closed
Konafets opened this issue Apr 22, 2017 · 1 comment
Closed

BC: Rename boolean methods of PlanSubscription #11

Konafets opened this issue Apr 22, 2017 · 1 comment
Milestone

Comments

@Konafets
Copy link
Contributor

I propose the renaming of the following methods from PlanSubscription:

  • active() to isActive()
  • onTrial() to isOnTrial()
  • canceled() to isCanceled()
  • ended() to hasEnded()

This has two reasons:

  1. It is a convention to have these kind of methods prefixed with is or has
  2. The current naming interferres with the scope feature. I want to create a scope scopeCanceled() which will be used like this:
$canceledSubscriptions = Subscription::canceled()->get();

I can not do that currently because of the canceled() method. This will be called instead of the scope.

This is a BC break.

@gerardojbaez
Copy link
Owner

I agree, can be added for v2.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants