From 3610cec728769c6f596269a5abb19547eeee2a9c Mon Sep 17 00:00:00 2001 From: ellynoize <111681973+ellynoize@users.noreply.github.com> Date: Wed, 19 Feb 2025 12:31:06 +0300 Subject: [PATCH] Add returned types for methods offsetExists, offsetSet, offsetUnset in WC_Retailcrm_Response (#360) --- CHANGELOG.md | 3 +++ VERSION | 2 +- src/include/api/class-wc-retailcrm-response.php | 13 +++++-------- src/readme.txt | 5 ++++- src/retailcrm.php | 2 +- src/uninstall.php | 2 +- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c49d17..fd3f36a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2025-02-18 4.8.20 +* Add returned types for methods offsetExists, offsetSet, offsetUnset in WC_Retailcrm_Response + ## 2025-02-04 4.8.19 * Optimization of order unloading diff --git a/VERSION b/VERSION index 1e10d52..0e94cb8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.8.19 +4.8.20 diff --git a/src/include/api/class-wc-retailcrm-response.php b/src/include/api/class-wc-retailcrm-response.php index 96ea479..634a18c 100644 --- a/src/include/api/class-wc-retailcrm-response.php +++ b/src/include/api/class-wc-retailcrm-response.php @@ -120,9 +120,8 @@ class WC_Retailcrm_Response implements \ArrayAccess * @param mixed $value value * * @throws \BadMethodCallException - * @return void */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { throw new \BadMethodCallException('This activity not allowed'); } @@ -133,9 +132,8 @@ class WC_Retailcrm_Response implements \ArrayAccess * @param mixed $offset offset * * @throws \BadMethodCallException - * @return void */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { throw new \BadMethodCallException('This call not allowed'); } @@ -145,9 +143,8 @@ class WC_Retailcrm_Response implements \ArrayAccess * * @param mixed $offset offset * - * @return bool */ - public function offsetExists($offset) + public function offsetExists($offset): bool { return isset($this->response[$offset]); } @@ -156,10 +153,10 @@ class WC_Retailcrm_Response implements \ArrayAccess * Get offset * * @param mixed $offset offset - * + * @return mixed * @throws \InvalidArgumentException * - * @return mixed + * TODO PHP < 8.0 не поддерживает тип mixed. Оператор | для перечисления типов также не поддерживается. */ public function offsetGet($offset) { diff --git a/src/readme.txt b/src/readme.txt index de92e1f..ed32ad2 100644 --- a/src/readme.txt +++ b/src/readme.txt @@ -5,7 +5,7 @@ Tags: Интеграция, Simla.com, simla Requires PHP: 7.1 Requires at least: 5.3 Tested up to: 6.5 -Stable tag: 4.8.19 +Stable tag: 4.8.20 License: GPLv1 or later License URI: http://www.gnu.org/licenses/gpl-1.0.html @@ -82,6 +82,9 @@ Asegúrate de tener una clave API específica para cada tienda. Las siguientes i == Changelog == += 4.8.20 = +* Add returned types for methods offsetExists, offsetSet, offsetUnset in WC_Retailcrm_Response + = 4.8.19 = * Optimization of order unloading diff --git a/src/retailcrm.php b/src/retailcrm.php index 8c17de5..f6d53e7 100644 --- a/src/retailcrm.php +++ b/src/retailcrm.php @@ -27,7 +27,7 @@ if (!class_exists( 'WC_Integration_Retailcrm')) : class WC_Integration_Retailcrm { const WOOCOMMERCE_SLUG = 'woocommerce'; const WOOCOMMERCE_PLUGIN_PATH = 'woocommerce/woocommerce.php'; - const MODULE_VERSION = '4.8.19'; + const MODULE_VERSION = '4.8.20'; private static $instance; diff --git a/src/uninstall.php b/src/uninstall.php index 7a232fd..de1c25e 100644 --- a/src/uninstall.php +++ b/src/uninstall.php @@ -16,7 +16,7 @@ * * @link https://wordpress.org/plugins/woo-retailcrm/ * - * @version 4.8.19 + * @version 4.8.20 * * @package RetailCRM */