-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
Mage_Catalog - DOC block update #783
Conversation
sreichel
commented
Jun 23, 2019
- doc blocks added/fixed
- PSR2 fixes (whitespaces, linebreaks, ...)
- doc blocks added/fixed - PSR2 fixes (whitespaces, linebreaks, ...)
I think PHPStorm 2020.1 has gotten a little smarter, it now recognizes the auto-completion better in @sreichel's example. It recognizes However, using @sreichel's example, PHPStorm 2020.1 flags a warning on Using only In my opinion we should always use |
I agree with @colinmollenhour, especially as |
Yes, it does. Just the tooltip is smarter.
Absolutely agree, but in this case its not
I have used PLEASE leave it as it is for now. |
I've resolved the conflict |
conflict resolved once again |
please revote |
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.
LGFM
@@ -46,7 +46,7 @@ protected function _construct() | |||
/** | |||
* Retrieve resource instance wrapper | |||
* | |||
* @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Action | |||
* @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.
This is a step backward for type inference. @inheritDoc
will mean that all methods added by Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Action
will no longer be detected by the IDE because the parent method's docs say the return is Mage_Core_Model_Mysql4_Abstract
.
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.
right. So what do you suggest?
do
* @return Mage_Catalog_Model_Resource_Product_Action
?
Probably other places need to be rechecked
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'd leave it as-is ...
Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Action
is an empty deprecated classreturn parent::_getResource();
uses return type from parent DOCs ... so it seems correct@return Mage_Core_Model_Mysql4_Abstract
should be changed to resource (later)
Problem is Mage_Core_Model_Abstract::_getResource()
...
return Mage::getResourceSingleton($this->_resourceName);
... neither IDE nor phpstan can detect correct child-model of Mage_Core_Model_Mysql4_Abstract
.
Co-authored-by: Colin Mollenhour <colin@mollenhour.com>