1
0
mirror of synced 2025-03-28 11:03:55 +03:00

Add returned types for methods offsetExists, offsetSet, offsetUnset in WC_Retailcrm_Response (#360)

This commit is contained in:
ellynoize 2025-02-19 12:31:06 +03:00 committed by GitHub
parent bce545979c
commit 3610cec728
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 15 additions and 12 deletions

View File

@ -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 ## 2025-02-04 4.8.19
* Optimization of order unloading * Optimization of order unloading

View File

@ -1 +1 @@
4.8.19 4.8.20

View File

@ -120,9 +120,8 @@ class WC_Retailcrm_Response implements \ArrayAccess
* @param mixed $value value * @param mixed $value value
* *
* @throws \BadMethodCallException * @throws \BadMethodCallException
* @return void
*/ */
public function offsetSet($offset, $value) public function offsetSet($offset, $value): void
{ {
throw new \BadMethodCallException('This activity not allowed'); throw new \BadMethodCallException('This activity not allowed');
} }
@ -133,9 +132,8 @@ class WC_Retailcrm_Response implements \ArrayAccess
* @param mixed $offset offset * @param mixed $offset offset
* *
* @throws \BadMethodCallException * @throws \BadMethodCallException
* @return void
*/ */
public function offsetUnset($offset) public function offsetUnset($offset): void
{ {
throw new \BadMethodCallException('This call not allowed'); throw new \BadMethodCallException('This call not allowed');
} }
@ -145,9 +143,8 @@ class WC_Retailcrm_Response implements \ArrayAccess
* *
* @param mixed $offset offset * @param mixed $offset offset
* *
* @return bool
*/ */
public function offsetExists($offset) public function offsetExists($offset): bool
{ {
return isset($this->response[$offset]); return isset($this->response[$offset]);
} }
@ -156,10 +153,10 @@ class WC_Retailcrm_Response implements \ArrayAccess
* Get offset * Get offset
* *
* @param mixed $offset offset * @param mixed $offset offset
* * @return mixed
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
* *
* @return mixed * TODO PHP < 8.0 не поддерживает тип mixed. Оператор | для перечисления типов также не поддерживается.
*/ */
public function offsetGet($offset) public function offsetGet($offset)
{ {

View File

@ -5,7 +5,7 @@ Tags: Интеграция, Simla.com, simla
Requires PHP: 7.1 Requires PHP: 7.1
Requires at least: 5.3 Requires at least: 5.3
Tested up to: 6.5 Tested up to: 6.5
Stable tag: 4.8.19 Stable tag: 4.8.20
License: GPLv1 or later License: GPLv1 or later
License URI: http://www.gnu.org/licenses/gpl-1.0.html 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 == == Changelog ==
= 4.8.20 =
* Add returned types for methods offsetExists, offsetSet, offsetUnset in WC_Retailcrm_Response
= 4.8.19 = = 4.8.19 =
* Optimization of order unloading * Optimization of order unloading

View File

@ -27,7 +27,7 @@ if (!class_exists( 'WC_Integration_Retailcrm')) :
class WC_Integration_Retailcrm { class WC_Integration_Retailcrm {
const WOOCOMMERCE_SLUG = 'woocommerce'; const WOOCOMMERCE_SLUG = 'woocommerce';
const WOOCOMMERCE_PLUGIN_PATH = 'woocommerce/woocommerce.php'; const WOOCOMMERCE_PLUGIN_PATH = 'woocommerce/woocommerce.php';
const MODULE_VERSION = '4.8.19'; const MODULE_VERSION = '4.8.20';
private static $instance; private static $instance;

View File

@ -16,7 +16,7 @@
* *
* @link https://wordpress.org/plugins/woo-retailcrm/ * @link https://wordpress.org/plugins/woo-retailcrm/
* *
* @version 4.8.19 * @version 4.8.20
* *
* @package RetailCRM * @package RetailCRM
*/ */