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

Fixes #1906 - setOption('filter_path', 'responses.hits.hits._source'); #1907

Open
wants to merge 1 commit into
base: 8.x
Choose a base branch
from

Conversation

insekticid
Copy link

$search->setOption('filter_path', 'responses.hits.hits._source');

#1906

$search->setOption('filter_path', 'responses.hits.hits._source');
@ruflin
Copy link
Owner

ruflin commented Mar 3, 2021

Thanks for the contribution. Could you add a changelog entry and a test? Also check the style of the code as CI complains.

*
* @return $this
*/
public function setOption($key, $value)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
public function setOption($key, $value)
public function setOption(string $key, $value): self

Argument $key can probably be type-hinted

*
* @return bool
*/
public function hasOption($key)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
public function hasOption($key)
public function hasOption(string $key): bool

*
* @return $this
*/
public function addOption($key, $value)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
public function addOption($key, $value)
public function addOption(string $key, $value): self

*
* @return mixed
*/
public function getOption($key)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
public function getOption($key)
public function getOption(string $key)

/**
* @return array
*/
public function getOptions()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
public function getOptions()
public function getOptions(): array

*
* @return bool
*/
protected function _validateOption($key)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
protected function _validateOption($key)
protected function _validateOption(string $key): bool

/**
* @return $this
*/
public function clearOptions()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
public function clearOptions()
public function clearOptions(): self

*
* @return $this
*/
public function setOptions(array $options)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
public function setOptions(array $options)
public function setOptions(array $options): self

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