Skip to content

Commit

Permalink
Fix PHPStan issues in card field.
Browse files Browse the repository at this point in the history
  • Loading branch information
rvdsteege committed Mar 11, 2024
1 parent 88b8ea7 commit c60ee6e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/CardField.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
class CardField extends Field {
/**
* Gateway.
*
*
* @var Gateway
*/
private $gateway;

/**
* Construct card field.
*
*
* @param string $id ID.
* @param Gateway $gateway Gateway.
*/
Expand All @@ -38,7 +38,7 @@ public function __construct( $id, Gateway $gateway ) {

/**
* Get element.
*
*
* @return Element|null
*/
protected function get_element() {
Expand All @@ -48,6 +48,10 @@ protected function get_element() {
return null;
}

if ( null === $profile_id ) {
return null;
}

$locale_transformer = new LocaleTransformer();

\wp_enqueue_script( 'pronamic-pay-mollie' );
Expand All @@ -68,7 +72,7 @@ protected function get_element() {
]
),
]
);
);

$element->children[] = new Element(
'input',
Expand All @@ -84,8 +88,8 @@ protected function get_element() {

/**
* Serialize to JSON.
*
* @return array
*
* @return array<string, string>
*/
public function jsonSerialize(): array {
$data = parent::jsonSerialize();
Expand Down

0 comments on commit c60ee6e

Please sign in to comment.