Skip to content

Commit

Permalink
[PSR-2 Compliance] Fix magento#8612: Hundreds of PHPCS-based static t…
Browse files Browse the repository at this point in the history
…ests violations in mainline

- apply manual fixes to make PHPCS happy, changes for "Constants are not allowed as the first argument of translation function, use string literal instead"
- third-party constants are simply ignored, not sure if this is correct or not
  • Loading branch information
orlangur committed Feb 26, 2017
1 parent 60d8cf0 commit 0dcab3b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function toOptionArray()
*/
private function getAvailablePaymentTypes()
{
// @codingStandardsIgnoreStart
return [
PaymentInstrumentType::PAYPAL_ACCOUNT => __(PaymentInstrumentType::PAYPAL_ACCOUNT),
PaymentInstrumentType::COINBASE_ACCOUNT => __(PaymentInstrumentType::COINBASE_ACCOUNT),
Expand All @@ -51,5 +52,6 @@ private function getAvailablePaymentTypes()
PaymentInstrumentType::APPLE_PAY_CARD => __(PaymentInstrumentType::APPLE_PAY_CARD),
PaymentInstrumentType::ANDROID_PAY_CARD => __(PaymentInstrumentType::ANDROID_PAY_CARD)
];
// @codingStandardsIgnoreEnd
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public function toOptionArray()
*/
private function getAvailableStatuses()
{
// @codingStandardsIgnoreStart
return [
Transaction::AUTHORIZATION_EXPIRED => __(Transaction::AUTHORIZATION_EXPIRED),
Transaction::AUTHORIZING => __(Transaction::AUTHORIZING),
Expand All @@ -59,5 +60,6 @@ private function getAvailableStatuses()
Transaction::SETTLEMENT_PENDING => __(Transaction::SETTLEMENT_PENDING),
Transaction::SETTLEMENT_CONFIRMED => __(Transaction::SETTLEMENT_CONFIRMED)
];
// @codingStandardsIgnoreEnd
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ public function toOptionArray()
*/
private function getAvailableTransactionTypes()
{
// @codingStandardsIgnoreStart
return [
Transaction::SALE => __(Transaction::SALE),
Transaction::CREDIT => __(Transaction::CREDIT)
];
// @codingStandardsIgnoreEnd
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ private function checkPermissions()
if (!$this->authorization->isAllowed($route->getAclResources())) {
$params = ['resources' => implode(', ', $route->getAclResources())];
throw new AuthorizationException(
__(AuthorizationException::NOT_AUTHORIZED, $params)
__('Consumer is not authorized to access %resources', $params)
);
}
}
Expand Down

0 comments on commit 0dcab3b

Please sign in to comment.