mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
phpcs
This commit is contained in:
parent
5de78e1aab
commit
875356b24f
2 changed files with 10 additions and 4 deletions
|
@ -501,7 +501,8 @@ class SmartButton implements SmartButtonInterface
|
|||
return false;
|
||||
}
|
||||
|
||||
private function styleForContext(string $style, string $context) : string {
|
||||
private function styleForContext(string $style, string $context): string
|
||||
{
|
||||
$defaults = [
|
||||
'layout' => 'vertical',
|
||||
'size' => 'responsive',
|
||||
|
@ -510,9 +511,12 @@ class SmartButton implements SmartButtonInterface
|
|||
'label' => 'paypal',
|
||||
];
|
||||
|
||||
$value = isset($defaults[$style]) ? $defaults[$style] : '';
|
||||
$value = $this->settings->has('button_' . $style) ? $this->settings->get('button_' . $style) : $value;
|
||||
$value = $this->settings->has('button_' . $context . '_' . $style) ? $this->settings->get('button_' . $context . '_' . $style) : $value;
|
||||
$value = isset($defaults[$style]) ?
|
||||
$defaults[$style] : '';
|
||||
$value = $this->settings->has('button_' . $style) ?
|
||||
$this->settings->get('button_' . $style) : $value;
|
||||
$value = $this->settings->has('button_' . $context . '_' . $style) ?
|
||||
$this->settings->get('button_' . $context . '_' . $style) : $value;
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -122,6 +122,7 @@ class SettingsRenderer
|
|||
}
|
||||
//phpcs:enable Inpsyde.CodeQuality.ArgumentTypeDeclaration.NoArgumentType
|
||||
|
||||
//phpcs:disable Inpsyde.CodeQuality.NestingLevel.High
|
||||
public function render()
|
||||
{
|
||||
|
||||
|
@ -163,6 +164,7 @@ class SettingsRenderer
|
|||
</tr>
|
||||
<?php endforeach;
|
||||
}
|
||||
//phpcs:enable Inpsyde.CodeQuality.NestingLevel.High
|
||||
|
||||
private function renderText(array $config)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue