Skip to content

Commit

Permalink
Add returned types for methods offsetExists, offsetSet, offsetUnset i…
Browse files Browse the repository at this point in the history
…n WC_Retailcrm_Response (#360)
  • Loading branch information
ellynoize authored Feb 19, 2025
1 parent bce5459 commit 3610cec
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.8.19
4.8.20
13 changes: 5 additions & 8 deletions src/include/api/class-wc-retailcrm-response.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ public function __get($name)
* @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');
}
Expand All @@ -133,9 +132,8 @@ public function offsetSet($offset, $value)
* @param mixed $offset offset
*
* @throws \BadMethodCallException
* @return void
*/
public function offsetUnset($offset)
public function offsetUnset($offset): void
{
throw new \BadMethodCallException('This call not allowed');
}
Expand All @@ -145,9 +143,8 @@ public function offsetUnset($offset)
*
* @param mixed $offset offset
*
* @return bool
*/
public function offsetExists($offset)
public function offsetExists($offset): bool
{
return isset($this->response[$offset]);
}
Expand All @@ -156,10 +153,10 @@ public function offsetExists($offset)
* Get offset
*
* @param mixed $offset offset
*
* @return mixed
* @throws \InvalidArgumentException
*
* @return mixed
* TODO PHP < 8.0 не поддерживает тип mixed. Оператор | для перечисления типов также не поддерживается.
*/
public function offsetGet($offset)
{
Expand Down
5 changes: 4 additions & 1 deletion src/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/retailcrm.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
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;

Expand Down
2 changes: 1 addition & 1 deletion src/uninstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @link https://wordpress.org/plugins/woo-retailcrm/
*
* @version 4.8.19
* @version 4.8.20
*
* @package RetailCRM
*/
Expand Down

0 comments on commit 3610cec

Please sign in to comment.