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

Implement fluid interface in all entities #554

Merged
merged 1 commit into from
Nov 7, 2013

Conversation

Richtermeister
Copy link
Contributor

Currently the fluid interface of entities is inconsistent. This PR fixes this and adds missing phpdocs as well.

(Also fixes a little bug where total shipping weight is not returned properly.)

Currently the fluid interface of entities is inconsistent. This PR fixes this and adds missing phpdocs as well.
@Richtermeister
Copy link
Contributor Author

While on subject, should we add spec tests to make sure fluid interface is implemented on every setter? Could this be one test, or one per method?

it_implements_fluid_interface($var1, $var2)
{
    $this->setVar1($var1)->shouldReturn($this);
    $this->setVar2($var2)->shouldReturn($this;
}

Also, which phpdoc return should be used? @return self or @return $this or @return FQCN ?

@cordoval
Copy link
Contributor

cordoval commented Nov 7, 2013

this is all $this

pjedrzejewski pushed a commit that referenced this pull request Nov 7, 2013
Implement fluid interface in all entities
@pjedrzejewski pjedrzejewski merged commit bbe580a into Sylius:master Nov 7, 2013
@pjedrzejewski
Copy link
Member

Multiple models already have specs for that, I've put them all in 1 example, but I don't feel like it's smart to sit and add all these specs now. We can add them during refactoring or when things break. Thank you Daniel! 👍

@Richtermeister Richtermeister deleted the fluid-interfaces branch November 7, 2013 17:27
pamil pushed a commit to pamil/Sylius that referenced this pull request May 7, 2019
Implement fluid interface in all entities
pamil pushed a commit to pamil/Sylius that referenced this pull request May 7, 2019
Implement fluid interface in all entities
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Minor issues and PRs improving the current solutions (optimizations, typo fixes, etc.).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants