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

Correct return type of methods and typo correction. #15993

Merged

Conversation

saurabh-parekh
Copy link

Description

Correct return type of methods and change return type.

Fixed Issues (if relevant)

N/A

Manual testing scenarios

N/A

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)

@saurabh-parekh
Copy link
Author

@chirag-wagento I will create forwardport and backport request by own after merge with magento code. Please don't go in hurry for creating other developer's forwardport and backport pull request. We all are aware so we can create our own pull request at right time.Be professional.

@@ -32,7 +33,7 @@ public function __construct(Context $context, Registry $coreRegistry)
/**
* Initialize category object in registry
*
* @return Category
* @return Category|Boolean
Copy link
Contributor

Choose a reason for hiding this comment

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

How this method can return Boolean class?

Copy link
Author

Choose a reason for hiding this comment

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

@orlangur
Method returns false value at if $rootid not found in category path ids.

if (!in_array($rootId, $category->getPathIds())) {
$this->_redirect('catalog/*/', ['_current' => true, 'id' => null]);
return false;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

false is bool primitive type, it has nothing to do with Boolean class.

Copy link
Author

Choose a reason for hiding this comment

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

Okay.Thanks for helping. Should i add simple boolean or leave it as it is and remove file from PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

Add |bool and remove unneeded class import.

Copy link
Author

Choose a reason for hiding this comment

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

I update the file. Please review it.

@magento-engcom-team
Copy link
Contributor

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

@magento-engcom-team
Copy link
Contributor

Hi @saurabh-aureate. 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