From 5a27266b78c62c0effbd94f24e62dfa048010c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reu=CC=88el=20van=20der=20Steege?= Date: Mon, 27 Nov 2023 15:52:15 +0100 Subject: [PATCH] Fix PHPStan. --- phpstan.neon.dist | 1 + src/AbstractIntegration.php | 5 + src/Data.php | 1 + src/DataCreditCardHelper.php | 5 +- src/DataGeneralHelper.php | 2 +- src/DataHelper.php | 5 +- src/DataUrlHelper.php | 6 + src/Listener.php | 5 + src/OrderStandard/Client.php | 26 +- src/OrderStandard/Config.php | 37 +- src/OrderStandard/Gateway.php | 36 +- src/OrderStandard/Integration.php | 34 +- src/PaymentMethodsList.php | 5 +- src/SecureDataHelper.php | 2 +- src/Security.php | 25 +- src/Settings.php | 68 +--- src/Statuses.php | 1 + src/Util.php | 20 +- vendor-bin/phpstan/composer.json | 4 +- vendor-bin/phpstan/composer.lock | 86 ++--- vendor-bin/psalm/composer.json | 2 +- vendor-bin/psalm/composer.lock | 554 +++++++++++++----------------- 22 files changed, 456 insertions(+), 474 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 986a90b..1ef0129 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,6 +1,7 @@ includes: - vendor-bin/phpstan/vendor/szepeviktor/phpstan-wordpress/extension.neon parameters: + checkMissingIterableValueType: false customRulesetUsed: false level: max bootstrapFiles: diff --git a/src/AbstractIntegration.php b/src/AbstractIntegration.php index 4e49282..7a24c8f 100644 --- a/src/AbstractIntegration.php +++ b/src/AbstractIntegration.php @@ -5,6 +5,11 @@ use Pronamic\WordPress\Pay\AbstractGatewayIntegration; abstract class AbstractIntegration extends AbstractGatewayIntegration { + /** + * Constructor. + * + * @param array $args Arguments. + */ public function __construct( $args = [] ) { $args = wp_parse_args( $args, diff --git a/src/Data.php b/src/Data.php index 02f85fa..8327c26 100644 --- a/src/Data.php +++ b/src/Data.php @@ -40,6 +40,7 @@ public function get_fields() { * Get field by the specifiek name * * @param string $name + * @return string|null */ public function get_field( $name ) { $value = null; diff --git a/src/DataCreditCardHelper.php b/src/DataCreditCardHelper.php index 9dddad1..69e29ad 100644 --- a/src/DataCreditCardHelper.php +++ b/src/DataCreditCardHelper.php @@ -18,12 +18,11 @@ class DataCreditCardHelper extends DataHelper { /** * Set credit card number. * - * @param int $number Credit card number. - * + * @param string|int $number Credit card number. * @return DataCreditCardHelper */ public function set_number( $number ) { - return $this->set_field( 'CARDNO', $number ); + return $this->set_field( 'CARDNO', (string) $number ); } /** diff --git a/src/DataGeneralHelper.php b/src/DataGeneralHelper.php index 1a10bd4..ebd2085 100644 --- a/src/DataGeneralHelper.php +++ b/src/DataGeneralHelper.php @@ -38,7 +38,7 @@ public function set_alias_usage( $alias_usage ) { /** * Set PSP ID * - * @param int $number PSP ID. + * @param string $number PSP ID. * * @return DataGeneralHelper */ diff --git a/src/DataHelper.php b/src/DataHelper.php index e665e2f..382c303 100644 --- a/src/DataHelper.php +++ b/src/DataHelper.php @@ -16,7 +16,7 @@ abstract class DataHelper { /** * Data * - * @var array + * @var Data */ protected $data; @@ -34,8 +34,7 @@ public function __construct( Data $data ) { * * @param string $name Name. * @param string $value Value. - * - * @return mixed + * @return static */ public function set_field( $name, $value ) { $this->data->set_field( $name, $value ); diff --git a/src/DataUrlHelper.php b/src/DataUrlHelper.php index 02f6f4f..4d3f042 100644 --- a/src/DataUrlHelper.php +++ b/src/DataUrlHelper.php @@ -21,6 +21,7 @@ class DataUrlHelper extends DataHelper { * URL of the web page to show the customer when the payment is authorized. * * @param string $url + * @return DataUrlHelper */ public function set_accept_url( $url ) { return $this->set_field( Parameters::ACCEPT_URL, $url ); @@ -32,6 +33,7 @@ public function set_accept_url( $url ) { * URL of the web page to show the customer when he cancels the payment. * * @param string $url + * @return DataUrlHelper */ public function set_cancel_url( $url ) { return $this->set_field( Parameters::CANCEL_URL, $url ); @@ -43,6 +45,7 @@ public function set_cancel_url( $url ) { * URL of the web page to show the customer when the payment result is uncertain. * * @param string $url + * @return DataUrlHelper */ public function set_exception_url( $url ) { return $this->set_field( Parameters::EXCEPTION_URL, $url ); @@ -56,6 +59,7 @@ public function set_exception_url( $url ) { * information page). * * @param string $url + * @return DataUrlHelper */ public function set_decline_url( $url ) { return $this->set_field( Parameters::DECLINE_URL, $url ); @@ -65,6 +69,7 @@ public function set_decline_url( $url ) { * Set home URL * * @param string $url + * @return DataUrlHelper */ public function set_home_url( $url ) { return $this->set_field( 'home', $url ); @@ -74,6 +79,7 @@ public function set_home_url( $url ) { * Set back URL * * @param string $url + * @return DataUrlHelper */ public function set_back_url( $url ) { return $this->set_field( 'backurl', $url ); diff --git a/src/Listener.php b/src/Listener.php index e913aa3..2daebeb 100644 --- a/src/Listener.php +++ b/src/Listener.php @@ -15,6 +15,11 @@ * @since 1.0.0 */ class Listener { + /** + * Listen. + * + * @return void + */ public static function listen() { $data = Security::get_request_data(); diff --git a/src/OrderStandard/Client.php b/src/OrderStandard/Client.php index ce62cb3..279bcee 100644 --- a/src/OrderStandard/Client.php +++ b/src/OrderStandard/Client.php @@ -38,13 +38,6 @@ class Client { */ private $direct_query_url; - /** - * The amount - * - * @var int - */ - private $amount; - /** * Pass phrase IN * @@ -80,6 +73,13 @@ class Client { */ private $data; + /** + * Hashing algorithm. + * + * @var string + */ + private $hash_algorithm; + /** * Constructs and initialize a iDEAL kassa object * @@ -95,7 +95,7 @@ public function __construct( $psp_id ) { /** * Get the payment server URL * - * @return the payment server URL + * @return string Payment server URL. */ public function get_payment_server_url() { return $this->payment_server_url; @@ -105,6 +105,7 @@ public function get_payment_server_url() { * Set the payment server URL * * @param string $url Payment server URL. + * @return void */ public function set_payment_server_url( $url ) { $this->payment_server_url = $url; @@ -123,6 +124,7 @@ public function get_direct_query_url() { * Set the Direct Query URL. * * @param string $url Direct query URL. + * @return void */ public function set_direct_query_url( $url ) { $this->direct_query_url = $url; @@ -141,6 +143,7 @@ public function get_hash_algorithm() { * Set hash algorithm * * @param string $hash_algorithm Hashing algorithm. + * @return void */ public function set_hash_algorithm( $hash_algorithm ) { $this->hash_algorithm = $hash_algorithm; @@ -159,6 +162,7 @@ public function get_pass_phrase_in() { * Set password phrase IN * * @param string $pass_phrase_in Pass phrase IN. + * @return void */ public function set_pass_phrase_in( $pass_phrase_in ) { $this->pass_phrase_in = $pass_phrase_in; @@ -177,6 +181,7 @@ public function get_pass_phrase_out() { * Set password phrase OUT * * @param string $pass_phrase_out Pass phrase OUT. + * @return void */ public function set_pass_phrase_out( $pass_phrase_out ) { $this->pass_phrase_out = $pass_phrase_out; @@ -195,6 +200,7 @@ public function get_user_id() { * Set API user ID. * * @param string $user_id API user ID. + * @return void */ public function set_user_id( $user_id ) { $this->user_id = $user_id; @@ -213,6 +219,7 @@ public function get_password() { * Set API user password. * * @param string $password API user password. + * @return void */ public function set_password( $password ) { $this->password = $password; @@ -244,7 +251,6 @@ public function get_signature_in() { * Get signature OUT * * @param array $fields Fields to calculate signature for. - * * @return string */ public function get_signature_out( $fields ) { @@ -271,7 +277,6 @@ public function get_fields() { * Get order status * * @param string $order_id Order ID. - * * @return string|null * @throws \Exception Throw exception on error in retrieving order status. */ @@ -330,6 +335,7 @@ public function get_order_status( $order_id ) { * Verify request * * @param array $data Request data. + * @return array|false */ public function verify_request( $data ) { $result = false; diff --git a/src/OrderStandard/Config.php b/src/OrderStandard/Config.php index c0f414d..8b394aa 100644 --- a/src/OrderStandard/Config.php +++ b/src/OrderStandard/Config.php @@ -68,11 +68,46 @@ class Config extends Ingenico_Config { /** * Configuration value for the `COMPLUS` parameter. - * + * * @var string */ public $complus = ''; + /** + * Configuration value for the `PARAMVAR` parameter. + * + * @var string + */ + public $param_var = ''; + + /** + * Configuration value for order ID. + * + * @var string + */ + public $order_id = ''; + + /** + * Template page. + * + * @var string + */ + public $template_page = ''; + + /** + * Alias enabled. + * + * @var string + */ + public $alias_enabled = ''; + + /** + * Alias usage. + * + * @var string + */ + public $alias_usage = ''; + /** * Get the Ogone e-Commerce direct query URL. * diff --git a/src/OrderStandard/Gateway.php b/src/OrderStandard/Gateway.php index 1dd903e..5c8e007 100644 --- a/src/OrderStandard/Gateway.php +++ b/src/OrderStandard/Gateway.php @@ -170,8 +170,8 @@ public function get_output_fields( Payment $payment ) { } $ogone_data_general - ->set_order_id( $order_id ) - ->set_order_description( $payment->get_description() ) + ->set_order_id( (string) $order_id ) + ->set_order_description( (string) $payment->get_description() ) ->set_param_plus( 'payment_id=' . $payment->get_id() ) ->set_currency( $payment->get_total_amount()->get_currency()->get_alphabetic_code() ) ->set_amount( $payment->get_total_amount()->get_minor_units()->format( 0, '', '' ) ); @@ -184,9 +184,10 @@ public function get_output_fields( Payment $payment ) { // Alias. $alias = $payment->get_meta( 'ogone_alias' ); - if ( $this->config->alias_enabled && false !== $alias ) { - $ogone_data_general->set_alias( $alias ) - ->set_alias_usage( $this->config->alias_usage ); + if ( $this->config->alias_enabled && is_string( $alias ) && false !== $alias ) { + $ogone_data_general + ->set_alias( $alias ) + ->set_alias_usage( (string) $this->config->alias_usage ); } $customer = $payment->get_customer(); @@ -215,18 +216,18 @@ public function get_output_fields( Payment $payment ) { $ogone_data_customer->set_name( strval( $name ) ); } - $ogone_data_customer->set_email( $customer->get_email() ); + $ogone_data_customer->set_email( (string) $customer->get_email() ); } $billing_address = $payment->get_billing_address(); if ( null !== $billing_address ) { $ogone_data_customer - ->set_address( $billing_address->get_line_1() ) - ->set_zip( $billing_address->get_postal_code() ) - ->set_town( $billing_address->get_city() ) - ->set_country( $billing_address->get_country_code() ) - ->set_telephone_number( $billing_address->get_phone() ); + ->set_address( (string) $billing_address->get_line_1() ) + ->set_zip( (string) $billing_address->get_postal_code() ) + ->set_town( (string) $billing_address->get_city() ) + ->set_country( (string) $billing_address->get_country_code() ) + ->set_telephone_number( (string) $billing_address->get_phone() ); } /* @@ -262,7 +263,11 @@ public function get_output_fields( Payment $payment ) { ->set_brand( Brands::IDEAL ) ->set_payment_method( PaymentMethods::IDEAL ); - $ogone_data_general->set_field( 'ISSUERID', $payment->get_meta( 'issuer' ) ); + $issuer = $payment->get_meta( 'issuer' ); + + if ( is_string( $issuer ) ) { + $ogone_data_general->set_field( 'ISSUERID', $issuer ); + } break; case Core_PaymentMethods::BANCONTACT: @@ -316,13 +321,13 @@ public function update_status( Payment $payment ) { $data = $this->client->verify_request( $data ); if ( false !== $data ) { - $status = Statuses::transform( $data[ Parameters::STATUS ] ); + $status = Statuses::transform( (string) $data[ Parameters::STATUS ] ); $payment->set_status( $status ); // Update transaction ID. if ( \array_key_exists( Parameters::PAY_ID, $data ) ) { - $payment->set_transaction_id( $data[ Parameters::PAY_ID ] ); + $payment->set_transaction_id( (string) $data[ Parameters::PAY_ID ] ); } // Add payment note. @@ -339,7 +344,7 @@ public function update_status( Payment $payment ) { } try { - $status = $this->client->get_order_status( $order_id ); + $status = $this->client->get_order_status( (string) $order_id ); } catch ( \Exception $e ) { $payment->add_note( $e->getMessage() ); @@ -356,6 +361,7 @@ public function update_status( Payment $payment ) { * * @param Payment $payment Payment. * @param array $data Data. + * @return void */ private function update_status_payment_note( Payment $payment, $data ) { $labels = [ diff --git a/src/OrderStandard/Integration.php b/src/OrderStandard/Integration.php index 899b114..10dd68d 100644 --- a/src/OrderStandard/Integration.php +++ b/src/OrderStandard/Integration.php @@ -49,33 +49,39 @@ public function __construct( $args = [] ) { * @return array */ public function get_settings_fields() { - return Settings::get_settings_fields( 'standard' ); + return Settings::get_settings_fields(); } + /** + * Get configuration. + * + * @param int $post_id Post ID. + * @return Config + */ public function get_config( $post_id ) { $config = new Config(); $config->set_form_action_url( $this->action_url ); $config->set_direct_query_url( $this->direct_query_url ); - $form_action_url = get_post_meta( $post_id, '_pronamic_gateway_ogone_form_action_url', true ); + $form_action_url = $this->get_meta( $post_id, '_pronamic_gateway_ogone_form_action_url' ); if ( '' !== $form_action_url ) { $config->set_form_action_url( $form_action_url ); } - $config->psp_id = get_post_meta( $post_id, '_pronamic_gateway_ogone_psp_id', true ); - $config->hash_algorithm = get_post_meta( $post_id, '_pronamic_gateway_ogone_hash_algorithm', true ); - $config->sha_in_pass_phrase = get_post_meta( $post_id, '_pronamic_gateway_ogone_sha_in_pass_phrase', true ); - $config->sha_out_pass_phrase = get_post_meta( $post_id, '_pronamic_gateway_ogone_sha_out_pass_phrase', true ); - $config->user_id = get_post_meta( $post_id, '_pronamic_gateway_ogone_user_id', true ); - $config->password = get_post_meta( $post_id, '_pronamic_gateway_ogone_password', true ); - $config->order_id = get_post_meta( $post_id, '_pronamic_gateway_ogone_order_id', true ); - $config->complus = get_post_meta( $post_id, '_pronamic_gateway_ogone_complus', true ); - $config->param_var = get_post_meta( $post_id, '_pronamic_gateway_ogone_param_var', true ); - $config->template_page = get_post_meta( $post_id, '_pronamic_gateway_ogone_template_page', true ); - $config->alias_enabled = get_post_meta( $post_id, '_pronamic_gateway_ogone_alias_enabled', true ); - $config->alias_usage = get_post_meta( $post_id, '_pronamic_gateway_ogone_alias_usage', true ); + $config->psp_id = $this->get_meta( $post_id, 'ogone_psp_id' ); + $config->hash_algorithm = $this->get_meta( $post_id, 'ogone_hash_algorithm' ); + $config->sha_in_pass_phrase = $this->get_meta( $post_id, 'ogone_sha_in_pass_phrase' ); + $config->sha_out_pass_phrase = $this->get_meta( $post_id, 'ogone_sha_out_pass_phrase' ); + $config->user_id = $this->get_meta( $post_id, 'ogone_user_id' ); + $config->password = $this->get_meta( $post_id, 'ogone_password' ); + $config->order_id = $this->get_meta( $post_id, 'ogone_order_id' ); + $config->complus = $this->get_meta( $post_id, 'ogone_complus' ); + $config->param_var = $this->get_meta( $post_id, 'ogone_param_var' ); + $config->template_page = $this->get_meta( $post_id, 'ogone_template_page' ); + $config->alias_enabled = $this->get_meta( $post_id, 'ogone_alias_enabled' ); + $config->alias_usage = $this->get_meta( $post_id, 'ogone_alias_usage' ); return $config; } diff --git a/src/PaymentMethodsList.php b/src/PaymentMethodsList.php index 937b7ce..912c39c 100644 --- a/src/PaymentMethodsList.php +++ b/src/PaymentMethodsList.php @@ -22,6 +22,8 @@ class PaymentMethodsList { /** * Constructs and initialize a payment methods list + * + * @param array $data Data. */ public function __construct( array $data = [] ) { $this->data = $data; @@ -30,7 +32,8 @@ public function __construct( array $data = [] ) { /** * Add payment method * - * @param string $payment_method + * @param string $payment_method Payment method. + * @return void */ public function add_payment_method( $payment_method ) { $this->data[] = $payment_method; diff --git a/src/SecureDataHelper.php b/src/SecureDataHelper.php index 5bc303e..c81ef73 100644 --- a/src/SecureDataHelper.php +++ b/src/SecureDataHelper.php @@ -16,7 +16,7 @@ class SecureDataHelper { /** * Data * - * @var array + * @var Data */ private $data; diff --git a/src/Security.php b/src/Security.php index 6c2defa..76f94e9 100644 --- a/src/Security.php +++ b/src/Security.php @@ -15,27 +15,34 @@ class Security { /** * The Ogone calculations parameters in * - * @var array + * @var array|null */ private static $calculations_parameters_in; /** * The Ogone calculations parameters out * - * @var array + * @var array|null */ private static $calculations_parameters_out; /** * Get calculations parameters in + * + * @return array */ public static function get_calculations_parameters_in() { if ( ! isset( self::$calculations_parameters_in ) ) { self::$calculations_parameters_in = []; $file = __DIR__ . '/../data/calculations-parameters-sha-in.txt'; + if ( is_readable( $file ) ) { - self::$calculations_parameters_in = file( $file, FILE_IGNORE_NEW_LINES ); + $parameters = file( $file, FILE_IGNORE_NEW_LINES ); + + if ( false !== $parameters ) { + self::$calculations_parameters_in = $parameters; + } } } @@ -44,14 +51,21 @@ public static function get_calculations_parameters_in() { /** * Get calculations parameters in + * + * @return array */ public static function get_calculations_parameters_out() { if ( ! isset( self::$calculations_parameters_out ) ) { self::$calculations_parameters_out = []; $file = __DIR__ . '/../data/calculations-parameters-sha-out.txt'; + if ( is_readable( $file ) ) { - self::$calculations_parameters_out = file( $file, FILE_IGNORE_NEW_LINES ); + $parameters = file( $file, FILE_IGNORE_NEW_LINES ); + + if ( false !== $parameters ) { + self::$calculations_parameters_out = $parameters; + } } } @@ -91,7 +105,6 @@ public static function get_request_data() { * * @param array $calculation_fields Calculation fields. * @param array $fields Fields. - * * @return array */ public static function get_calculation_fields( $calculation_fields, $fields ) { @@ -106,7 +119,6 @@ public static function get_calculation_fields( $calculation_fields, $fields ) { * @param array $fields Fields. * @param string $passphrase Pass phrase. * @param string $hash_algorithm Hashing algorithm. - * * @return string */ public static function get_signature( $fields, $passphrase, $hash_algorithm ) { @@ -144,6 +156,7 @@ public static function get_signature( $fields, $passphrase, $hash_algorithm ) { * @param Data $data Data. * @param string $pass_phrase Pass phrase. * @param string $hash_algorithm Hashing algorithm. + * @return void */ public static function sign_data( Data $data, $pass_phrase, $hash_algorithm ) { $calculation_fields = self::get_calculations_parameters_in(); diff --git a/src/Settings.php b/src/Settings.php index 131706f..305a9da 100644 --- a/src/Settings.php +++ b/src/Settings.php @@ -16,11 +16,9 @@ class Settings { /** * Fields. * - * @param array $fields Settings fields. - * * @return array */ - public static function get_settings_fields( $type ) { + public static function get_settings_fields() { $fields = []; /* @@ -62,29 +60,15 @@ public static function get_settings_fields( $type ) { 'tooltip' => __( 'Password of the API user in the payment provider dashboard: Configuration » Users', 'pronamic_ideal' ), ]; - if ( 'standard' === $type ) { - // SHA-IN Pass phrase. - $fields[] = [ - 'section' => 'general', - 'meta_key' => '_pronamic_gateway_ogone_sha_in_pass_phrase', - 'title' => __( 'SHA-IN Pass phrase', 'pronamic_ideal' ), - 'type' => 'password', - 'classes' => [ 'regular-text', 'code' ], - 'tooltip' => __( 'SHA-IN pass phrase as mentioned in the payment provider dashboard: Configuration » Technical information » Data and origin verification.', 'pronamic_ideal' ), - ]; - } - - if ( 'directlink' === $type ) { - // SHA-IN Pass phrase. - $fields[] = [ - 'section' => 'general', - 'meta_key' => '_pronamic_gateway_ogone_directlink_sha_in_pass_phrase', - 'title' => __( 'SHA-IN Pass phrase', 'pronamic_ideal' ), - 'type' => 'password', - 'classes' => [ 'regular-text', 'code' ], - 'tooltip' => __( 'SHA-IN pass phrase as mentioned in the payment provider dashboard: Configuration » Technical information » Data and origin verification.', 'pronamic_ideal' ), - ]; - } + // SHA-IN Pass phrase. + $fields[] = [ + 'section' => 'general', + 'meta_key' => '_pronamic_gateway_ogone_sha_in_pass_phrase', + 'title' => __( 'SHA-IN Pass phrase', 'pronamic_ideal' ), + 'type' => 'password', + 'classes' => [ 'regular-text', 'code' ], + 'tooltip' => __( 'SHA-IN pass phrase as mentioned in the payment provider dashboard: Configuration » Technical information » Data and origin verification.', 'pronamic_ideal' ), + ]; // SHA-OUT Pass phrase. $fields[] = [ @@ -111,21 +95,9 @@ public static function get_settings_fields( $type ) { 'default' => Ingenico::SHA_1, ]; - if ( 'directlink' === $type ) { - // 3-D Secure - $fields[] = [ - 'section' => 'general', - 'meta_key' => '_pronamic_gateway_ogone_3d_secure_enabled', - 'title' => __( '3-D Secure', 'pronamic_ideal' ), - 'type' => 'checkbox', - 'label' => __( 'Enable 3-D Secure protocol', 'pronamic_ideal' ), - ]; - } - /* * Advanced settings */ - $fields[] = [ 'section' => 'advanced', 'type' => 'html', @@ -133,16 +105,14 @@ public static function get_settings_fields( $type ) { ]; // Form Action URL. - if ( 'standard' === $type ) { - $fields[] = [ - 'section' => 'advanced', - 'meta_key' => '_pronamic_gateway_ogone_form_action_url', - 'title' => __( 'Form Action URL', 'pronamic_ideal' ), - 'type' => 'text', - 'classes' => [ 'regular-text', 'code' ], - 'tooltip' => __( 'With this setting you can override the default Ingenico e-Commerce form action URL to the payment processing page.', 'pronamic_ideal' ), - ]; - } + $fields[] = [ + 'section' => 'advanced', + 'meta_key' => '_pronamic_gateway_ogone_form_action_url', + 'title' => __( 'Form Action URL', 'pronamic_ideal' ), + 'type' => 'text', + 'classes' => [ 'regular-text', 'code' ], + 'tooltip' => __( 'With this setting you can override the default Ingenico e-Commerce form action URL to the payment processing page.', 'pronamic_ideal' ), + ]; // Order ID. $fields[] = [ @@ -171,7 +141,7 @@ public static function get_settings_fields( $type ) { ), ]; - // COMPLUS + // Parameter COMPLUS. $fields[] = [ 'section' => 'advanced', 'meta_key' => '_pronamic_gateway_ogone_complus', diff --git a/src/Statuses.php b/src/Statuses.php index fb802c0..4b4551c 100644 --- a/src/Statuses.php +++ b/src/Statuses.php @@ -285,6 +285,7 @@ class Statuses { * Transform an Ogone status to an Pronamic Pay status. * * @param string $status Status. + * @return string|null */ public static function transform( $status ) { switch ( $status ) { diff --git a/src/Util.php b/src/Util.php index a6ca1cc..43b6e1f 100644 --- a/src/Util.php +++ b/src/Util.php @@ -16,22 +16,16 @@ class Util { /** * Get parameter variable * - * @param string $param_var + * @param string $param_var Parameter variable. + * @return string */ public static function get_param_var( $param_var ) { - // Find and replace - // @link https://github.com/woothemes/woocommerce/blob/v2.0.19/classes/emails/class-wc-email-new-order.php - $find = []; - $replace = []; + $replace_pairs = [ + '{site_url}' => \site_url(), + '{home_url}' => \home_url(), + ]; - $find[] = '{site_url}'; - $replace[] = site_url(); - - $find[] = '{home_url}'; - $replace[] = home_url(); - - // Parameter Variable - $param_var = str_replace( $find, $replace, $param_var ); + $param_var = \strtr( $param_var, $replace_pairs ); return $param_var; } diff --git a/vendor-bin/phpstan/composer.json b/vendor-bin/phpstan/composer.json index ec6f3e5..b47c8ff 100644 --- a/vendor-bin/phpstan/composer.json +++ b/vendor-bin/phpstan/composer.json @@ -1,6 +1,6 @@ { "require-dev": { - "phpstan/phpstan": "^0.12", - "szepeviktor/phpstan-wordpress": "^0.7" + "phpstan/phpstan": "^1.10", + "szepeviktor/phpstan-wordpress": "^1.3" } } diff --git a/vendor-bin/phpstan/composer.lock b/vendor-bin/phpstan/composer.lock index 36c6d54..cf395bc 100644 --- a/vendor-bin/phpstan/composer.lock +++ b/vendor-bin/phpstan/composer.lock @@ -4,34 +4,36 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f2975d5a40e0b75bbe13237236457f2a", + "content-hash": "8b16f4424fd097b4bd3897e05855d4d7", "packages": [], "packages-dev": [ { "name": "php-stubs/wordpress-stubs", - "version": "v5.9.6", + "version": "v6.4.1", "source": { "type": "git", "url": "https://github.com/php-stubs/wordpress-stubs.git", - "reference": "6a18d938d0aef39d091505a4a35b025fb6c10098" + "reference": "6d6063cf9464a306ca2a0529705d41312b08500b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/6a18d938d0aef39d091505a4a35b025fb6c10098", - "reference": "6a18d938d0aef39d091505a4a35b025fb6c10098", + "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/6d6063cf9464a306ca2a0529705d41312b08500b", + "reference": "6d6063cf9464a306ca2a0529705d41312b08500b", "shasum": "" }, "require-dev": { - "nikic/php-parser": "< 4.12.0", - "php": "~7.3 || ~8.0", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", + "nikic/php-parser": "^4.13", + "php": "^7.4 || ~8.0.0", "php-stubs/generator": "^0.8.3", "phpdocumentor/reflection-docblock": "^5.3", "phpstan/phpstan": "^1.10.12", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.5", + "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^0.8" }, "suggest": { "paragonie/sodium_compat": "Pure PHP implementation of libsodium", - "symfony/polyfill-php73": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "symfony/polyfill-php80": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "szepeviktor/phpstan-wordpress": "WordPress extensions for PHPStan" }, "type": "library", @@ -48,26 +50,26 @@ ], "support": { "issues": "https://github.com/php-stubs/wordpress-stubs/issues", - "source": "https://github.com/php-stubs/wordpress-stubs/tree/v5.9.6" + "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.4.1" }, - "time": "2023-05-18T04:34:27+00:00" + "time": "2023-11-10T00:33:47+00:00" }, { "name": "phpstan/phpstan", - "version": "0.12.100", + "version": "1.10.44", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "48236ddf823547081b2b153d1cd2994b784328c3" + "reference": "bf84367c53a23f759513985c54ffe0d0c249825b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/48236ddf823547081b2b153d1cd2994b784328c3", - "reference": "48236ddf823547081b2b153d1cd2994b784328c3", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/bf84367c53a23f759513985c54ffe0d0c249825b", + "reference": "bf84367c53a23f759513985c54ffe0d0c249825b", "shasum": "" }, "require": { - "php": "^7.1|^8.0" + "php": "^7.2|^8.0" }, "conflict": { "phpstan/phpstan-shim": "*" @@ -77,11 +79,6 @@ "phpstan.phar" ], "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.12-dev" - } - }, "autoload": { "files": [ "bootstrap.php" @@ -92,9 +89,16 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.100" + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" }, "funding": [ { @@ -110,7 +114,7 @@ "type": "tidelift" } ], - "time": "2022-11-01T09:52:08+00:00" + "time": "2023-11-21T16:30:46+00:00" }, { "name": "symfony/polyfill-php73", @@ -193,30 +197,34 @@ }, { "name": "szepeviktor/phpstan-wordpress", - "version": "v0.7.7", + "version": "v1.3.2", "source": { "type": "git", "url": "https://github.com/szepeviktor/phpstan-wordpress.git", - "reference": "bdbea69b2ba4a69998c3b6fe2b7106d78a23bd72" + "reference": "b8516ed6bab7ec50aae981698ce3f67f1be2e45a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/bdbea69b2ba4a69998c3b6fe2b7106d78a23bd72", - "reference": "bdbea69b2ba4a69998c3b6fe2b7106d78a23bd72", + "url": "https://api.github.com/repos/szepeviktor/phpstan-wordpress/zipball/b8516ed6bab7ec50aae981698ce3f67f1be2e45a", + "reference": "b8516ed6bab7ec50aae981698ce3f67f1be2e45a", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0", - "php-stubs/wordpress-stubs": "^4.7 || ^5.0", - "phpstan/phpstan": "^0.12.26", + "php": "^7.2 || ^8.0", + "php-stubs/wordpress-stubs": "^4.7 || ^5.0 || ^6.0", + "phpstan/phpstan": "^1.10.30", "symfony/polyfill-php73": "^1.12.0" }, "require-dev": { - "composer/composer": "^1.10.22", - "dealerdirect/phpcodesniffer-composer-installer": "^0.7", + "composer/composer": "^2.1.14", + "dealerdirect/phpcodesniffer-composer-installer": "^1.0", "php-parallel-lint/php-parallel-lint": "^1.1", - "phpstan/phpstan-strict-rules": "^0.12", - "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^0.6" + "phpstan/phpstan-strict-rules": "^1.2", + "phpunit/phpunit": "^8.0 || ^9.0", + "szepeviktor/phpcs-psr-12-neutron-hybrid-ruleset": "^0.8" + }, + "suggest": { + "swissspidy/phpstan-no-private": "Detect usage of internal core functions, classes and methods" }, "type": "phpstan-extension", "extra": { @@ -245,15 +253,9 @@ ], "support": { "issues": "https://github.com/szepeviktor/phpstan-wordpress/issues", - "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v0.7.7" + "source": "https://github.com/szepeviktor/phpstan-wordpress/tree/v1.3.2" }, - "funding": [ - { - "url": "https://www.paypal.me/szepeviktor", - "type": "custom" - } - ], - "time": "2021-07-14T09:19:15+00:00" + "time": "2023-10-16T17:23:56+00:00" } ], "aliases": [], diff --git a/vendor-bin/psalm/composer.json b/vendor-bin/psalm/composer.json index 15ae5f9..732203b 100644 --- a/vendor-bin/psalm/composer.json +++ b/vendor-bin/psalm/composer.json @@ -1,5 +1,5 @@ { "require-dev": { - "vimeo/psalm": "^4.4" + "vimeo/psalm": "^5.16" } } diff --git a/vendor-bin/psalm/composer.lock b/vendor-bin/psalm/composer.lock index 752ba35..e4f9ecd 100644 --- a/vendor-bin/psalm/composer.lock +++ b/vendor-bin/psalm/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "aaf74fed29daecaaea5f94735f2c60ab", + "content-hash": "92d002ab7779c034d0220d03d785c8ec", "packages": [], "packages-dev": [ { @@ -173,79 +173,6 @@ ], "time": "2021-03-30T17:13:30+00:00" }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.5", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", - "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2022-01-17T14:14:24+00:00" - }, { "name": "composer/pcre", "version": "3.1.1", @@ -649,6 +576,67 @@ }, "time": "2022-03-02T22:36:06+00:00" }, + { + "name": "fidry/cpu-core-counter", + "version": "0.5.1", + "source": { + "type": "git", + "url": "https://github.com/theofidry/cpu-core-counter.git", + "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "fidry/makefile": "^0.2.0", + "phpstan/extension-installer": "^1.2.0", + "phpstan/phpstan": "^1.9.2", + "phpstan/phpstan-deprecation-rules": "^1.0.0", + "phpstan/phpstan-phpunit": "^1.2.2", + "phpstan/phpstan-strict-rules": "^1.4.4", + "phpunit/phpunit": "^9.5.26 || ^8.5.31", + "theofidry/php-cs-fixer-config": "^1.0", + "webmozarts/strict-phpunit": "^7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Fidry\\CpuCoreCounter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com" + } + ], + "description": "Tiny utility to get the number of CPU cores.", + "keywords": [ + "CPU", + "core" + ], + "support": { + "issues": "https://github.com/theofidry/cpu-core-counter/issues", + "source": "https://github.com/theofidry/cpu-core-counter/tree/0.5.1" + }, + "funding": [ + { + "url": "https://github.com/theofidry", + "type": "github" + } + ], + "time": "2022-12-24T12:35:10+00:00" + }, { "name": "netresearch/jsonmapper", "version": "v4.2.0", @@ -756,59 +744,6 @@ }, "time": "2023-08-13T19:53:39+00:00" }, - { - "name": "openlss/lib-array2xml", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/nullivex/lib-array2xml.git", - "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", - "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "library", - "autoload": { - "psr-0": { - "LSS": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Bryan Tong", - "email": "bryan@nullivex.com", - "homepage": "https://www.nullivex.com" - }, - { - "name": "Tony Butler", - "email": "spudz76@gmail.com", - "homepage": "https://www.nullivex.com" - } - ], - "description": "Array2XML conversion library credit to lalit.org", - "homepage": "https://www.nullivex.com", - "keywords": [ - "array", - "array conversion", - "xml", - "xml conversion" - ], - "support": { - "issues": "https://github.com/nullivex/lib-array2xml/issues", - "source": "https://github.com/nullivex/lib-array2xml/tree/master" - }, - "time": "2019-03-29T20:06:56+00:00" - }, { "name": "phpdocumentor/reflection-common", "version": "2.2.0", @@ -979,16 +914,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.24.3", + "version": "1.24.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "12f01d214f1c73b9c91fdb3b1c415e4c70652083" + "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/12f01d214f1c73b9c91fdb3b1c415e4c70652083", - "reference": "12f01d214f1c73b9c91fdb3b1c415e4c70652083", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/6bd0c26f3786cd9b7c359675cb789e35a8e07496", + "reference": "6bd0c26f3786cd9b7c359675cb789e35a8e07496", "shasum": "" }, "require": { @@ -1020,9 +955,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.3" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.4" }, - "time": "2023-11-18T20:15:32+00:00" + "time": "2023-11-26T18:29:22+00:00" }, { "name": "psr/container", @@ -1129,29 +1064,29 @@ }, { "name": "sebastian/diff", - "version": "4.0.5", + "version": "5.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", - "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/912dc2fbe3e3c1e7873313cc801b100b6c68c87b", + "reference": "912dc2fbe3e3c1e7873313cc801b100b6c68c87b", "shasum": "" }, "require": { - "php": ">=7.3" + "php": ">=8.1" }, "require-dev": { - "phpunit/phpunit": "^9.3", + "phpunit/phpunit": "^10.0", "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-main": "5.0-dev" } }, "autoload": { @@ -1183,7 +1118,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.0.3" }, "funding": [ { @@ -1191,7 +1127,70 @@ "type": "github" } ], - "time": "2023-05-07T05:35:17+00:00" + "time": "2023-05-01T07:48:21+00:00" + }, + { + "name": "spatie/array-to-xml", + "version": "3.2.2", + "source": { + "type": "git", + "url": "https://github.com/spatie/array-to-xml.git", + "reference": "96be97e664c87613121d073ea39af4c74e57a7f8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spatie/array-to-xml/zipball/96be97e664c87613121d073ea39af4c74e57a7f8", + "reference": "96be97e664c87613121d073ea39af4c74e57a7f8", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "php": "^8.0" + }, + "require-dev": { + "mockery/mockery": "^1.2", + "pestphp/pest": "^1.21", + "spatie/pest-plugin-snapshots": "^1.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Spatie\\ArrayToXml\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://freek.dev", + "role": "Developer" + } + ], + "description": "Convert an array to xml", + "homepage": "https://github.com/spatie/array-to-xml", + "keywords": [ + "array", + "convert", + "xml" + ], + "support": { + "source": "https://github.com/spatie/array-to-xml/tree/3.2.2" + }, + "funding": [ + { + "url": "https://spatie.be/open-source/support-us", + "type": "custom" + }, + { + "url": "https://github.com/spatie", + "type": "github" + } + ], + "time": "2023-11-14T14:08:51+00:00" }, { "name": "symfony/console", @@ -1350,6 +1349,69 @@ ], "time": "2023-05-23T14:45:45+00:00" }, + { + "name": "symfony/filesystem", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v6.3.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-06-01T08:30:39+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "v1.28.0", @@ -1680,89 +1742,6 @@ ], "time": "2023-07-28T09:04:16+00:00" }, - { - "name": "symfony/polyfill-php80", - "version": "v1.28.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.28-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2023-01-26T09:26:14+00:00" - }, { "name": "symfony/service-contracts", "version": "v3.4.0", @@ -1933,24 +1912,24 @@ }, { "name": "vimeo/psalm", - "version": "4.30.0", + "version": "5.16.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69" + "reference": "2897ba636551a8cb61601cc26f6ccfbba6c36591" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/d0bc6e25d89f649e4f36a534f330f8bb4643dd69", - "reference": "d0bc6e25d89f649e4f36a534f330f8bb4643dd69", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/2897ba636551a8cb61601cc26f6ccfbba6c36591", + "reference": "2897ba636551a8cb61601cc26f6ccfbba6c36591", "shasum": "" }, "require": { "amphp/amp": "^2.4.2", "amphp/byte-stream": "^1.5", - "composer/package-versions-deprecated": "^1.8.0", + "composer-runtime-api": "^2", "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.1 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^2.0 || ^3.0", "dnoegel/php-xdg-base-dir": "^0.1.1", "ext-ctype": "*", "ext-dom": "*", @@ -1959,35 +1938,38 @@ "ext-mbstring": "*", "ext-simplexml": "*", "ext-tokenizer": "*", - "felixfbecker/advanced-json-rpc": "^3.0.3", - "felixfbecker/language-server-protocol": "^1.5", + "felixfbecker/advanced-json-rpc": "^3.1", + "felixfbecker/language-server-protocol": "^1.5.2", + "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1", "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", - "nikic/php-parser": "^4.13", - "openlss/lib-array2xml": "^1.0", - "php": "^7.1|^8", - "sebastian/diff": "^3.0 || ^4.0", - "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0", - "symfony/polyfill-php80": "^1.25", - "webmozart/path-util": "^2.3" + "nikic/php-parser": "^4.16", + "php": "^7.4 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "sebastian/diff": "^4.0 || ^5.0", + "spatie/array-to-xml": "^2.17.0 || ^3.0", + "symfony/console": "^4.1.6 || ^5.0 || ^6.0 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7.0" + }, + "conflict": { + "nikic/php-parser": "4.17.0" }, "provide": { "psalm/psalm": "self.version" }, "require-dev": { - "bamarni/composer-bin-plugin": "^1.2", - "brianium/paratest": "^4.0||^6.0", + "amphp/phpunit-util": "^2.0", + "bamarni/composer-bin-plugin": "^1.4", + "brianium/paratest": "^6.9", "ext-curl": "*", + "mockery/mockery": "^1.5", + "nunomaduro/mock-final-classes": "^1.1", "php-parallel-lint/php-parallel-lint": "^1.2", - "phpdocumentor/reflection-docblock": "^5", - "phpmyadmin/sql-parser": "5.1.0||dev-master", - "phpspec/prophecy": ">=1.9.0", - "phpstan/phpdoc-parser": "1.2.* || 1.6.4", - "phpunit/phpunit": "^9.0", - "psalm/plugin-phpunit": "^0.16", - "slevomat/coding-standard": "^7.0", - "squizlabs/php_codesniffer": "^3.5", - "symfony/process": "^4.3 || ^5.0 || ^6.0", - "weirdan/prophecy-shim": "^1.0 || ^2.0" + "phpstan/phpdoc-parser": "^1.6", + "phpunit/phpunit": "^9.6", + "psalm/plugin-mockery": "^1.1", + "psalm/plugin-phpunit": "^0.18", + "slevomat/coding-standard": "^8.4", + "squizlabs/php_codesniffer": "^3.6", + "symfony/process": "^4.4 || ^5.0 || ^6.0 || ^7.0" }, "suggest": { "ext-curl": "In order to send data to shepherd", @@ -2000,20 +1982,17 @@ "psalm-refactor", "psalter" ], - "type": "library", + "type": "project", "extra": { "branch-alias": { - "dev-master": "4.x-dev", + "dev-master": "5.x-dev", + "dev-4.x": "4.x-dev", "dev-3.x": "3.x-dev", "dev-2.x": "2.x-dev", "dev-1.x": "1.x-dev" } }, "autoload": { - "files": [ - "src/functions.php", - "src/spl_object_id.php" - ], "psr-4": { "Psalm\\": "src/Psalm/" } @@ -2031,13 +2010,15 @@ "keywords": [ "code", "inspection", - "php" + "php", + "static analysis" ], "support": { + "docs": "https://psalm.dev/docs", "issues": "https://github.com/vimeo/psalm/issues", - "source": "https://github.com/vimeo/psalm/tree/4.30.0" + "source": "https://github.com/vimeo/psalm" }, - "time": "2022-11-06T20:37:08+00:00" + "time": "2023-11-22T20:38:47+00:00" }, { "name": "webmozart/assert", @@ -2096,57 +2077,6 @@ "source": "https://github.com/webmozarts/assert/tree/1.11.0" }, "time": "2022-06-03T18:03:27+00:00" - }, - { - "name": "webmozart/path-util", - "version": "2.3.0", - "source": { - "type": "git", - "url": "https://github.com/webmozart/path-util.git", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "webmozart/assert": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\PathUtil\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", - "support": { - "issues": "https://github.com/webmozart/path-util/issues", - "source": "https://github.com/webmozart/path-util/tree/2.3.0" - }, - "abandoned": "symfony/filesystem", - "time": "2015-12-17T08:42:14+00:00" } ], "aliases": [],