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

Fix fluent interface inconsistency #788

Merged
merged 5 commits into from
Feb 21, 2015

Conversation

im-denisenko
Copy link
Contributor

  • All methods that supposed to be fluent now return instance from here they were called.
  • Some tests were added.
  • @return docblock updated across entire library. Finishes work started in Fix IDE doc for better auto-completion #774.
  • @param and @return realigned using php-cs-fixer.

- Elastica\Aggregation\AbstractAggregation::setName
- Elastica\Bulk::setRequestParam
- Elastica\Bulk::setShardTimeout
- Elastica\Client::addHeader
- Elastica\Client::removeHeader
- Elastica\Connection\ConnectionPool::addConnection
- Elastica\Connection\ConnectionPool::setConnections
- Elastica\Filter\AbstractGeoShape::setRelation
- Elastica\Query::setSuggest
- Elastica\Script::setScript
- Elastica\Script::setLang
- Elastica\Transport\AbstractTransport::setConnection
- Elastica\Type::setSerializer
@coveralls
Copy link

Coverage Status

Coverage increased (+0.36%) to 84.75% when pulling 52763f9 on im-denisenko:feature/fix-fluent into 7f62b40 on ruflin:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.36%) to 84.75% when pulling 52763f9 on im-denisenko:feature/fix-fluent into 7f62b40 on ruflin:master.

* @return \Elastica\Bulk\Action\AbstractDocument
* @param \Elastica\Document|\Elastica\Script $data
* @param string $opType
* @return static
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that :-)

ruflin added a commit that referenced this pull request Feb 21, 2015
@ruflin ruflin merged commit 690a98a into ruflin:master Feb 21, 2015
@ruflin
Copy link
Owner

ruflin commented Feb 21, 2015

Awesome. Thanks.

@ruflin
Copy link
Owner

ruflin commented Feb 21, 2015

@im-denisenko BTW: I think you will like this: https://scrutinizer-ci.com/g/ruflin/Elastica/?branch=master

@im-denisenko
Copy link
Contributor Author

I quickly looked at reported issues, and yeah, it's awesome :)

Though, many of them seems to be false-positive due to incorrect phpdoc comments (this tool gets variable types from docblocks, as I can guess)

Speaking of that, I see 1527 warnings every time I trying to run phpdoc. I already wanted to fix that, so now there yet another reason to do this.

@im-denisenko im-denisenko deleted the feature/fix-fluent branch February 22, 2015 04:13
@ruflin
Copy link
Owner

ruflin commented Feb 22, 2015

:-)

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

Successfully merging this pull request may close these issues.

3 participants