-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 bool scope config and update throws and update use clases #18065
Fix bool scope config and update throws and update use clases #18065
Conversation
Hi @hryvinskyi. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
Hi @hryvinskyi, |
@magento-engcom-team give me test instance |
Hi @hryvinskyi. Thank you for your request. I'm working on Magento instance for you |
Hi @hryvinskyi, here is your new Magento instance. |
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.
Please fix the comments and other similar places
self::CONFIG_RESULTS_COUNT_ENABLED, | ||
ScopeInterface::SCOPE_STORE | ||
); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* Get Items |
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.
Please revert the comment and just remove curly braces {}
. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc
@@ -149,7 +152,9 @@ public function __construct( | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* Default Scope Id |
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.
Please revert the comment and just remove curly braces {}
. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc
@@ -90,11 +95,15 @@ public function __construct( | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* Get Items |
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.
Please revert the comment and just remove curly braces {}
. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc
@@ -118,19 +127,25 @@ public function getItems(QueryInterface $query, $limit = null, $additionalFilter | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* Is Results Count Enabled |
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.
Please revert the comment and just remove curly braces {}
. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc
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.
You probably missed that
@@ -87,28 +95,31 @@ public function __construct( | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* Get Config |
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.
Please revert the comment and just remove curly braces {}
. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc
@@ -41,11 +43,13 @@ public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $ | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* Whether the header should be attached to the response |
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.
Please revert the comment and just remove curly braces {}
. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc
@@ -114,23 +117,29 @@ public function __construct( | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* Set current default store |
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.
Please revert the comment and just remove curly braces {}
. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc
*/ | ||
public function setCurrentStore($store) | ||
{ | ||
$this->currentStoreId = $store; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* Allow or disallow single store mode |
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.
The same
@@ -272,7 +283,9 @@ public function getFeeds() | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* Is Auth Required |
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.
Please revert the comment and just remove curly braces {}
. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc
@@ -169,7 +176,7 @@ public function getUseSessionInUrl() | |||
if ($this->_useSessionInUrl === null) { | |||
//Using config value by default, can be overridden by using the | |||
//setter. | |||
$this->_useSessionInUrl = (bool)$this->scopeConfig->getValue( | |||
$this->_useSessionInUrl = $this->scopeConfig->getValue( |
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.
The same. You removed type casting and left the method intact
@slavvka done |
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.
You probably missed some of my comments. Also there are the same changes that should be fixed. Please look through all your changes thoroughly and fix all them. Thank you!
@@ -93,7 +94,12 @@ public function __construct( | |||
} | |||
|
|||
/** | |||
* @inheritdoc |
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.
Please revert the comment and just remove curly braces {}
. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc
@@ -93,7 +94,12 @@ public function __construct( | |||
} | |||
|
|||
/** | |||
* @inheritdoc | |||
* Get Custom Attribute |
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.
You probably missed that
@@ -118,19 +127,25 @@ public function getItems(QueryInterface $query, $limit = null, $additionalFilter | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* Is Results Count Enabled |
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.
You probably missed that
*/ | ||
public function setIsSingleStoreModeAllowed($value) | ||
{ | ||
$this->isSingleStoreAllowed = $value; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* Check if store has only one store view |
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.
Please revert the comment and just remove curly braces {}
. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc
@@ -139,15 +144,21 @@ public function hasSingleStore() | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* Check if system is run in the single store mode |
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.
Please revert the comment and just remove curly braces {}
. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc
@@ -229,7 +252,9 @@ public function getWebsites($withDefault = false, $codeKey = false) | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* Reinitialize store list |
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.
Please revert the comment and just remove curly braces {}
. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc
@@ -242,7 +267,10 @@ public function reinitStores() | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* Retrieve default store for default group and website |
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.
Please revert the comment and just remove curly braces {}
. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc
@@ -252,7 +280,12 @@ public function getDefaultStoreView() | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* Retrieve application store group object |
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.
Please revert the comment and just remove curly braces {}
. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc
@@ -267,7 +300,10 @@ public function getGroup($groupId = null) | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* Prepare array of store groups |
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.
Please revert the comment and just remove curly braces {}
. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc
@@ -307,7 +345,11 @@ private function getStoreWebsiteRelation() | |||
} | |||
|
|||
/** | |||
* @inheritdoc | |||
* Get assigned to website store |
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.
Please revert the comment and just remove curly braces {}
. Please refer to the guide https://devdocs.magento.com/guides/v2.3/coding-standards/docblock-standard-general.html#inheritdoc
@slavvka done |
@hryvinskyi Thank you! Let's wait for the tests |
hey @hryvinskyi you still have failing tests. Also please merge the latest mainline code and resolve the conflict. |
Hi @slavvka, thank you for the review. |
Hi @hryvinskyi. Thank you for your contribution. |
@hryvinskyi thank you. Could you please consider porting this PR to 2.2? Yuo can use the automatic tool https://devdocs.magento.com/guides/v2.2/contributor-guide/contributing.html#porting-tool |
Description
Fix bool scope config
Update throws
Update use class
Contribution checklist