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

Small refactoring to better code readability #16010

Merged
merged 2 commits into from
Jun 14, 2018
Merged

Small refactoring to better code readability #16010

merged 2 commits into from
Jun 14, 2018

Conversation

likemusic
Copy link
Contributor

Description

Small refactoring to better code readability

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

$dependsJson = $this->_getDependsJson();
$configOptions = $this->_configOptions ? $this->_jsonEncoder->encode($this->_configOptions) : null;
$configOptionsStr = $configOptions ? ', ' . $configOptions : '';
$paramsStr = $dependsJson . $configOptionsStr;
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO readability could be slightly improved if you do like this:

$params = $this->_getDependsJson();
if ($this->_configOptions) {
    $params .= ', ' . $this->_configOptions;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@orlangur, Absolutely agree with you. I updated pull request according to your suggestion.

@magento-engcom-team
Copy link
Contributor

Hi @orlangur, thank you for the review.
ENGCOM-1960 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

Hi @likemusic. Thank you for your contribution.
Changes from your Pull Request will be available with the upcoming 2.2.6 release.

Please, consider to port this solution to 2.3 release line.
You may use Porting tool to port commits automatically.

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

Successfully merging this pull request may close these issues.

3 participants