Youwe/Global/Common standard conflicts with Magento Coding standards #6
Description
Youwe Common/Global ruleset is based on PSR-12, and Magento's https://github.com/magento/magento-coding-standard ruleset is still based on PSR2: https://github.com/magento/magento-coding-standard/blob/develop/Magento2/ruleset.xml
There are conflicting rules in PSR2 and PSR12:
- PSR12.ControlStructures.ControlStructureSpacing.FirstExpressionLine
- PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace
A code like this cannot properly formatted to be valid for both rules:
if ($qty->getSku() != $orderItem->getSku() ||
$qtyCount === 0 ||
isset($data['qtys'][$orderItem->getItemId()]) ||
$orderItem->getQtyRefunded() > 0
) {
continue;
}
I would suggest to suppress PSR-12 rules and rely on Magento's ruleset.
UPD: Magento's coding standard seem to follow the PSR-2 rule:
if ($this->isCanceled() ||
$this->isPaymentReview() ||
$state === self::STATE_COMPLETE ||
$state === self::STATE_CLOSED
) {
return false;
}
Metadata
Assignees
Labels
No labels