From 9395da612cab0b06ba8f3cef1c9ee218049f0c96 Mon Sep 17 00:00:00 2001
From: Anton Komarev <1849174+antonkomarev@users.noreply.github.com>
Date: Wed, 11 Oct 2023 18:11:51 +0300
Subject: [PATCH] Add PHP8 Compatibility (#13)
---
.buildpath | 445 ------------------
.coveralls.yml | 2 -
.docker/php/Dockerfile | 22 +
.docker/php/www.conf | 85 ++++
.gitattributes | 1 +
.github/workflows/tests.yml | 41 ++
.gitignore | 1 +
.travis.yml | 26 -
code-climate-test-reporter | 30 --
composer.json | 15 +-
docker-compose.yaml | 19 +
phpunit.xml.dist | 47 +-
.../Exception/PushwooshException.php | 2 +-
.../Model/Condition/AbstractCondition.php | 2 +-
.../Model/Condition/DateCondition.php | 2 +-
.../Pushwoosh/Model/Notification/ADM.php | 2 +-
.../Pushwoosh/Model/Notification/Android.php | 2 +-
.../Model/Notification/BlackBerry.php | 2 +-
.../Pushwoosh/Model/Notification/Chrome.php | 2 +-
.../Pushwoosh/Model/Notification/Firefox.php | 2 +-
.../Pushwoosh/Model/Notification/Huawei.php | 2 +-
.../Pushwoosh/Model/Notification/IOS.php | 2 +-
.../Pushwoosh/Model/Notification/Mac.php | 2 +-
.../Model/Notification/Notification.php | 2 +-
.../Pushwoosh/Model/Notification/Safari.php | 2 +-
.../Pushwoosh/Model/Notification/WNS.php | 2 +-
.../Pushwoosh/Model/Notification/WP.php | 2 +-
.../Model/Request/CreateMessageRequest.php | 2 +-
.../Request/CreateTargetedMessageRequest.php | 2 +-
.../Model/Request/DeleteMessageRequest.php | 2 +-
.../Model/Request/GetNearestZoneRequest.php | 2 +-
.../Model/Request/GetTagsRequest.php | 2 +-
.../Model/Request/PushStatRequest.php | 2 +-
.../Model/Request/RegisterDeviceRequest.php | 2 +-
.../Model/Request/SetBadgeRequest.php | 2 +-
.../Model/Request/SetTagsRequest.php | 2 +-
.../Model/Request/UnregisterDeviceRequest.php | 2 +-
37 files changed, 207 insertions(+), 577 deletions(-)
delete mode 100644 .buildpath
delete mode 100644 .coveralls.yml
create mode 100644 .docker/php/Dockerfile
create mode 100644 .docker/php/www.conf
create mode 100644 .github/workflows/tests.yml
delete mode 100644 .travis.yml
delete mode 100644 code-climate-test-reporter
create mode 100644 docker-compose.yaml
diff --git a/.buildpath b/.buildpath
deleted file mode 100644
index 03e573d..0000000
--- a/.buildpath
+++ /dev/null
@@ -1,445 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.coveralls.yml b/.coveralls.yml
deleted file mode 100644
index 30b618e..0000000
--- a/.coveralls.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-coverage_clover: build/logs/clover.xml
-json_path: build/logs/coveralls-upload.json
diff --git a/.docker/php/Dockerfile b/.docker/php/Dockerfile
new file mode 100644
index 0000000..7720f6e
--- /dev/null
+++ b/.docker/php/Dockerfile
@@ -0,0 +1,22 @@
+# ----------------------
+# The FPM base container
+# ----------------------
+FROM php:8.2-fpm-alpine AS dev
+
+RUN apk add --no-cache --virtual .build-deps \
+ $PHPIZE_DEPS
+
+# Cleanup apk cache and temp files
+RUN rm -rf /var/cache/apk/* /tmp/*
+
+# ----------------------
+# Composer install step
+# ----------------------
+
+# Get latest Composer
+COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
+
+# ----------------------
+# The FPM production container
+# ----------------------
+FROM dev
diff --git a/.docker/php/www.conf b/.docker/php/www.conf
new file mode 100644
index 0000000..39bef0c
--- /dev/null
+++ b/.docker/php/www.conf
@@ -0,0 +1,85 @@
+; Start a new pool named 'www'.
+; the variable $pool can be used in any directive and will be replaced by the
+; pool name ('www' here)
+[www]
+
+; Unix user/group of processes
+; Note: The user is mandatory. If the group is not set, the default user's group
+; will be used.
+user = www-data
+group = www-data
+
+; The address on which to accept FastCGI requests.
+; Valid syntaxes are:
+; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
+; a specific port;
+; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
+; a specific port;
+; 'port' - to listen on a TCP socket to all addresses
+; (IPv6 and IPv4-mapped) on a specific port;
+; '/path/to/unix/socket' - to listen on a unix socket.
+; Note: This value is mandatory.
+listen = 9000
+
+; Choose how the process manager will control the number of child processes.
+; Possible Values:
+; static - a fixed number (pm.max_children) of child processes;
+; dynamic - the number of child processes are set dynamically based on the
+; following directives. With this process management, there will be
+; always at least 1 children.
+; pm.max_children - the maximum number of children that can
+; be alive at the same time.
+; pm.start_servers - the number of children created on startup.
+; pm.min_spare_servers - the minimum number of children in 'idle'
+; state (waiting to process). If the number
+; of 'idle' processes is less than this
+; number then some children will be created.
+; pm.max_spare_servers - the maximum number of children in 'idle'
+; state (waiting to process). If the number
+; of 'idle' processes is greater than this
+; number then some children will be killed.
+; ondemand - no children are created at startup. Children will be forked when
+; new requests will connect. The following parameter are used:
+; pm.max_children - the maximum number of children that
+; can be alive at the same time.
+; pm.process_idle_timeout - The number of seconds after which
+; an idle process will be killed.
+; Note: This value is mandatory.
+pm = dynamic
+
+; The number of child processes to be created when pm is set to 'static' and the
+; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
+; This value sets the limit on the number of simultaneous requests that will be
+; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
+; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
+; CGI. The below defaults are based on a server without much resources. Don't
+; forget to tweak pm.* to fit your needs.
+; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
+; Note: This value is mandatory.
+pm.max_children = 5
+
+; The number of child processes created on startup.
+; Note: Used only when pm is set to 'dynamic'
+; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
+pm.start_servers = 2
+
+; The desired minimum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.min_spare_servers = 1
+
+; The desired maximum number of idle server processes.
+; Note: Used only when pm is set to 'dynamic'
+; Note: Mandatory when pm is set to 'dynamic'
+pm.max_spare_servers = 3
+
+; The number of seconds after which an idle process will be killed.
+; Note: Used only when pm is set to 'ondemand'
+; Default Value: 10s
+;pm.process_idle_timeout = 10s;
+
+; The number of requests each child process should execute before respawning.
+; This can be useful to work around memory leaks in 3rd party libraries. For
+; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
+; Default Value: 0
+;pm.max_requests = 500
diff --git a/.gitattributes b/.gitattributes
index 4150527..cd80ceb 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,6 +1,7 @@
* text=auto
/src/test export-ignore
+/.docker export-ignore
/.buildpath export-ignore
/.coveralls.yml export-ignore
/.gitattributes export-ignore
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 0000000..ccd8f49
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,41 @@
+name: tests
+
+on: [ push, pull_request ]
+
+jobs:
+ test:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: true
+ matrix:
+ os: [ ubuntu-latest ]
+ php: [ 8.0, 8.1, 8.2 ]
+ dependency-version: [ prefer-lowest, prefer-stable ]
+
+ name: P${{ matrix.php }} - ${{ matrix.dependency-version }}
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Cache dependencies
+ uses: actions/cache@v2
+ with:
+ path: ~/.composer/cache/files
+ key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: ${{ matrix.php }}
+ extensions: dom, curl, libxml, mbstring, zip
+ tools: composer:v2
+ coverage: none
+
+ - name: Install dependencies
+ run: |
+ composer install --no-interaction
+ composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
+
+ - name: Execute tests
+ run: vendor/bin/phpunit src/test/php --testdox
diff --git a/.gitignore b/.gitignore
index 9b1548c..e3f7bf7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,4 +5,5 @@
/Gemfile.lock
/phpdocumentor/
/build/
+.phpunit.result.cache
composer.lock
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 061f1ab..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-language: php
-
-php:
- - 5.6
- - 7.0
- - 7.1
- - 7.2
- - 7.3
-
-before_install:
- - echo "memory_limit=2G" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- - curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
- - sudo apt-get install --yes nodejs
- - npm install -g grunt-cli
-
-install:
- - npm install
- - composer install
-
-script:
- - grunt
-
-after_script:
- - php vendor/bin/coveralls -v
- - chmod +x code-climate-test-reporter
- - CODECLIMATE_REPO_TOKEN=fbbb8faf1226ee12fa1f4f6b838fb021e0fcfcb4c48a8be1906adedcc255a860 ./code-climate-test-reporter
diff --git a/code-climate-test-reporter b/code-climate-test-reporter
deleted file mode 100644
index 1a4f535..0000000
--- a/code-climate-test-reporter
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env php
-run();
-}
diff --git a/composer.json b/composer.json
index 16faa80..1d98d1c 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,6 @@
{
"name": "cybercog/php-pushwoosh",
- "description": "A PHP Library to easily send push notifications with the Pushwoosh REST Web Services.",
+ "description": "A PHP Library to easily send PUSH notifications with the Pushwoosh REST Web Services.",
"license": "MIT",
"type": "library",
"keywords": [
@@ -49,21 +49,12 @@
}
},
"require": {
- "php": "^5.6 || ^7.0",
+ "php": "^8.0",
"ext-curl": "*",
"ext-json": "*"
},
"require-dev": {
- "codeclimate/php-test-reporter": "^0.3.2",
- "pdepend/pdepend": "^2.2.4",
- "phpdocumentor/phpdocumentor": "^2.9.0",
- "phploc/phploc": "^3.0.1",
- "phpmd/phpmd": "^2.4.3",
- "phpunit/phpunit": "^5.5.4",
- "satooshi/php-coveralls": "^1.0.1",
- "sebastian/phpcpd": "^2.0.4",
- "squizlabs/php_codesniffer": "^3.5",
- "symfony/yaml": "^3.1.4"
+ "phpunit/phpunit": "^9.0|^10.0"
},
"config": {
"sort-packages": true
diff --git a/docker-compose.yaml b/docker-compose.yaml
new file mode 100644
index 0000000..9a0d065
--- /dev/null
+++ b/docker-compose.yaml
@@ -0,0 +1,19 @@
+version: "3.9"
+services:
+ app:
+ container_name: php-pushwoosh-app
+ image: php-pushwoosh-app
+ build:
+ context: ./
+ dockerfile: ./.docker/php/Dockerfile
+ restart: unless-stopped
+ working_dir: /app
+ volumes:
+ - ./:/app
+ - ./.docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf:ro
+ networks:
+ - php_pushwoosh
+
+networks:
+ php_pushwoosh:
+ driver: bridge
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 69e60e1..7e1dd3a 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -1,39 +1,12 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- src/main/php
-
-
-
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd"
+ bootstrap="src/test/php/bootstrap.php"
+>
+
+
+ ./src/main/php
+
+
diff --git a/src/main/php/Gomoob/Pushwoosh/Exception/PushwooshException.php b/src/main/php/Gomoob/Pushwoosh/Exception/PushwooshException.php
index 28e9c76..332789b 100644
--- a/src/main/php/Gomoob/Pushwoosh/Exception/PushwooshException.php
+++ b/src/main/php/Gomoob/Pushwoosh/Exception/PushwooshException.php
@@ -31,7 +31,7 @@ class PushwooshException extends \Exception
* @param \Exception $previous A previous exception which leads to a creation of this exception.
* @param array $data Additional data / details to attach to the exception.
*/
- public function __construct($message = null, $code = null, $previous = null, array $data = [])
+ public function __construct($message = '', $code = 0, $previous = null, array $data = [])
{
parent::__construct($message, $code, $previous);
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Condition/AbstractCondition.php b/src/main/php/Gomoob/Pushwoosh/Model/Condition/AbstractCondition.php
index 7d0e79b..a7f32a5 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Condition/AbstractCondition.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Condition/AbstractCondition.php
@@ -66,7 +66,7 @@ public function getTagName()
/**
* {@inheritDoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
return [
$this->tagName,
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Condition/DateCondition.php b/src/main/php/Gomoob/Pushwoosh/Model/Condition/DateCondition.php
index 9ddb3c7..2c257f7 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Condition/DateCondition.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Condition/DateCondition.php
@@ -99,7 +99,7 @@ public function in(array $values = [])
/**
* {@inheritDoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
$operandWithString = null;
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Notification/ADM.php b/src/main/php/Gomoob/Pushwoosh/Model/Notification/ADM.php
index 69d7ae7..79273fd 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Notification/ADM.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Notification/ADM.php
@@ -98,7 +98,7 @@ public function getTtl()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
$json = [];
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Notification/Android.php b/src/main/php/Gomoob/Pushwoosh/Model/Notification/Android.php
index 2919d4d..c6322ed 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Notification/Android.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Notification/Android.php
@@ -177,7 +177,7 @@ public function isVibration()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
$json = [];
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Notification/BlackBerry.php b/src/main/php/Gomoob/Pushwoosh/Model/Notification/BlackBerry.php
index cdd1705..e390d0d 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Notification/BlackBerry.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Notification/BlackBerry.php
@@ -37,7 +37,7 @@ public function getHeader()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
$json = [];
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Notification/Chrome.php b/src/main/php/Gomoob/Pushwoosh/Model/Notification/Chrome.php
index 3a3df26..2f07692 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Notification/Chrome.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Notification/Chrome.php
@@ -96,7 +96,7 @@ public function getImage()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
$json = [];
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Notification/Firefox.php b/src/main/php/Gomoob/Pushwoosh/Model/Notification/Firefox.php
index 6cd72fc..0adc8f2 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Notification/Firefox.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Notification/Firefox.php
@@ -62,7 +62,7 @@ public function getTitle()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
$json = [];
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Notification/Huawei.php b/src/main/php/Gomoob/Pushwoosh/Model/Notification/Huawei.php
index 1628a13..ab5c7af 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Notification/Huawei.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Notification/Huawei.php
@@ -129,7 +129,7 @@ public function isVibration()
return $this->vibration;
}
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
$json = [];
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Notification/IOS.php b/src/main/php/Gomoob/Pushwoosh/Model/Notification/IOS.php
index 5643814..8671867 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Notification/IOS.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Notification/IOS.php
@@ -97,7 +97,7 @@ public function isTrimContent()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
$json = [];
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Notification/Mac.php b/src/main/php/Gomoob/Pushwoosh/Model/Notification/Mac.php
index c5c08a3..3792c94 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Notification/Mac.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Notification/Mac.php
@@ -57,7 +57,7 @@ public function getTtl()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
$json = [];
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Notification/Notification.php b/src/main/php/Gomoob/Pushwoosh/Model/Notification/Notification.php
index 753b68e..968b35f 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Notification/Notification.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Notification/Notification.php
@@ -666,7 +666,7 @@ public function getHuawei()
*
* @return array a PHP which can be passed to the 'json_encode' PHP method.
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
$json = [];
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Notification/Safari.php b/src/main/php/Gomoob/Pushwoosh/Model/Notification/Safari.php
index aa65393..711e754 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Notification/Safari.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Notification/Safari.php
@@ -53,7 +53,7 @@ public function getUrlArgs()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
$json = [];
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Notification/WNS.php b/src/main/php/Gomoob/Pushwoosh/Model/Notification/WNS.php
index 8877230..d2d7d45 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Notification/WNS.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Notification/WNS.php
@@ -72,7 +72,7 @@ public function setType($type)
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
$json = [];
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Notification/WP.php b/src/main/php/Gomoob/Pushwoosh/Model/Notification/WP.php
index 2e4d80b..1d72c45 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Notification/WP.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Notification/WP.php
@@ -67,7 +67,7 @@ public function getType()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
$json = [];
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Request/CreateMessageRequest.php b/src/main/php/Gomoob/Pushwoosh/Model/Request/CreateMessageRequest.php
index d6bebb2..31a7589 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Request/CreateMessageRequest.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Request/CreateMessageRequest.php
@@ -112,7 +112,7 @@ public function isAuthSupported()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
// One of the 'application' or 'applicationsGroup' parameter must have been defined.
if (!isset($this->application) && !isset($this->applicationsGroup)) {
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Request/CreateTargetedMessageRequest.php b/src/main/php/Gomoob/Pushwoosh/Model/Request/CreateTargetedMessageRequest.php
index 4cabce3..235ca8e 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Request/CreateTargetedMessageRequest.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Request/CreateTargetedMessageRequest.php
@@ -315,7 +315,7 @@ public function isIgnoreUserTimezone()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
// The 'auth' parameter must have been set
if (!isset($this->auth)) {
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Request/DeleteMessageRequest.php b/src/main/php/Gomoob/Pushwoosh/Model/Request/DeleteMessageRequest.php
index 69c04dc..9d89bd5 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Request/DeleteMessageRequest.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Request/DeleteMessageRequest.php
@@ -55,7 +55,7 @@ public function isAuthSupported()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
// The 'auth' parameter must have been set
if (!isset($this->auth)) {
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Request/GetNearestZoneRequest.php b/src/main/php/Gomoob/Pushwoosh/Model/Request/GetNearestZoneRequest.php
index 3ffe170..53455ea 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Request/GetNearestZoneRequest.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Request/GetNearestZoneRequest.php
@@ -106,7 +106,7 @@ public function isAuthSupported()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
// The 'application' parameter must have been defined.
if (!isset($this->application)) {
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Request/GetTagsRequest.php b/src/main/php/Gomoob/Pushwoosh/Model/Request/GetTagsRequest.php
index 28ca7b0..46fc74f 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Request/GetTagsRequest.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Request/GetTagsRequest.php
@@ -72,7 +72,7 @@ public function isAuthSupported()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
// The 'application' parameter must have been defined.
if (!isset($this->application)) {
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Request/PushStatRequest.php b/src/main/php/Gomoob/Pushwoosh/Model/Request/PushStatRequest.php
index 176843c..ffb8d33 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Request/PushStatRequest.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Request/PushStatRequest.php
@@ -89,7 +89,7 @@ public function isAuthSupported()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
// The 'application' parameter must have been defined.
if (!isset($this->application)) {
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Request/RegisterDeviceRequest.php b/src/main/php/Gomoob/Pushwoosh/Model/Request/RegisterDeviceRequest.php
index 1edcd20..ede15aa 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Request/RegisterDeviceRequest.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Request/RegisterDeviceRequest.php
@@ -155,7 +155,7 @@ public function isAuthSupported()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
// The 'application' parameter must have been defined.
if (!isset($this->application)) {
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Request/SetBadgeRequest.php b/src/main/php/Gomoob/Pushwoosh/Model/Request/SetBadgeRequest.php
index 6064264..0e4eca7 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Request/SetBadgeRequest.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Request/SetBadgeRequest.php
@@ -89,7 +89,7 @@ public function isAuthSupported()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
// The 'application' parameter must have been defined.
if (!isset($this->application)) {
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Request/SetTagsRequest.php b/src/main/php/Gomoob/Pushwoosh/Model/Request/SetTagsRequest.php
index fc851f7..f2612ec 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Request/SetTagsRequest.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Request/SetTagsRequest.php
@@ -132,7 +132,7 @@ public function isAuthSupported()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
// The 'application' parameter must have been defined.
if (!isset($this->application)) {
diff --git a/src/main/php/Gomoob/Pushwoosh/Model/Request/UnregisterDeviceRequest.php b/src/main/php/Gomoob/Pushwoosh/Model/Request/UnregisterDeviceRequest.php
index f18ebed..2343b77 100644
--- a/src/main/php/Gomoob/Pushwoosh/Model/Request/UnregisterDeviceRequest.php
+++ b/src/main/php/Gomoob/Pushwoosh/Model/Request/UnregisterDeviceRequest.php
@@ -75,7 +75,7 @@ public function isAuthSupported()
/**
* {@inheritdoc}
*/
- public function jsonSerialize()
+ public function jsonSerialize(): mixed
{
// The 'application' parameter must have been defined.
if (!isset($this->application)) {