Skip to content

Commit

Permalink
It is recommended not to use reserved keyword "list".
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Oct 11, 2023
1 parent 2fc139e commit 451066d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/DataGeneralHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ public function set_payment_method( $payment_method ) {
/**
* Set payment methods list
*
* @param string $list Payment method list.
* @param string $value Payment method list.
*
* @return DataGeneralHelper
*/
public function set_payment_methods_list( $list ) {
return $this->set_field( 'PMLIST', $list );
public function set_payment_methods_list( $value ) {
return $this->set_field( 'PMLIST', $value );
}

/**
Expand Down
10 changes: 5 additions & 5 deletions src/PaymentMethodsList.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ class PaymentMethodsList {
*
* @var array
*/
private $list;
private $data;

/**
* Constructs and initialize a payment methods list
*/
public function __construct( array $list = [] ) {
$this->list = $list;
public function __construct( array $data = [] ) {
$this->data = $data;
}

/**
Expand All @@ -33,7 +33,7 @@ public function __construct( array $list = [] ) {
* @param string $payment_method
*/
public function add_payment_method( $payment_method ) {
$this->list[] = $payment_method;
$this->data[] = $payment_method;
}

/**
Expand All @@ -44,6 +44,6 @@ public function add_payment_method( $payment_method ) {
* @return string
*/
public function __toString() {
return implode( ';', $this->list );
return implode( ';', $this->data );
}
}

0 comments on commit 451066d

Please sign in to comment.