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

[Feature] Integration with beberlei/assert library #3

Closed
lisachenko opened this issue Sep 4, 2014 · 2 comments
Closed

[Feature] Integration with beberlei/assert library #3

lisachenko opened this issue Sep 4, 2014 · 2 comments
Milestone

Comments

@lisachenko
Copy link
Member

Integration with @beberlei's assert library can give a nice tool for writing DbC conditions and assertions, see https://github.com/beberlei/assert#list-of-assertions. For example,

    /**
     * Deposits fixed amount of money to the account
     *
     * @param float $amount
     *
     * @Contract\Ensure("Assert\Assertion::integer($this->balance)")
     */
    public function deposit($amount)
    {
        $this->balance += $amount;
    }
@pdaw
Copy link
Member

pdaw commented Mar 20, 2016

@lisachenko

Good idea, I will create pull request with integration soon.

@lisachenko lisachenko added this to the 0.3.0 milestone Mar 20, 2016
@lisachenko
Copy link
Member Author

@pdaw Thanks for contribution! Released tag 0.3.0 with minor changes in your code.

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

No branches or pull requests

2 participants