-
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
Clean code #18124
Clean code #18124
Conversation
Hi @hryvinskyi. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
* @return \Magento\Ui\Component\Listing\Columns\ColumnInterface | ||
*/ | ||
/** | ||
* @param \Magento\Catalog\Api\Data\ProductAttributeInterface $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.
Please, remove extra spaces from doc block
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, check comment indentation
@@ -26,15 +26,19 @@ public function __construct($entities) | |||
} | |||
|
|||
/** | |||
* Get |
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, add a comment that describes service method
} | ||
|
||
/** | ||
* 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, add a comment that describes service method
/** | ||
* Format price by specified website | ||
* | ||
* @param float $price |
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, remove extra spaces from doc block
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, check comment indentation
* | ||
* @return string 3-digit currency code | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException | ||
*/ |
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, check comment indentation
* @SuppressWarnings(PHPMD.CyclomaticComplexity) | ||
* @SuppressWarnings(PHPMD.NPathComplexity) | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException | ||
*/ |
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, check comment indentation
* | ||
* @return $this | ||
* @throws \Magento\Framework\Exception\LocalizedException | ||
*/ |
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, check comment indentation
* | ||
* @return $this | ||
* @throws \Magento\Framework\Exception\NoSuchEntityException | ||
*/ |
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, check comment indentation
* | ||
* @return string | ||
* @throws \Magento\Framework\Exception\LocalizedException | ||
*/ |
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, check comment indentation and remove extra spaces
* | ||
* @return \Magento\Framework\DB\Select | ||
* @throws \Magento\Framework\Exception\LocalizedException | ||
*/ |
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, check comment indentation
@sidolov done |
* {@inheritdoc} | ||
* Get data | ||
* | ||
* @return mixed |
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 changes related to @inheritdoc. Replace {@inheritdoc} with @inheritdoc
@@ -508,207 +508,307 @@ public function getVatRequestSuccess() | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* Set Parent 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 changes related to @inheritdoc. Replace {@inheritdoc} with @inheritdoc
@@ -833,7 +833,11 @@ public function getTransactionId() | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* Set Transaction 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 changes related to @inheritdoc. Replace {@inheritdoc} with @inheritdoc
} | ||
|
||
/** | ||
* {@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 changes related to @inheritdoc. Replace {@inheritdoc} with @inheritdoc
Hi @hryvinskyi , will you continue progress with PR? |
@sidolov done |
@@ -133,82 +133,76 @@ public function setConfigData($config) | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) |
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.
Removing this annotation will cause static test failures because parameters are not used in the method.
*/ | ||
public function getFieldMetaInfo($fieldSetName, $fieldName) | ||
{ | ||
return []; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) |
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.
Removing this annotation will cause static test failures because parameters are not used in the method.
*/ | ||
public function getExtensionAttributes() | ||
{ | ||
return $this->_getExtensionAttributes(); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* | ||
* @param \Magento\Sales\Api\Data\OrderAddressExtensionInterface $extensionAttributes |
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, don't remove type hints for the method because the parent method has annotation with generic interface
*/ | ||
public function setIsClosed($isClosed) | ||
{ | ||
return $this->setData(TransactionInterface::IS_CLOSED, $isClosed); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* | ||
* @return \Magento\Sales\Api\Data\TransactionExtensionInterface|null |
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, don't remove type hints for the method because the parent method has annotation with generic interface
*/ | ||
public function getScopeType() | ||
{ | ||
return ScopeInterface::SCOPE_STORE; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* @since 100.1.0 |
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 back the @SInCE tag
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 return the deleted phpdoc annotations
@@ -992,10 +992,7 @@ public function getExtensionAttributes() | |||
} | |||
|
|||
/** | |||
* {@inheritdoc} | |||
* | |||
* @param \Magento\Sales\Api\Data\TransactionExtensionInterface $extensionAttributes |
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 param and return annotation for phpdoc
*/ | ||
public function setVatRequestSuccess($vatRequestSuccess) | ||
{ | ||
return $this->setData(OrderAddressInterface::VAT_REQUEST_SUCCESS, $vatRequestSuccess); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
* | ||
* @return \Magento\Sales\Api\Data\OrderAddressExtensionInterface|null |
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 return annotation for phpdoc
Hi, @hryvinskyi , please resolve the code review notes, fix the Travis build (static tests fails) and resolve the conflicts on your branch, so that we can process your pull request! |
Hi @sivaschenko, thank you for the review. |
Hi @hryvinskyi. Thank you for your contribution. |
Description
Just modify some code, and make it cleaner
Contribution checklist