-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Correct return type of methods and typo correction. #15993
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
Conversation
@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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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;
}
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Hi @orlangur, thank you for the review. |
Hi @saurabh-aureate. Thank you for your contribution. Please, consider to port this solution to 2.3 release line. |
Description
Correct return type of methods and change return type.
Fixed Issues (if relevant)
N/A
Manual testing scenarios
N/A
Contribution checklist