-
-
Notifications
You must be signed in to change notification settings - Fork 450
Open
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Description
Functions like this, that returns $this or patent:: like this:
magento-lts/app/code/core/Mage/Uploader/Block/Single.php
Lines 18 to 26 in 892e482
| * @return Mage_Core_Block_Abstract | |
| */ | |
| protected function _prepareLayout() | |
| { | |
| parent::_prepareLayout(); | |
| $this->getChild('browse_button')->setLabel(Mage::helper('uploader')->__('...')); | |
| return $this; | |
| } |
magento-lts/app/code/core/Mage/Uploader/Block/Abstract.php
Lines 117 to 155 in 892e482
| * @return Mage_Core_Block_Abstract | |
| */ | |
| protected function _prepareLayout() | |
| { | |
| $this->setChild( | |
| 'browse_button', | |
| $this->getLayout()->createBlock('adminhtml/widget_button') | |
| ->addData([ | |
| // Workaround for IE9 | |
| 'before_html' => sprintf( | |
| '<div style="display:inline-block;" id="%s">', | |
| $this->getElementId(self::DEFAULT_BROWSE_BUTTON_ID_SUFFIX), | |
| ), | |
| 'after_html' => '</div>', | |
| 'id' => $this->getElementId(self::DEFAULT_BROWSE_BUTTON_ID_SUFFIX . '_button'), | |
| 'label' => Mage::helper('uploader')->__('Browse Files...'), | |
| 'type' => 'button', | |
| ]), | |
| ); | |
| $this->setChild( | |
| 'delete_button', | |
| $this->getLayout()->createBlock('adminhtml/widget_button') | |
| ->addData([ | |
| 'id' => '{{id}}', | |
| 'class' => 'delete', | |
| 'type' => 'button', | |
| 'label' => Mage::helper('uploader')->__('Remove'), | |
| ]), | |
| ); | |
| $this->_addElementIdsMapping([ | |
| 'container' => $this->getHtmlId(), | |
| 'templateFile' => $this->getElementId('template'), | |
| 'browse' => $this->_prepareElementsIds([self::DEFAULT_BROWSE_BUTTON_ID_SUFFIX]), | |
| ]); | |
| return parent::_prepareLayout(); | |
| } |
should return @return $this or : self if able
Expected Behavior
Returns $this
Benefits
My coworker found phpstan warnings, but i currently can't find where openmage would ignore them
Anything else?
I don't know if there is a Rector for this to check