Skip to content

Commit c3e7df5

Browse files
committed
[PSR-2 Compliance] Fix #8612: Hundreds of PHPCS-based static tests 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
1 parent 0338636 commit c3e7df5

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

app/code/Magento/Braintree/Ui/Component/Report/Listing/Column/PaymentType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public function toOptionArray()
4343
*/
4444
private function getAvailablePaymentTypes()
4545
{
46+
// @codingStandardsIgnoreStart
4647
return [
4748
PaymentInstrumentType::PAYPAL_ACCOUNT => __(PaymentInstrumentType::PAYPAL_ACCOUNT),
4849
PaymentInstrumentType::COINBASE_ACCOUNT => __(PaymentInstrumentType::COINBASE_ACCOUNT),
@@ -51,5 +52,6 @@ private function getAvailablePaymentTypes()
5152
PaymentInstrumentType::APPLE_PAY_CARD => __(PaymentInstrumentType::APPLE_PAY_CARD),
5253
PaymentInstrumentType::ANDROID_PAY_CARD => __(PaymentInstrumentType::ANDROID_PAY_CARD)
5354
];
55+
// @codingStandardsIgnoreEnd
5456
}
5557
}

app/code/Magento/Braintree/Ui/Component/Report/Listing/Column/Status.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public function toOptionArray()
4343
*/
4444
private function getAvailableStatuses()
4545
{
46+
// @codingStandardsIgnoreStart
4647
return [
4748
Transaction::AUTHORIZATION_EXPIRED => __(Transaction::AUTHORIZATION_EXPIRED),
4849
Transaction::AUTHORIZING => __(Transaction::AUTHORIZING),
@@ -59,5 +60,6 @@ private function getAvailableStatuses()
5960
Transaction::SETTLEMENT_PENDING => __(Transaction::SETTLEMENT_PENDING),
6061
Transaction::SETTLEMENT_CONFIRMED => __(Transaction::SETTLEMENT_CONFIRMED)
6162
];
63+
// @codingStandardsIgnoreEnd
6264
}
6365
}

app/code/Magento/Braintree/Ui/Component/Report/Listing/Column/TransactionType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ public function toOptionArray()
4343
*/
4444
private function getAvailableTransactionTypes()
4545
{
46+
// @codingStandardsIgnoreStart
4647
return [
4748
Transaction::SALE => __(Transaction::SALE),
4849
Transaction::CREDIT => __(Transaction::CREDIT)
4950
];
51+
// @codingStandardsIgnoreEnd
5052
}
5153
}

app/code/Magento/Webapi/Controller/Rest/RequestValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ private function checkPermissions()
8686
if (!$this->authorization->isAllowed($route->getAclResources())) {
8787
$params = ['resources' => implode(', ', $route->getAclResources())];
8888
throw new AuthorizationException(
89-
__(AuthorizationException::NOT_AUTHORIZED, $params)
89+
__('Consumer is not authorized to access %resources', $params)
9090
);
9191
}
9292
}

0 commit comments

Comments
 (0)