diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml
index 921c11d..78058b9 100644
--- a/.github/dependabot.yaml
+++ b/.github/dependabot.yaml
@@ -4,4 +4,4 @@ updates:
directory: "/"
schedule:
interval: "weekly"
- open-pull-requests-limit: 10
+ open-pull-requests-limit: 5
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7d5f141..f5ea2b7 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -21,10 +21,13 @@ jobs:
- name: Run composer
uses: php-actions/composer@v5
+ - name: PHP CodeSniffer
+ run: ./vendor/bin/phpcs --runtime-set ignore_warnings_on_exit 1 --standard=PSR12 --exclude=Generic.NamingConventions.UpperCaseConstantName,PSR1.Methods.CamelCapsMethodName,PSR2.Methods.MethodDeclaration ./src
+
- name: PHPUnit Tests
uses: php-actions/phpunit@v3
with:
- version: 9.5
+ version: 10.0
php_version: 8.1
bootstrap: ./vendor/autoload.php
configuration: ./.github/workflows/phpunit.xml
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..d4fbc7e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,59 @@
+# Define the PHP executable and commonly used paths
+PHP := php
+PHPUNIT := ./vendor/bin/phpunit
+RECTOR := ./vendor/bin/rector
+PHPCS := ./vendor/bin/phpcs
+PHPCBF := ./vendor/bin/phpcbf
+PHPCSARGS := --standard=PSR12 --exclude=Generic.NamingConventions.UpperCaseConstantName,PSR1.Methods.CamelCapsMethodName,PSR2.Methods.MethodDeclaration
+
+# Default target
+all: help
+
+# PHPUnit target
+test:
+ @echo "Running PHPUnit tests..."
+ $(PHPUNIT) --configuration phpunit.xml --colors=always
+
+# Rector targets for code refactoring
+rector:
+ @echo "Running Rector refactoring..."
+ $(RECTOR) process src --dry-run --clear-cache --config rector.php
+
+rector-fix:
+ @echo "Applying Rector refactoring..."
+ $(RECTOR) process src --clear-cache --config rector.php
+
+# PHPCS target for linting
+lint:
+ @echo "Running PHP CodeSniffer (PHPCS) for linting..."
+ $(PHPCS) $(PHPCSARGS) src/
+
+
+# PHPCBF target for auto-fixing code style issues
+lint-fix:
+ @echo "Running PHP Code Beautifier and Fixer (PHPCBF) for auto-fixing..."
+ $(PHPCBF) $(PHPCSARGS) src/
+
+# Clean up cache generated by Rector, PHPUnit, and PHPCS
+clean:
+ @echo "Cleaning caches for Rector, PHPUnit, and PHPCS..."
+ rm -rf .rector/cache
+ rm -rf .phpunit.result.cache
+ rm -rf .phpcs.cache
+
+# Run both test and lint targets
+check: test lint
+
+# Help menu
+help:
+ @echo "Available targets:"
+ @echo " test - Run PHPUnit tests with default configuration"
+ @echo " rector - Run Rector in dry-run mode"
+ @echo " rector-fix - Apply Rector refactoring"
+ @echo " lint - Run PHP CodeSniffer (PHPCS) for code style checks"
+ @echo " lint-fix - Auto-fix code style issues with PHP Code Beautifier (PHPCBF)"
+ @echo " clean - Remove cache for Rector, PHPUnit, and PHPCS"
+ @echo " check - Run both tests and linting in dry-run mode"
+
+# Phony targets to prevent issues with files named like targets
+.PHONY: all test rector rector-fix lint lint-fix clean check help
diff --git a/composer.json b/composer.json
index d5f06a6..8d4eef9 100644
--- a/composer.json
+++ b/composer.json
@@ -5,6 +5,7 @@
"keywords": ["bluem", "php", "interface", "wrapper", "emandate", "epayment", "idin"],
"homepage": "https://bluem-development.github.io/bluem-php/",
"license": "GPL-3.0-or-later",
+ "version": "2.3.4.2",
"authors": [{
"name": "Bluem Plugin Support",
"email": "pluginsupport@bluem.nl",
@@ -31,11 +32,11 @@
}
},
"require-dev": {
- "phpunit/phpunit": "^9.5",
+ "phpunit/phpunit": "^10",
"phpspec/prophecy": "~1.0",
"vlucas/phpdotenv": "^5.4",
"rector/rector": "^0.15.10",
- "squizlabs/php_codesniffer": "^3.7",
+ "squizlabs/php_codesniffer": "^3.10",
"magento/magento-coding-standard": "^31.0",
"phpcompatibility/php-compatibility": "^9.3"
},
diff --git a/composer.lock b/composer.lock
index a894af6..63cbdc3 100644
--- a/composer.lock
+++ b/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": "1cd474d4354dafb5533494d852cad5bc",
+ "content-hash": "011c87bd78c2c9262143647643365eee",
"packages": [
{
"name": "selective/xmldsig",
@@ -288,16 +288,16 @@
},
{
"name": "myclabs/deep-copy",
- "version": "1.11.1",
+ "version": "1.12.1",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
- "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c"
+ "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
- "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
+ "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845",
+ "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845",
"shasum": ""
},
"require": {
@@ -305,11 +305,12 @@
},
"conflict": {
"doctrine/collections": "<1.6.8",
- "doctrine/common": "<2.13.3 || >=3,<3.2.2"
+ "doctrine/common": "<2.13.3 || >=3 <3.2.2"
},
"require-dev": {
"doctrine/collections": "^1.6.8",
"doctrine/common": "^2.13.3 || ^3.2.2",
+ "phpspec/prophecy": "^1.10",
"phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
},
"type": "library",
@@ -335,7 +336,7 @@
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
- "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1"
+ "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1"
},
"funding": [
{
@@ -343,20 +344,20 @@
"type": "tidelift"
}
],
- "time": "2023-03-08T13:26:56+00:00"
+ "time": "2024-11-08T17:47:46+00:00"
},
{
"name": "nikic/php-parser",
- "version": "v5.0.2",
+ "version": "v5.3.1",
"source": {
"type": "git",
"url": "https://github.com/nikic/PHP-Parser.git",
- "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13"
+ "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/139676794dc1e9231bf7bcd123cfc0c99182cb13",
- "reference": "139676794dc1e9231bf7bcd123cfc0c99182cb13",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8eea230464783aa9671db8eea6f8c6ac5285794b",
+ "reference": "8eea230464783aa9671db8eea6f8c6ac5285794b",
"shasum": ""
},
"require": {
@@ -367,7 +368,7 @@
},
"require-dev": {
"ircmaxell/php-yacc": "^0.0.7",
- "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0"
+ "phpunit/phpunit": "^9.0"
},
"bin": [
"bin/php-parse"
@@ -399,9 +400,9 @@
],
"support": {
"issues": "https://github.com/nikic/PHP-Parser/issues",
- "source": "https://github.com/nikic/PHP-Parser/tree/v5.0.2"
+ "source": "https://github.com/nikic/PHP-Parser/tree/v5.3.1"
},
- "time": "2024-03-05T20:51:40+00:00"
+ "time": "2024-10-08T18:51:32+00:00"
},
{
"name": "phar-io/manifest",
@@ -1013,35 +1014,35 @@
},
{
"name": "phpunit/php-code-coverage",
- "version": "9.2.31",
+ "version": "10.1.16",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965"
+ "reference": "7e308268858ed6baedc8704a304727d20bc07c77"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/48c34b5d8d983006bd2adc2d0de92963b9155965",
- "reference": "48c34b5d8d983006bd2adc2d0de92963b9155965",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7e308268858ed6baedc8704a304727d20bc07c77",
+ "reference": "7e308268858ed6baedc8704a304727d20bc07c77",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-libxml": "*",
"ext-xmlwriter": "*",
- "nikic/php-parser": "^4.18 || ^5.0",
- "php": ">=7.3",
- "phpunit/php-file-iterator": "^3.0.3",
- "phpunit/php-text-template": "^2.0.2",
- "sebastian/code-unit-reverse-lookup": "^2.0.2",
- "sebastian/complexity": "^2.0",
- "sebastian/environment": "^5.1.2",
- "sebastian/lines-of-code": "^1.0.3",
- "sebastian/version": "^3.0.1",
- "theseer/tokenizer": "^1.2.0"
+ "nikic/php-parser": "^4.19.1 || ^5.1.0",
+ "php": ">=8.1",
+ "phpunit/php-file-iterator": "^4.1.0",
+ "phpunit/php-text-template": "^3.0.1",
+ "sebastian/code-unit-reverse-lookup": "^3.0.0",
+ "sebastian/complexity": "^3.2.0",
+ "sebastian/environment": "^6.1.0",
+ "sebastian/lines-of-code": "^2.0.2",
+ "sebastian/version": "^4.0.1",
+ "theseer/tokenizer": "^1.2.3"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.1"
},
"suggest": {
"ext-pcov": "PHP extension that provides line coverage",
@@ -1050,7 +1051,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "9.2-dev"
+ "dev-main": "10.1.x-dev"
}
},
"autoload": {
@@ -1079,7 +1080,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy",
- "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.31"
+ "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.16"
},
"funding": [
{
@@ -1087,32 +1088,32 @@
"type": "github"
}
],
- "time": "2024-03-02T06:37:42+00:00"
+ "time": "2024-08-22T04:31:57+00:00"
},
{
"name": "phpunit/php-file-iterator",
- "version": "3.0.6",
+ "version": "4.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-file-iterator.git",
- "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf"
+ "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
- "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c",
+ "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0-dev"
+ "dev-main": "4.0-dev"
}
},
"autoload": {
@@ -1139,7 +1140,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-file-iterator/issues",
- "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6"
+ "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy",
+ "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0"
},
"funding": [
{
@@ -1147,28 +1149,28 @@
"type": "github"
}
],
- "time": "2021-12-02T12:48:52+00:00"
+ "time": "2023-08-31T06:24:48+00:00"
},
{
"name": "phpunit/php-invoker",
- "version": "3.1.1",
+ "version": "4.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-invoker.git",
- "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67"
+ "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
- "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7",
+ "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
"ext-pcntl": "*",
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"suggest": {
"ext-pcntl": "*"
@@ -1176,7 +1178,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.1-dev"
+ "dev-main": "4.0-dev"
}
},
"autoload": {
@@ -1202,7 +1204,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-invoker/issues",
- "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1"
+ "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0"
},
"funding": [
{
@@ -1210,32 +1212,32 @@
"type": "github"
}
],
- "time": "2020-09-28T05:58:55+00:00"
+ "time": "2023-02-03T06:56:09+00:00"
},
{
"name": "phpunit/php-text-template",
- "version": "2.0.4",
+ "version": "3.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28"
+ "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
- "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748",
+ "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-main": "3.0-dev"
}
},
"autoload": {
@@ -1261,7 +1263,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-text-template/issues",
- "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4"
+ "security": "https://github.com/sebastianbergmann/php-text-template/security/policy",
+ "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1"
},
"funding": [
{
@@ -1269,32 +1272,32 @@
"type": "github"
}
],
- "time": "2020-10-26T05:33:50+00:00"
+ "time": "2023-08-31T14:07:24+00:00"
},
{
"name": "phpunit/php-timer",
- "version": "5.0.3",
+ "version": "6.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2"
+ "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
- "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d",
+ "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-main": "6.0-dev"
}
},
"autoload": {
@@ -1320,7 +1323,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-timer/issues",
- "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3"
+ "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0"
},
"funding": [
{
@@ -1328,54 +1331,52 @@
"type": "github"
}
],
- "time": "2020-10-26T13:16:10+00:00"
+ "time": "2023-02-03T06:57:52+00:00"
},
{
"name": "phpunit/phpunit",
- "version": "9.6.19",
+ "version": "10.5.38",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
- "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8"
+ "reference": "a86773b9e887a67bc53efa9da9ad6e3f2498c132"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a1a54a473501ef4cdeaae4e06891674114d79db8",
- "reference": "a1a54a473501ef4cdeaae4e06891674114d79db8",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a86773b9e887a67bc53efa9da9ad6e3f2498c132",
+ "reference": "a86773b9e887a67bc53efa9da9ad6e3f2498c132",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "^1.3.1 || ^2",
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-xml": "*",
"ext-xmlwriter": "*",
- "myclabs/deep-copy": "^1.10.1",
- "phar-io/manifest": "^2.0.3",
- "phar-io/version": "^3.0.2",
- "php": ">=7.3",
- "phpunit/php-code-coverage": "^9.2.28",
- "phpunit/php-file-iterator": "^3.0.5",
- "phpunit/php-invoker": "^3.1.1",
- "phpunit/php-text-template": "^2.0.3",
- "phpunit/php-timer": "^5.0.2",
- "sebastian/cli-parser": "^1.0.1",
- "sebastian/code-unit": "^1.0.6",
- "sebastian/comparator": "^4.0.8",
- "sebastian/diff": "^4.0.3",
- "sebastian/environment": "^5.1.3",
- "sebastian/exporter": "^4.0.5",
- "sebastian/global-state": "^5.0.1",
- "sebastian/object-enumerator": "^4.0.3",
- "sebastian/resource-operations": "^3.0.3",
- "sebastian/type": "^3.2",
- "sebastian/version": "^3.0.2"
+ "myclabs/deep-copy": "^1.12.0",
+ "phar-io/manifest": "^2.0.4",
+ "phar-io/version": "^3.2.1",
+ "php": ">=8.1",
+ "phpunit/php-code-coverage": "^10.1.16",
+ "phpunit/php-file-iterator": "^4.1.0",
+ "phpunit/php-invoker": "^4.0.0",
+ "phpunit/php-text-template": "^3.0.1",
+ "phpunit/php-timer": "^6.0.0",
+ "sebastian/cli-parser": "^2.0.1",
+ "sebastian/code-unit": "^2.0.0",
+ "sebastian/comparator": "^5.0.3",
+ "sebastian/diff": "^5.1.1",
+ "sebastian/environment": "^6.1.0",
+ "sebastian/exporter": "^5.1.2",
+ "sebastian/global-state": "^6.0.2",
+ "sebastian/object-enumerator": "^5.0.0",
+ "sebastian/recursion-context": "^5.0.0",
+ "sebastian/type": "^4.0.0",
+ "sebastian/version": "^4.0.1"
},
"suggest": {
- "ext-soap": "To be able to generate mocks based on WSDL files",
- "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage"
+ "ext-soap": "To be able to generate mocks based on WSDL files"
},
"bin": [
"phpunit"
@@ -1383,7 +1384,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "9.6-dev"
+ "dev-main": "10.5-dev"
}
},
"autoload": {
@@ -1415,7 +1416,7 @@
"support": {
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
"security": "https://github.com/sebastianbergmann/phpunit/security/policy",
- "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.19"
+ "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.38"
},
"funding": [
{
@@ -1431,7 +1432,7 @@
"type": "tidelift"
}
],
- "time": "2024-04-05T04:35:58+00:00"
+ "time": "2024-10-28T13:06:21+00:00"
},
{
"name": "rector/rector",
@@ -1496,28 +1497,28 @@
},
{
"name": "sebastian/cli-parser",
- "version": "1.0.2",
+ "version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/cli-parser.git",
- "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b"
+ "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/2b56bea83a09de3ac06bb18b92f068e60cc6f50b",
- "reference": "2b56bea83a09de3ac06bb18b92f068e60cc6f50b",
+ "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084",
+ "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-main": "2.0-dev"
}
},
"autoload": {
@@ -1540,7 +1541,8 @@
"homepage": "https://github.com/sebastianbergmann/cli-parser",
"support": {
"issues": "https://github.com/sebastianbergmann/cli-parser/issues",
- "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.2"
+ "security": "https://github.com/sebastianbergmann/cli-parser/security/policy",
+ "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1"
},
"funding": [
{
@@ -1548,32 +1550,32 @@
"type": "github"
}
],
- "time": "2024-03-02T06:27:43+00:00"
+ "time": "2024-03-02T07:12:49+00:00"
},
{
"name": "sebastian/code-unit",
- "version": "1.0.8",
+ "version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit.git",
- "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120"
+ "reference": "a81fee9eef0b7a76af11d121767abc44c104e503"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120",
- "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503",
+ "reference": "a81fee9eef0b7a76af11d121767abc44c104e503",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-main": "2.0-dev"
}
},
"autoload": {
@@ -1596,7 +1598,7 @@
"homepage": "https://github.com/sebastianbergmann/code-unit",
"support": {
"issues": "https://github.com/sebastianbergmann/code-unit/issues",
- "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8"
+ "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0"
},
"funding": [
{
@@ -1604,32 +1606,32 @@
"type": "github"
}
],
- "time": "2020-10-26T13:08:54+00:00"
+ "time": "2023-02-03T06:58:43+00:00"
},
{
"name": "sebastian/code-unit-reverse-lookup",
- "version": "2.0.3",
+ "version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git",
- "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5"
+ "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
- "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5",
+ "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d",
+ "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-main": "3.0-dev"
}
},
"autoload": {
@@ -1651,7 +1653,7 @@
"homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/",
"support": {
"issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues",
- "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3"
+ "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0"
},
"funding": [
{
@@ -1659,34 +1661,36 @@
"type": "github"
}
],
- "time": "2020-09-28T05:30:19+00:00"
+ "time": "2023-02-03T06:59:15+00:00"
},
{
"name": "sebastian/comparator",
- "version": "4.0.8",
+ "version": "5.0.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "fa0f136dd2334583309d32b62544682ee972b51a"
+ "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a",
- "reference": "fa0f136dd2334583309d32b62544682ee972b51a",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e",
+ "reference": "a18251eb0b7a2dcd2f7aa3d6078b18545ef0558e",
"shasum": ""
},
"require": {
- "php": ">=7.3",
- "sebastian/diff": "^4.0",
- "sebastian/exporter": "^4.0"
+ "ext-dom": "*",
+ "ext-mbstring": "*",
+ "php": ">=8.1",
+ "sebastian/diff": "^5.0",
+ "sebastian/exporter": "^5.0"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.5"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-main": "5.0-dev"
}
},
"autoload": {
@@ -1725,7 +1729,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/comparator/issues",
- "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8"
+ "security": "https://github.com/sebastianbergmann/comparator/security/policy",
+ "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.3"
},
"funding": [
{
@@ -1733,33 +1738,33 @@
"type": "github"
}
],
- "time": "2022-09-14T12:41:17+00:00"
+ "time": "2024-10-18T14:56:07+00:00"
},
{
"name": "sebastian/complexity",
- "version": "2.0.3",
+ "version": "3.2.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/complexity.git",
- "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a"
+ "reference": "68ff824baeae169ec9f2137158ee529584553799"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/25f207c40d62b8b7aa32f5ab026c53561964053a",
- "reference": "25f207c40d62b8b7aa32f5ab026c53561964053a",
+ "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799",
+ "reference": "68ff824baeae169ec9f2137158ee529584553799",
"shasum": ""
},
"require": {
"nikic/php-parser": "^4.18 || ^5.0",
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-main": "3.2-dev"
}
},
"autoload": {
@@ -1782,7 +1787,8 @@
"homepage": "https://github.com/sebastianbergmann/complexity",
"support": {
"issues": "https://github.com/sebastianbergmann/complexity/issues",
- "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.3"
+ "security": "https://github.com/sebastianbergmann/complexity/security/policy",
+ "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0"
},
"funding": [
{
@@ -1790,33 +1796,33 @@
"type": "github"
}
],
- "time": "2023-12-22T06:19:30+00:00"
+ "time": "2023-12-21T08:37:17+00:00"
},
{
"name": "sebastian/diff",
- "version": "4.0.6",
+ "version": "5.1.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc"
+ "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ba01945089c3a293b01ba9badc29ad55b106b0bc",
- "reference": "ba01945089c3a293b01ba9badc29ad55b106b0bc",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e",
+ "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3",
- "symfony/process": "^4.2 || ^5"
+ "phpunit/phpunit": "^10.0",
+ "symfony/process": "^6.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-main": "5.1-dev"
}
},
"autoload": {
@@ -1848,7 +1854,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/diff/issues",
- "source": "https://github.com/sebastianbergmann/diff/tree/4.0.6"
+ "security": "https://github.com/sebastianbergmann/diff/security/policy",
+ "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1"
},
"funding": [
{
@@ -1856,27 +1863,27 @@
"type": "github"
}
],
- "time": "2024-03-02T06:30:58+00:00"
+ "time": "2024-03-02T07:15:17+00:00"
},
{
"name": "sebastian/environment",
- "version": "5.1.5",
+ "version": "6.1.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed"
+ "reference": "8074dbcd93529b357029f5cc5058fd3e43666984"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
- "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984",
+ "reference": "8074dbcd93529b357029f5cc5058fd3e43666984",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"suggest": {
"ext-posix": "*"
@@ -1884,7 +1891,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.1-dev"
+ "dev-main": "6.1-dev"
}
},
"autoload": {
@@ -1903,7 +1910,7 @@
}
],
"description": "Provides functionality to handle HHVM/PHP environments",
- "homepage": "http://www.github.com/sebastianbergmann/environment",
+ "homepage": "https://github.com/sebastianbergmann/environment",
"keywords": [
"Xdebug",
"environment",
@@ -1911,7 +1918,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/environment/issues",
- "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5"
+ "security": "https://github.com/sebastianbergmann/environment/security/policy",
+ "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0"
},
"funding": [
{
@@ -1919,34 +1927,34 @@
"type": "github"
}
],
- "time": "2023-02-03T06:03:51+00:00"
+ "time": "2024-03-23T08:47:14+00:00"
},
{
"name": "sebastian/exporter",
- "version": "4.0.6",
+ "version": "5.1.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72"
+ "reference": "955288482d97c19a372d3f31006ab3f37da47adf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72",
- "reference": "78c00df8f170e02473b682df15bfcdacc3d32d72",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/955288482d97c19a372d3f31006ab3f37da47adf",
+ "reference": "955288482d97c19a372d3f31006ab3f37da47adf",
"shasum": ""
},
"require": {
- "php": ">=7.3",
- "sebastian/recursion-context": "^4.0"
+ "ext-mbstring": "*",
+ "php": ">=8.1",
+ "sebastian/recursion-context": "^5.0"
},
"require-dev": {
- "ext-mbstring": "*",
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-main": "5.1-dev"
}
},
"autoload": {
@@ -1988,7 +1996,8 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues",
- "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.6"
+ "security": "https://github.com/sebastianbergmann/exporter/security/policy",
+ "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.2"
},
"funding": [
{
@@ -1996,38 +2005,35 @@
"type": "github"
}
],
- "time": "2024-03-02T06:33:00+00:00"
+ "time": "2024-03-02T07:17:12+00:00"
},
{
"name": "sebastian/global-state",
- "version": "5.0.7",
+ "version": "6.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/global-state.git",
- "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9"
+ "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9",
- "reference": "bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9",
+ "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9",
+ "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9",
"shasum": ""
},
"require": {
- "php": ">=7.3",
- "sebastian/object-reflector": "^2.0",
- "sebastian/recursion-context": "^4.0"
+ "php": ">=8.1",
+ "sebastian/object-reflector": "^3.0",
+ "sebastian/recursion-context": "^5.0"
},
"require-dev": {
"ext-dom": "*",
- "phpunit/phpunit": "^9.3"
- },
- "suggest": {
- "ext-uopz": "*"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "5.0-dev"
+ "dev-main": "6.0-dev"
}
},
"autoload": {
@@ -2046,13 +2052,14 @@
}
],
"description": "Snapshotting of global state",
- "homepage": "http://www.github.com/sebastianbergmann/global-state",
+ "homepage": "https://www.github.com/sebastianbergmann/global-state",
"keywords": [
"global state"
],
"support": {
"issues": "https://github.com/sebastianbergmann/global-state/issues",
- "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.7"
+ "security": "https://github.com/sebastianbergmann/global-state/security/policy",
+ "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2"
},
"funding": [
{
@@ -2060,33 +2067,33 @@
"type": "github"
}
],
- "time": "2024-03-02T06:35:11+00:00"
+ "time": "2024-03-02T07:19:19+00:00"
},
{
"name": "sebastian/lines-of-code",
- "version": "1.0.4",
+ "version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/lines-of-code.git",
- "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5"
+ "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/e1e4a170560925c26d424b6a03aed157e7dcc5c5",
- "reference": "e1e4a170560925c26d424b6a03aed157e7dcc5c5",
+ "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0",
+ "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0",
"shasum": ""
},
"require": {
"nikic/php-parser": "^4.18 || ^5.0",
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0-dev"
+ "dev-main": "2.0-dev"
}
},
"autoload": {
@@ -2109,7 +2116,8 @@
"homepage": "https://github.com/sebastianbergmann/lines-of-code",
"support": {
"issues": "https://github.com/sebastianbergmann/lines-of-code/issues",
- "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.4"
+ "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy",
+ "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2"
},
"funding": [
{
@@ -2117,34 +2125,34 @@
"type": "github"
}
],
- "time": "2023-12-22T06:20:34+00:00"
+ "time": "2023-12-21T08:38:20+00:00"
},
{
"name": "sebastian/object-enumerator",
- "version": "4.0.4",
+ "version": "5.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-enumerator.git",
- "reference": "5c9eeac41b290a3712d88851518825ad78f45c71"
+ "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71",
- "reference": "5c9eeac41b290a3712d88851518825ad78f45c71",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906",
+ "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906",
"shasum": ""
},
"require": {
- "php": ">=7.3",
- "sebastian/object-reflector": "^2.0",
- "sebastian/recursion-context": "^4.0"
+ "php": ">=8.1",
+ "sebastian/object-reflector": "^3.0",
+ "sebastian/recursion-context": "^5.0"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-main": "5.0-dev"
}
},
"autoload": {
@@ -2166,7 +2174,7 @@
"homepage": "https://github.com/sebastianbergmann/object-enumerator/",
"support": {
"issues": "https://github.com/sebastianbergmann/object-enumerator/issues",
- "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4"
+ "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0"
},
"funding": [
{
@@ -2174,32 +2182,32 @@
"type": "github"
}
],
- "time": "2020-10-26T13:12:34+00:00"
+ "time": "2023-02-03T07:08:32+00:00"
},
{
"name": "sebastian/object-reflector",
- "version": "2.0.4",
+ "version": "3.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/object-reflector.git",
- "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7"
+ "reference": "24ed13d98130f0e7122df55d06c5c4942a577957"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
- "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7",
+ "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957",
+ "reference": "24ed13d98130f0e7122df55d06c5c4942a577957",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0-dev"
+ "dev-main": "3.0-dev"
}
},
"autoload": {
@@ -2221,7 +2229,7 @@
"homepage": "https://github.com/sebastianbergmann/object-reflector/",
"support": {
"issues": "https://github.com/sebastianbergmann/object-reflector/issues",
- "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4"
+ "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0"
},
"funding": [
{
@@ -2229,32 +2237,32 @@
"type": "github"
}
],
- "time": "2020-10-26T13:14:26+00:00"
+ "time": "2023-02-03T07:06:18+00:00"
},
{
"name": "sebastian/recursion-context",
- "version": "4.0.5",
+ "version": "5.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/recursion-context.git",
- "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1"
+ "reference": "05909fb5bc7df4c52992396d0116aed689f93712"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
- "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/05909fb5bc7df4c52992396d0116aed689f93712",
+ "reference": "05909fb5bc7df4c52992396d0116aed689f93712",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.3"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "4.0-dev"
+ "dev-main": "5.0-dev"
}
},
"autoload": {
@@ -2284,7 +2292,7 @@
"homepage": "https://github.com/sebastianbergmann/recursion-context",
"support": {
"issues": "https://github.com/sebastianbergmann/recursion-context/issues",
- "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5"
+ "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.0"
},
"funding": [
{
@@ -2292,86 +2300,32 @@
"type": "github"
}
],
- "time": "2023-02-03T06:07:39+00:00"
- },
- {
- "name": "sebastian/resource-operations",
- "version": "3.0.4",
- "source": {
- "type": "git",
- "url": "https://github.com/sebastianbergmann/resource-operations.git",
- "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e",
- "reference": "05d5692a7993ecccd56a03e40cd7e5b09b1d404e",
- "shasum": ""
- },
- "require": {
- "php": ">=7.3"
- },
- "require-dev": {
- "phpunit/phpunit": "^9.0"
- },
- "type": "library",
- "extra": {
- "branch-alias": {
- "dev-main": "3.0-dev"
- }
- },
- "autoload": {
- "classmap": [
- "src/"
- ]
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "BSD-3-Clause"
- ],
- "authors": [
- {
- "name": "Sebastian Bergmann",
- "email": "sebastian@phpunit.de"
- }
- ],
- "description": "Provides a list of PHP built-in functions that operate on resources",
- "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
- "support": {
- "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.4"
- },
- "funding": [
- {
- "url": "https://github.com/sebastianbergmann",
- "type": "github"
- }
- ],
- "time": "2024-03-14T16:00:52+00:00"
+ "time": "2023-02-03T07:05:40+00:00"
},
{
"name": "sebastian/type",
- "version": "3.2.1",
+ "version": "4.0.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/type.git",
- "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7"
+ "reference": "462699a16464c3944eefc02ebdd77882bd3925bf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
- "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7",
+ "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf",
+ "reference": "462699a16464c3944eefc02ebdd77882bd3925bf",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"require-dev": {
- "phpunit/phpunit": "^9.5"
+ "phpunit/phpunit": "^10.0"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.2-dev"
+ "dev-main": "4.0-dev"
}
},
"autoload": {
@@ -2394,7 +2348,7 @@
"homepage": "https://github.com/sebastianbergmann/type",
"support": {
"issues": "https://github.com/sebastianbergmann/type/issues",
- "source": "https://github.com/sebastianbergmann/type/tree/3.2.1"
+ "source": "https://github.com/sebastianbergmann/type/tree/4.0.0"
},
"funding": [
{
@@ -2402,29 +2356,29 @@
"type": "github"
}
],
- "time": "2023-02-03T06:13:03+00:00"
+ "time": "2023-02-03T07:10:45+00:00"
},
{
"name": "sebastian/version",
- "version": "3.0.2",
+ "version": "4.0.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
- "reference": "c6c1022351a901512170118436c764e473f6de8c"
+ "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c",
- "reference": "c6c1022351a901512170118436c764e473f6de8c",
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17",
+ "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17",
"shasum": ""
},
"require": {
- "php": ">=7.3"
+ "php": ">=8.1"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.0-dev"
+ "dev-main": "4.0-dev"
}
},
"autoload": {
@@ -2447,7 +2401,7 @@
"homepage": "https://github.com/sebastianbergmann/version",
"support": {
"issues": "https://github.com/sebastianbergmann/version/issues",
- "source": "https://github.com/sebastianbergmann/version/tree/3.0.2"
+ "source": "https://github.com/sebastianbergmann/version/tree/4.0.1"
},
"funding": [
{
@@ -2455,20 +2409,20 @@
"type": "github"
}
],
- "time": "2020-09-28T06:39:44+00:00"
+ "time": "2023-02-07T11:34:05+00:00"
},
{
"name": "squizlabs/php_codesniffer",
- "version": "3.9.1",
+ "version": "3.10.3",
"source": {
"type": "git",
"url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git",
- "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909"
+ "reference": "62d32998e820bddc40f99f8251958aed187a5c9c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/267a4405fff1d9c847134db3a3c92f1ab7f77909",
- "reference": "267a4405fff1d9c847134db3a3c92f1ab7f77909",
+ "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/62d32998e820bddc40f99f8251958aed187a5c9c",
+ "reference": "62d32998e820bddc40f99f8251958aed187a5c9c",
"shasum": ""
},
"require": {
@@ -2535,7 +2489,7 @@
"type": "open_collective"
}
],
- "time": "2024-03-31T21:03:09+00:00"
+ "time": "2024-09-18T10:38:58+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -3049,7 +3003,7 @@
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
- "php": ">=8.1",
+ "php": ">=8.0",
"ext-dom": "*",
"ext-libxml": "*",
"ext-simplexml": "*",
diff --git a/phpcs.xml b/phpcs.xml
new file mode 100755
index 0000000..cee5f74
--- /dev/null
+++ b/phpcs.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Bluem.php b/src/Bluem.php
index 6288ab2..13fc700 100644
--- a/src/Bluem.php
+++ b/src/Bluem.php
@@ -79,7 +79,7 @@ class Bluem
*/
public function __construct(mixed $rawConfig)
{
- if ($rawConfig ===null) {
+ if ($rawConfig === null) {
throw new InvalidBluemConfigurationException('No configuration given');
}
@@ -97,7 +97,7 @@ public function __construct(mixed $rawConfig)
public function setConfig(string $key, $value): bool
{
- if (! isset($this->configuration->$key)) {
+ if (!isset($this->configuration->$key)) {
throw new RuntimeException("Key '$key' does not exist in configuration");
}
@@ -171,9 +171,9 @@ public function CreateMandateRequest(
$customer_id,
$order_id,
$mandate_id,
- ( $this->configuration->environment === "test" &&
- $this->configuration->expectedReturnStatus !== null ?
- $this->configuration->expectedReturnStatus : "" )
+ ($this->configuration->environment === "test" &&
+ $this->configuration->expectedReturnStatus !== null ?
+ $this->configuration->expectedReturnStatus : "")
);
}
@@ -206,10 +206,11 @@ public function CreateMandateID(string $order_id, string $customer_id): string
public function PerformRequest(BluemRequestInterface $transaction_request): BluemResponseInterface
{
$validator = new BluemXMLValidator();
- if (! $validator->validate(
- $transaction_request->RequestContext(),
- $transaction_request->XmlString()
- )
+ if (
+ !$validator->validate(
+ $transaction_request->RequestContext(),
+ $transaction_request->XmlString()
+ )
) {
return new ErrorBluemResponse(
"Error: Request is not formed correctly. More details: " .
@@ -223,7 +224,11 @@ public function PerformRequest(BluemRequestInterface $transaction_request): Blue
$now = new Now('UTC');
// set timezone to UTC to let the transaction xttrs timestamp work; 8-9-2021
- $xttrs_filename = $transaction_request->transaction_code . "-{$this->configuration->senderID}-BSP1-" . $now->format('YmdHis') . "000.xml";
+ $xttrs_filename = sprintf(
+ "%s-{$this->configuration->senderID}-BSP1-%s000.xml",
+ $transaction_request->transaction_code,
+ $now->format('YmdHis')
+ );
// conform Rfc1123 standard in GMT time
// Since v2.0.5 : use preset format instead of
@@ -271,39 +276,46 @@ public function PerformRequest(BluemRequestInterface $transaction_request): Blue
curl_close($curl);
+ if (empty($response_status)) {
+ return new ErrorBluemResponse("Error: Empty response status returned");
+ }
+
switch ($response_status) {
case 200:
- {
if (empty($response)) {
return new ErrorBluemResponse("Error: Empty response returned");
}
try {
- $response = $this->fabricateResponseObject($transaction_request->transaction_code, $response);
+ $response = $this->fabricateResponseObject(
+ $transaction_request->transaction_code,
+ $response
+ );
} catch (Throwable $th) {
- return new ErrorBluemResponse("Error: Could not create Bluem Response object. More details: " . $th->getMessage());
+ return new ErrorBluemResponse(
+ "Error: Could not create Bluem Response object. More details: " .
+ $th->getMessage()
+ );
}
if ($array_data['@attributes']['type'] === "ErrorResponse") {
- $errorMessage = match ((string) $transaction_request->transaction_code) {
- 'SRX', 'SUD', 'TRX', 'TRS' => (string) $response->EMandateErrorResponse->Error->ErrorMessage,
- 'PSU', 'PSX', 'PTS', 'PTX' => (string) $response->PaymentErrorResponse->Error->ErrorMessage,
- 'ITS', 'ITX', 'ISU', 'ISX' => (string) $response->IdentityErrorResponse->Error->ErrorMessage,
- 'INS', 'INX' => (string) $response->IBANCheckErrorResponse->Error->ErrorMessage,
+ $errorMessage = match ((string)$transaction_request->transaction_code) {
+ 'SRX', 'SUD', 'TRX', 'TRS' => (string)$response->EMandateErrorResponse->Error->ErrorMessage,
+ 'PSU', 'PSX', 'PTS', 'PTX' => (string)$response->PaymentErrorResponse->Error->ErrorMessage,
+ 'ITS', 'ITX', 'ISU', 'ISX' => (string)$response->IdentityErrorResponse->Error->ErrorMessage,
+ 'INS', 'INX' => (string)$response->IBANCheckErrorResponse->Error->ErrorMessage,
default => throw new RuntimeException("Invalid transaction type requested"),
};
// @todo: move into a separate function
- return new ErrorBluemResponse("Error: " . ( $errorMessage ));
+ return new ErrorBluemResponse("Error: " . ($errorMessage));
}
- if (! $response->Status()) {
- return new ErrorBluemResponse("Error: " . ( $response->Error->ErrorMessage ));
+ if (!$response->Status()) {
+ return new ErrorBluemResponse("Error: " . ($response->Error->ErrorMessage));
}
return $response;
-
- }
case 400:
return new ErrorBluemResponse('Your request was not formed correctly.');
case 401:
@@ -314,7 +326,7 @@ public function PerformRequest(BluemRequestInterface $transaction_request): Blue
return new ErrorBluemResponse('Unexpected / erroneous response (code ' . $response_status . ')');
}
} catch (Throwable $th) {
- return new ErrorBluemResponse('HTTP Request Error'. $th->getMessage());
+ return new ErrorBluemResponse('HTTP Request Error' . $th->getMessage());
// @todo improve request return exceptions; add our own exception type
}
}
@@ -359,9 +371,9 @@ public function MandateStatus($mandateID, $entranceCode): BluemResponseInterface
$this->configuration,
$mandateID,
$entranceCode,
- ( $this->configuration->environment === BLUEM_ENVIRONMENT_TESTING &&
- $this->configuration->expectedReturnStatus !== null ?
- $this->configuration->expectedReturnStatus : "" )
+ ($this->configuration->environment === BLUEM_ENVIRONMENT_TESTING &&
+ $this->configuration->expectedReturnStatus !== null ?
+ $this->configuration->expectedReturnStatus : "")
);
return $this->PerformRequest($r);
@@ -407,7 +419,7 @@ public function Payment(
$amount,
$dueDateTime,
$currency,
- $entranceCode ?? $this->CreateEntranceCode()
+ $entranceCode ?? $this->CreateEntranceCode()
);
} catch (Exception $e) {
throw new RuntimeException("Could not create request: " . $e->getMessage(), $e->getCode(), $e);
@@ -468,9 +480,9 @@ public function CreatePaymentRequest(
$currency,
$this->CreatePaymentTransactionID($debtorReference),
$entranceCode,
- ( $this->configuration->environment === BLUEM_ENVIRONMENT_TESTING &&
- $this->configuration->expectedReturnStatus !== null ?
- $this->configuration->expectedReturnStatus : "" ),
+ ($this->configuration->environment === BLUEM_ENVIRONMENT_TESTING &&
+ $this->configuration->expectedReturnStatus !== null ?
+ $this->configuration->expectedReturnStatus : ""),
$debtorReturnURL,
$paymentReference
);
@@ -488,6 +500,7 @@ public function CreatePaymentTransactionID(string $debtorReference): string
// @todo: Create Identity shorthand function
+
/**
* Retrieve the status of a payment request, based on transactionID and Entrance Code
*
@@ -496,14 +509,16 @@ public function CreatePaymentTransactionID(string $debtorReference): string
*
* @throws Exception
*/
- public function PaymentStatus($transactionID, $entranceCode): ErrorBluemResponse|IBANNameCheckBluemResponse|IdentityStatusBluemResponse|IdentityTransactionBluemResponse|MandateStatusBluemResponse|MandateTransactionBluemResponse|PaymentStatusBluemResponse|PaymentTransactionBluemResponse
- {
+ public function PaymentStatus(
+ $transactionID,
+ $entranceCode
+ ): ErrorBluemResponse|IBANNameCheckBluemResponse|IdentityStatusBluemResponse|IdentityTransactionBluemResponse|MandateStatusBluemResponse|MandateTransactionBluemResponse|PaymentStatusBluemResponse|PaymentTransactionBluemResponse {
$r = new PaymentStatusBluemRequest(
$this->configuration,
$transactionID,
- ( $this->configuration->environment === BLUEM_ENVIRONMENT_TESTING &&
- $this->configuration->expectedReturnStatus !== null ?
- $this->configuration->expectedReturnStatus : "" ),
+ $this->configuration->environment === BLUEM_ENVIRONMENT_TESTING &&
+ $this->configuration->expectedReturnStatus !== null ?
+ $this->configuration->expectedReturnStatus : "",
$entranceCode
);
@@ -534,7 +549,7 @@ public function CreateIdentityRequest(
$this->configuration,
$entranceCode,
$this->configuration->environment === BLUEM_ENVIRONMENT_TESTING &&
- $this->configuration->expectedReturnStatus !== null ?
+ $this->configuration->expectedReturnStatus !== null ?
$this->configuration->expectedReturnStatus : "",
$requestCategory,
$description,
@@ -556,9 +571,9 @@ public function IdentityStatus($transactionID, $entranceCode): ErrorBluemRespons
$r = new IdentityStatusBluemRequest(
$this->configuration,
$entranceCode,
- ( $this->configuration->environment === BLUEM_ENVIRONMENT_TESTING &&
- $this->configuration->expectedReturnStatus !== null ?
- $this->configuration->expectedReturnStatus : "" ),
+ ($this->configuration->environment === BLUEM_ENVIRONMENT_TESTING &&
+ $this->configuration->expectedReturnStatus !== null ?
+ $this->configuration->expectedReturnStatus : ""),
$transactionID
);
@@ -634,8 +649,11 @@ public function GetIdentityRequestTypes(): array
* @throws HTTP_Request2_LogicException
* @throws Exception
*/
- public function IBANNameCheck(string $iban, string $name, string $debtorReference = ""): ErrorBluemResponse|IBANNameCheckBluemResponse|IdentityStatusBluemResponse|IdentityTransactionBluemResponse|MandateStatusBluemResponse|MandateTransactionBluemResponse|PaymentStatusBluemResponse|PaymentTransactionBluemResponse
- {
+ public function IBANNameCheck(
+ string $iban,
+ string $name,
+ string $debtorReference = ""
+ ): ErrorBluemResponse|IBANNameCheckBluemResponse|IdentityStatusBluemResponse|IdentityTransactionBluemResponse|MandateStatusBluemResponse|MandateTransactionBluemResponse|PaymentStatusBluemResponse|PaymentTransactionBluemResponse {
$r = $this->CreateIBANNameCheckRequest($iban, $name, $debtorReference);
return $this->PerformRequest($r);
@@ -651,8 +669,11 @@ public function IBANNameCheck(string $iban, string $name, string $debtorReferenc
*
* @throws Exception
*/
- public function CreateIBANNameCheckRequest(string $iban, string $name, string $debtorReference = ""): IBANBluemRequest
- {
+ public function CreateIBANNameCheckRequest(
+ string $iban,
+ string $name,
+ string $debtorReference = ""
+ ): IBANBluemRequest {
$entranceCode = $this->CreateEntranceCode();
return new IBANBluemRequest(
@@ -697,7 +718,7 @@ public function _retrieveContext($context): BluemContextInterface
$context = new IdentityContext();
break;
default:
- $contexts = [ "Mandates", "Payments", "Identity" ];
+ $contexts = ["Mandates", "Payments", "Identity"];
throw new RuntimeException(
"Invalid Context requested, should be
one of the following: " .
diff --git a/src/Contexts/BluemContext.php b/src/Contexts/BluemContext.php
index 77d85da..d8806e7 100644
--- a/src/Contexts/BluemContext.php
+++ b/src/Contexts/BluemContext.php
@@ -1,4 +1,5 @@
*
@@ -12,7 +13,6 @@
abstract class BluemContext implements BluemContextInterface
{
-
public function __construct(public array $BICs = [])
{
}
diff --git a/src/Contexts/IBANCheckContext.php b/src/Contexts/IBANCheckContext.php
index e0731cb..ce995e4 100644
--- a/src/Contexts/IBANCheckContext.php
+++ b/src/Contexts/IBANCheckContext.php
@@ -1,4 +1,5 @@
*
diff --git a/src/Contexts/IdentityContext.php b/src/Contexts/IdentityContext.php
index 06209e1..df40afa 100644
--- a/src/Contexts/IdentityContext.php
+++ b/src/Contexts/IdentityContext.php
@@ -1,4 +1,5 @@
*
@@ -6,7 +7,6 @@
* with this source code in the file LICENSE.
*/
-
namespace Bluem\BluemPHP\Contexts;
use Bluem\BluemPHP\Helpers\BIC;
@@ -57,7 +57,7 @@ public function addPaymentMethodDetails(array $details = []): void
{
$validationErrors = $this->validateDetails($details);
if ($validationErrors !== []) {
- throw new RuntimeException('Invalid details given: '. implode(', ', $validationErrors));
+ throw new RuntimeException('Invalid details given: ' . implode(', ', $validationErrors));
}
$this->paymentMethodDetails = $details;
diff --git a/src/Contexts/MandatesContext.php b/src/Contexts/MandatesContext.php
index 597c156..d0c45a4 100644
--- a/src/Contexts/MandatesContext.php
+++ b/src/Contexts/MandatesContext.php
@@ -1,4 +1,5 @@
*
@@ -77,7 +78,7 @@ public function addPaymentMethodDetails(array $details = []): void
{
$validationErrors = $this->validateDetails($details);
if ($validationErrors !== []) {
- throw new RuntimeException('Invalid details given: '. implode(', ', $validationErrors));
+ throw new RuntimeException('Invalid details given: ' . implode(', ', $validationErrors));
}
$this->paymentMethodDetails = $details;
diff --git a/src/Contexts/PaymentsContext.php b/src/Contexts/PaymentsContext.php
index b7d2d12..44bd2bc 100644
--- a/src/Contexts/PaymentsContext.php
+++ b/src/Contexts/PaymentsContext.php
@@ -1,4 +1,5 @@
*
@@ -6,7 +7,6 @@
* with this source code in the file LICENSE.
*/
-
namespace Bluem\BluemPHP\Contexts;
use Bluem\BluemPHP\Helpers\BIC;
@@ -69,7 +69,7 @@ public function addPaymentMethodDetails(array $details = []): void
{
$validationErrors = $this->validateDetails();
if ($validationErrors !== []) {
- throw new RuntimeException('Invalid details given: '. implode(', ', $validationErrors));
+ throw new RuntimeException('Invalid details given: ' . implode(', ', $validationErrors));
}
$this->paymentMethodDetails = $details;
diff --git a/src/Exceptions/InvalidBluemConfigurationException.php b/src/Exceptions/InvalidBluemConfigurationException.php
index 519d5fd..88f12c3 100644
--- a/src/Exceptions/InvalidBluemConfigurationException.php
+++ b/src/Exceptions/InvalidBluemConfigurationException.php
@@ -1,4 +1,5 @@
*
@@ -6,12 +7,10 @@
* with this source code in the file LICENSE.
*/
-
namespace Bluem\BluemPHP\Exceptions;
use Exception;
class InvalidBluemConfigurationException extends Exception
{
-
}
diff --git a/src/Exceptions/InvalidBluemRequestException.php b/src/Exceptions/InvalidBluemRequestException.php
index 81d6689..acf1924 100644
--- a/src/Exceptions/InvalidBluemRequestException.php
+++ b/src/Exceptions/InvalidBluemRequestException.php
@@ -1,4 +1,5 @@
*
@@ -6,12 +7,10 @@
* with this source code in the file LICENSE.
*/
-
namespace Bluem\BluemPHP\Exceptions;
use Exception;
class InvalidBluemRequestException extends Exception
{
-
}
diff --git a/src/Exceptions/InvalidContextException.php b/src/Exceptions/InvalidContextException.php
index d749460..bd6a131 100644
--- a/src/Exceptions/InvalidContextException.php
+++ b/src/Exceptions/InvalidContextException.php
@@ -1,4 +1,5 @@
*
@@ -6,7 +7,6 @@
* with this source code in the file LICENSE.
*/
-
namespace Bluem\BluemPHP\Exceptions;
use Exception;
diff --git a/src/Extensions/IPAPI.php b/src/Extensions/IPAPI.php
index c5eb7af..e8071a6 100644
--- a/src/Extensions/IPAPI.php
+++ b/src/Extensions/IPAPI.php
@@ -1,4 +1,5 @@
*
@@ -45,7 +46,8 @@ public function CheckIsNetherlands(string $ip = ""): bool
$result = $this->QueryIP($ip);
// if we encountered an error, return true for now
- if (isset($result['success'])
+ if (
+ isset($result['success'])
&& $result['success'] === false
) {
return true;
diff --git a/src/Helpers/BIC.php b/src/Helpers/BIC.php
index c5ea997..ecbdbaa 100644
--- a/src/Helpers/BIC.php
+++ b/src/Helpers/BIC.php
@@ -1,4 +1,5 @@
*
diff --git a/src/Helpers/BluemConfiguration.php b/src/Helpers/BluemConfiguration.php
index 3b85e13..b25f965 100644
--- a/src/Helpers/BluemConfiguration.php
+++ b/src/Helpers/BluemConfiguration.php
@@ -1,4 +1,5 @@
*
@@ -6,7 +7,6 @@
* with this source code in the file LICENSE.
*/
-
namespace Bluem\BluemPHP\Helpers;
use Bluem\BluemPHP\Exceptions\InvalidBluemConfigurationException;
@@ -66,7 +66,9 @@ public function __construct(object|array $raw)
$validated = $this->validator->validate($raw);
if ($validated === false) {
- throw new InvalidBluemConfigurationException('Bluem Configuration is not valid: ' . $this->errorsAsString());
+ throw new InvalidBluemConfigurationException(
+ 'Bluem Configuration is not valid: ' . $this->errorsAsString()
+ );
}
$this->environment = $validated->environment ?? self::TESTING_ENVIRONMENT;
@@ -120,7 +122,7 @@ private function _assumeBrandID(string $service, string $brandID): string
}
$prefix = str_replace($available_services, '', $brandID);
- return $prefix.ucfirst($service);
+ return $prefix . ucfirst($service);
}
/**
diff --git a/src/Helpers/BluemCurrency.php b/src/Helpers/BluemCurrency.php
index 0c1228b..dc85710 100644
--- a/src/Helpers/BluemCurrency.php
+++ b/src/Helpers/BluemCurrency.php
@@ -1,4 +1,5 @@
*
@@ -6,7 +7,6 @@
* with this source code in the file LICENSE.
*/
-
namespace Bluem\BluemPHP\Helpers;
use RuntimeException;
@@ -14,7 +14,6 @@
class BluemCurrency implements Stringable
{
-
private const EURO_CURRENCY = 'EUR';
private const US_DOLLAR_CURRENCY = 'USD';
diff --git a/src/Helpers/BluemIdentityCategoryList.php b/src/Helpers/BluemIdentityCategoryList.php
index 5de1dc1..2d8f574 100644
--- a/src/Helpers/BluemIdentityCategoryList.php
+++ b/src/Helpers/BluemIdentityCategoryList.php
@@ -1,4 +1,5 @@
*
@@ -6,12 +7,10 @@
* with this source code in the file LICENSE.
*/
-
namespace Bluem\BluemPHP\Helpers;
class BluemIdentityCategoryList
{
-
/**
* @var string[] $categories
*/
diff --git a/src/Helpers/BluemMaxAmount.php b/src/Helpers/BluemMaxAmount.php
index b334551..79d660b 100644
--- a/src/Helpers/BluemMaxAmount.php
+++ b/src/Helpers/BluemMaxAmount.php
@@ -1,4 +1,5 @@
*
@@ -6,12 +7,10 @@
* with this source code in the file LICENSE.
*/
-
namespace Bluem\BluemPHP\Helpers;
class BluemMaxAmount implements \Stringable
{
-
public BluemCurrency $currency;
public float $amount;
@@ -23,7 +22,6 @@ public function __construct(
$this->amount = $amount;
try {
-
$this->currency = new BluemCurrency($currencyCode);
} catch (\Exception $e) {
$this->currency = new BluemCurrency();
diff --git a/src/Helpers/Now.php b/src/Helpers/Now.php
index e9f9228..5a26a6f 100644
--- a/src/Helpers/Now.php
+++ b/src/Helpers/Now.php
@@ -54,7 +54,7 @@ public function addDay(int $days): static
$this->dateTime = $this->dateTime->add(new DateInterval("P{$days}D"));
return $this;
}
-
+
/**
* @throws Exception
*/
diff --git a/src/Interfaces/BluemContextInterface.php b/src/Interfaces/BluemContextInterface.php
index 37e69c0..adf7150 100644
--- a/src/Interfaces/BluemContextInterface.php
+++ b/src/Interfaces/BluemContextInterface.php
@@ -1,4 +1,5 @@
*
@@ -6,7 +7,6 @@
* with this source code in the file LICENSE.
*/
-
namespace Bluem\BluemPHP\Interfaces;
interface BluemContextInterface
diff --git a/src/Interfaces/BluemRequestInterface.php b/src/Interfaces/BluemRequestInterface.php
index cdd8937..c6d34e6 100644
--- a/src/Interfaces/BluemRequestInterface.php
+++ b/src/Interfaces/BluemRequestInterface.php
@@ -1,4 +1,5 @@
*
@@ -6,7 +7,6 @@
* with this source code in the file LICENSE.
*/
-
namespace Bluem\BluemPHP\Interfaces;
use Bluem\BluemPHP\Requests\BluemRequest;
diff --git a/src/Interfaces/BluemResponseInterface.php b/src/Interfaces/BluemResponseInterface.php
index 45c3ac3..8b5e192 100644
--- a/src/Interfaces/BluemResponseInterface.php
+++ b/src/Interfaces/BluemResponseInterface.php
@@ -1,4 +1,5 @@
*
@@ -6,7 +7,6 @@
* with this source code in the file LICENSE.
*/
-
namespace Bluem\BluemPHP\Interfaces;
interface BluemResponseInterface
diff --git a/src/Interfaces/WebhookInterface.php b/src/Interfaces/WebhookInterface.php
index 111a9d4..bb647b3 100644
--- a/src/Interfaces/WebhookInterface.php
+++ b/src/Interfaces/WebhookInterface.php
@@ -1,4 +1,5 @@
*
@@ -6,10 +7,8 @@
* with this source code in the file LICENSE.
*/
-
namespace Bluem\BluemPHP\Interfaces;
interface WebhookInterface
{
-
}
diff --git a/src/Requests/BluemRequest.php b/src/Requests/BluemRequest.php
index 6e02817..a199303 100644
--- a/src/Requests/BluemRequest.php
+++ b/src/Requests/BluemRequest.php
@@ -1,4 +1,5 @@
*
@@ -82,7 +83,7 @@ class BluemRequest implements BluemRequestInterface
private array $_debtorAdditionalData = [];
- private const TYPE_IDENTIFIERS = [ 'createTransaction', 'requestStatus' ];
+ private const TYPE_IDENTIFIERS = ['createTransaction', 'requestStatus'];
/**
* @var string[]
*/
@@ -124,8 +125,8 @@ public function __construct(
$this->environment = $config->environment;
- $this->brandID = $config->brandID;
- $this->senderID = $config->senderID;
+ $this->brandID = $config->brandID;
+ $this->senderID = $config->senderID;
$this->accessToken = $config->accessToken;
// @todo just use the config directly instead of copying all configuration elements
@@ -142,6 +143,7 @@ public function __construct(
}
// @todo remove this?
+
/**
* Generate an entranceCode, including test entranceCode substrings for certain types of return responses
*
@@ -157,41 +159,27 @@ private function entranceCode(string $expectedReturn = 'none'): string
if ($this->environment === BLUEM_ENVIRONMENT_TESTING) {
switch ($expectedReturn) {
case 'success':
- {
$prefix = "HIO100OIH";
break;
- }
case 'cancelled':
- {
$prefix = "HIO200OIH";
break;
- }
case 'expired':
- {
$prefix = "HIO300OIH";
break;
- }
case 'failure':
- {
$prefix = "HIO500OIH";
break;
- }
case 'open':
- {
$prefix = "HIO400OIH";
break;
- }
case 'pending':
- {
$prefix = "HIO600OIH";
break;
- }
case '':
case 'none':
default:
- {
break;
- }
}
}
@@ -278,7 +266,7 @@ public function selectDebtorWallet($BIC)
{
$possibleBICs = $this->context->getBICCodes();
- if (! in_array($BIC, $possibleBICs)) {
+ if (!in_array($BIC, $possibleBICs)) {
throw new Exception("Invalid BIC code given, should be a valid BIC of a supported bank.");
}
$this->debtorWallet = $BIC;
@@ -298,7 +286,7 @@ public function XmlWrapDebtorWallet(): string
return "";
}
- if (! isset($this->context->debtorWalletElementName) || $this->context->debtorWalletElementName === "") {
+ if (!isset($this->context->debtorWalletElementName) || $this->context->debtorWalletElementName === "") {
return '';
}
@@ -319,7 +307,7 @@ public function XmlWrapDebtorAdditionalData(): string
$res = PHP_EOL . "" . PHP_EOL;
foreach ($this->_debtorAdditionalData as $key => $value) {
- if (! in_array($key, $this->_possibleDebtorAdditionalDataKeys)) {
+ if (!in_array($key, $this->_possibleDebtorAdditionalDataKeys)) {
continue;
}
@@ -338,14 +326,14 @@ public function XmlWrapDebtorAdditionalData(): string
*/
public function addAdditionalData($key, $value): BluemRequest
{
- if (! in_array($key, $this->_possibleDebtorAdditionalDataKeys)) {
+ if (!in_array($key, $this->_possibleDebtorAdditionalDataKeys)) {
throw new Exception(
"Incorrect key added as DebtorAdditionalData
to request."
);
}
- $this->_debtorAdditionalData[ $key ] = $value;
+ $this->_debtorAdditionalData[$key] = $value;
return $this; // allow function chaining
}
diff --git a/src/Requests/EmandateBluemRequest.php b/src/Requests/EmandateBluemRequest.php
index 70e9989..a968dee 100644
--- a/src/Requests/EmandateBluemRequest.php
+++ b/src/Requests/EmandateBluemRequest.php
@@ -1,4 +1,5 @@
*
@@ -6,7 +7,6 @@
* with this source code in the file LICENSE.
*/
-
namespace Bluem\BluemPHP\Requests;
use Bluem\BluemPHP\Contexts\MandatesContext;
diff --git a/src/Requests/EmandateStatusBluemRequest.php b/src/Requests/EmandateStatusBluemRequest.php
index 02c93fc..f2fb413 100644
--- a/src/Requests/EmandateStatusBluemRequest.php
+++ b/src/Requests/EmandateStatusBluemRequest.php
@@ -1,4 +1,5 @@
*
diff --git a/src/Requests/IBANBluemRequest.php b/src/Requests/IBANBluemRequest.php
index 7b9292c..3a55d29 100644
--- a/src/Requests/IBANBluemRequest.php
+++ b/src/Requests/IBANBluemRequest.php
@@ -1,4 +1,5 @@
*
diff --git a/src/Requests/IdentityBluemRequest.php b/src/Requests/IdentityBluemRequest.php
index bbe64b1..6a980f1 100644
--- a/src/Requests/IdentityBluemRequest.php
+++ b/src/Requests/IdentityBluemRequest.php
@@ -1,4 +1,5 @@
*
@@ -9,6 +10,7 @@
namespace Bluem\BluemPHP\Requests;
use Bluem\BluemPHP\Contexts\IdentityContext;
+use Bluem\BluemPHP\Exceptions\InvalidBluemRequestException;
use Exception;
define("BLUEM_DEFAULT_MIN_AGE", 18);
@@ -60,8 +62,8 @@ public function __construct(
$this->requestCategory = $this->getRequestCategoryElement($requestCategory);
$this->description = $this->_sanitizeDescription($description);
- if ($debtorReturnURL == "") {
- throw new Exception("Debtor return URL is required");
+ if (empty($debtorReturnURL)) {
+ throw new InvalidBluemRequestException("Debtor return URL is required");
}
$this->debtorReturnURL = $debtorReturnURL . "?debtorReference=$this->debtorReference";
diff --git a/src/Requests/IdentityStatusBluemRequest.php b/src/Requests/IdentityStatusBluemRequest.php
index 9b3e226..338fe77 100644
--- a/src/Requests/IdentityStatusBluemRequest.php
+++ b/src/Requests/IdentityStatusBluemRequest.php
@@ -1,4 +1,6 @@
-
*
* This source file is subject to the license that is bundled
diff --git a/src/Requests/PaymentBluemRequest.php b/src/Requests/PaymentBluemRequest.php
index 535ae3d..10bf12e 100644
--- a/src/Requests/PaymentBluemRequest.php
+++ b/src/Requests/PaymentBluemRequest.php
@@ -1,4 +1,5 @@
*
@@ -193,7 +194,7 @@ public function setPaymentMethodToIDEAL($BIC = ""): self
if (!empty($BIC)) {
$this->context->addPaymentMethodDetails(
[
- 'BIC'=>$BIC
+ 'BIC' => $BIC
]
);
}
@@ -211,7 +212,7 @@ public function setPaymentMethodToPayPal($payPalAccount = ""): self
if (!empty($payPalAccount)) {
$this->context->addPaymentMethodDetails(
[
- 'PayPalAccount'=>$payPalAccount
+ 'PayPalAccount' => $payPalAccount
]
);
}
@@ -231,16 +232,17 @@ public function setPaymentMethodToCreditCard(
/**
* Prepared for future use.
*/
- if (!empty($cardNumber) || !empty($name) || !empty($securityCode)
+ if (
+ !empty($cardNumber) || !empty($name) || !empty($securityCode)
|| !empty($expirationDateMonth) || !empty($expirationDateYear)
) {
$this->context->addPaymentMethodDetails(
[
- 'CardNumber'=>$cardNumber,
- 'Name'=>$name,
- 'SecurityCode'=>$securityCode,
- 'ExpirationDateMonth'=>$expirationDateMonth,
- 'ExpirationDateYear'=>$expirationDateYear,
+ 'CardNumber' => $cardNumber,
+ 'Name' => $name,
+ 'SecurityCode' => $securityCode,
+ 'ExpirationDateMonth' => $expirationDateMonth,
+ 'ExpirationDateYear' => $expirationDateYear,
]
);
}
@@ -284,8 +286,8 @@ public function getDueDateTime(mixed $dueDateTime): string
private function addZeroPrefix($number)
{
- if (strlen($number.'') === 1) {
- return (int) '0'.$number;
+ if (strlen($number . '') === 1) {
+ return (int) '0' . $number;
}
}
diff --git a/src/Requests/PaymentStatusBluemRequest.php b/src/Requests/PaymentStatusBluemRequest.php
index 0ebc7f4..92006e5 100644
--- a/src/Requests/PaymentStatusBluemRequest.php
+++ b/src/Requests/PaymentStatusBluemRequest.php
@@ -1,4 +1,5 @@
*
@@ -9,6 +10,7 @@
namespace Bluem\BluemPHP\Requests;
use Bluem\BluemPHP\Contexts\PaymentsContext;
+use Bluem\BluemPHP\Helpers\BluemConfiguration;
class PaymentStatusBluemRequest extends BluemRequest
{
@@ -25,12 +27,20 @@ public function __construct(
) {
parent::__construct($config, $entranceCode, $expected_return);
- if (isset($config->paymentBrandID)
+ if ($config instanceof BluemConfiguration) {
+ if (
+ isset($config->paymentBrandID)
+ && $config->paymentBrandID !== ""
+ ) {
+ $config->setBrandID($config->paymentBrandID);
+ } else {
+ $config->setBrandID($config->brandID);
+ }
+ } elseif (
+ $config instanceof \stdClass && isset($config->paymentBrandID)
&& $config->paymentBrandID !== ""
) {
- $config->setBrandID($config->paymentBrandID);
- } else {
- $config->setBrandID($config->brandID);
+ $config->brandID = $config->paymentBrandID;
}
$this->transactionID = $transactionID;
diff --git a/src/Responses/BluemResponse.php b/src/Responses/BluemResponse.php
index 7b7e2a1..a3f1fee 100644
--- a/src/Responses/BluemResponse.php
+++ b/src/Responses/BluemResponse.php
@@ -19,7 +19,6 @@
*/
class BluemResponse extends SimpleXMLElement implements BluemResponseInterface
{
-
public static string $response_primary_key;
public static string $transaction_type;
public static ?string $error_response_type = null;
@@ -76,7 +75,7 @@ protected function getChildXmlElement(): string
return self::$response_primary_key;
}
- protected function getParentStringVariable(string $variable) : string
+ protected function getParentStringVariable(string $variable): string
{
return ( isset($this->{$this->getParentXmlElement()}->$variable) ) ? $this->{$this->getParentXmlElement()}->$variable . '' : '';
}
diff --git a/src/Responses/ErrorBluemResponse.php b/src/Responses/ErrorBluemResponse.php
index b21d48b..a8b6709 100644
--- a/src/Responses/ErrorBluemResponse.php
+++ b/src/Responses/ErrorBluemResponse.php
@@ -1,4 +1,5 @@
*
diff --git a/src/Responses/IBANNameCheckBluemResponse.php b/src/Responses/IBANNameCheckBluemResponse.php
index c05b3d8..78aaa78 100644
--- a/src/Responses/IBANNameCheckBluemResponse.php
+++ b/src/Responses/IBANNameCheckBluemResponse.php
@@ -1,4 +1,5 @@
*
diff --git a/src/Responses/IdentityStatusBluemResponse.php b/src/Responses/IdentityStatusBluemResponse.php
index 675a1e7..2e02fb4 100644
--- a/src/Responses/IdentityStatusBluemResponse.php
+++ b/src/Responses/IdentityStatusBluemResponse.php
@@ -1,4 +1,5 @@
*
diff --git a/src/Responses/IdentityTransactionBluemResponse.php b/src/Responses/IdentityTransactionBluemResponse.php
index da18231..45fdb46 100644
--- a/src/Responses/IdentityTransactionBluemResponse.php
+++ b/src/Responses/IdentityTransactionBluemResponse.php
@@ -1,4 +1,5 @@
*
diff --git a/src/Responses/MandateStatusBluemResponse.php b/src/Responses/MandateStatusBluemResponse.php
index 6f4dbaa..bdbf833 100644
--- a/src/Responses/MandateStatusBluemResponse.php
+++ b/src/Responses/MandateStatusBluemResponse.php
@@ -1,4 +1,5 @@
*
diff --git a/src/Responses/MandateTransactionBluemResponse.php b/src/Responses/MandateTransactionBluemResponse.php
index d7ff32d..8b78597 100644
--- a/src/Responses/MandateTransactionBluemResponse.php
+++ b/src/Responses/MandateTransactionBluemResponse.php
@@ -1,4 +1,5 @@
*
diff --git a/src/Responses/PaymentStatusBluemResponse.php b/src/Responses/PaymentStatusBluemResponse.php
index bc7ca38..c08367f 100644
--- a/src/Responses/PaymentStatusBluemResponse.php
+++ b/src/Responses/PaymentStatusBluemResponse.php
@@ -1,4 +1,5 @@
*
@@ -12,6 +13,5 @@ class PaymentStatusBluemResponse extends StatusBluemResponse
{
public static string $transaction_type = "Payment";
public static string $response_primary_key = 'PaymentStatus';
- public static ?
- string $error_response_type = 'PaymentErrorResponse';
+ public static ?string $error_response_type = 'PaymentErrorResponse';
}
diff --git a/src/Responses/PaymentTransactionBluemResponse.php b/src/Responses/PaymentTransactionBluemResponse.php
index 3f20e9e..ce2a913 100644
--- a/src/Responses/PaymentTransactionBluemResponse.php
+++ b/src/Responses/PaymentTransactionBluemResponse.php
@@ -1,4 +1,5 @@
*
diff --git a/src/Responses/StatusBluemResponse.php b/src/Responses/StatusBluemResponse.php
index ad099c8..df5b8e9 100644
--- a/src/Responses/StatusBluemResponse.php
+++ b/src/Responses/StatusBluemResponse.php
@@ -1,4 +1,5 @@
*
diff --git a/src/Responses/TransactionBluemResponse.php b/src/Responses/TransactionBluemResponse.php
index 012f45e..704cf62 100644
--- a/src/Responses/TransactionBluemResponse.php
+++ b/src/Responses/TransactionBluemResponse.php
@@ -1,4 +1,5 @@
*
@@ -10,7 +11,6 @@
class TransactionBluemResponse extends BluemResponse
{
-
public function GetTransactionURL(): string
{
return $this->getParentStringVariable("TransactionURL");
diff --git a/src/Validators/BluemConfigurationValidator.php b/src/Validators/BluemConfigurationValidator.php
index 0009926..399828a 100644
--- a/src/Validators/BluemConfigurationValidator.php
+++ b/src/Validators/BluemConfigurationValidator.php
@@ -1,4 +1,5 @@
*
@@ -8,6 +9,7 @@
namespace Bluem\BluemPHP\Validators;
+use Bluem\BluemPHP\Exceptions\InvalidBluemConfigurationException;
use Exception;
use Throwable;
@@ -24,7 +26,7 @@ class BluemConfigurationValidator
{
private ?array $errors = null;
- function validate($config)
+ public function validate($config)
{
// essential validation
@@ -44,7 +46,6 @@ function validate($config)
$config = $this->_validateEMandateReason($config);
$config = $this->_validateLocalInstrumentCode($config);
$config = $this->_validateMerchantReturnURLBase($config);
-
} catch (Throwable $th) {
$this->errors[] = $th->getMessage();
@@ -56,15 +57,16 @@ function validate($config)
private function _validateEnvironment($config)
{
- if (!in_array(
- $config->environment,
- [
- BLUEM_ENVIRONMENT_TESTING,
- BLUEM_ENVIRONMENT_ACCEPTANCE,
- BLUEM_ENVIRONMENT_PRODUCTION
- ],
- true
- )
+ if (
+ !in_array(
+ $config->environment,
+ [
+ BLUEM_ENVIRONMENT_TESTING,
+ BLUEM_ENVIRONMENT_ACCEPTANCE,
+ BLUEM_ENVIRONMENT_PRODUCTION
+ ],
+ true
+ )
) {
throw new Exception(
"Invalid environment setting, should be either
@@ -101,7 +103,8 @@ private function _validateSenderID($config)
private function _validateTest_accessToken($config)
{
- if ($config->environment === BLUEM_ENVIRONMENT_TESTING
+ if (
+ $config->environment === BLUEM_ENVIRONMENT_TESTING
&& ( ! isset($config->test_accessToken)
|| $config->test_accessToken === "" )
) {
@@ -118,7 +121,8 @@ private function _validateProduction_accessToken($config)
{
// only required if mode is set to PROD
// production_accessToken
- if ($config->environment === BLUEM_ENVIRONMENT_PRODUCTION
+ if (
+ $config->environment === BLUEM_ENVIRONMENT_PRODUCTION
&& ( ! isset($config->production_accessToken)
|| $config->production_accessToken === "" )
) {
@@ -135,7 +139,10 @@ private function _validateProduction_accessToken($config)
private function _validateBrandID($config)
{
if (! isset($config->brandID)) {
- throw new Exception("brandID not set; please add this to your configuration when instantiating the Bluem integration");
+ throw new InvalidBluemConfigurationException(
+ "brandID not set; please add this to your configuration " .
+ "when instantiating the Bluem integration"
+ );
}
return $config;
@@ -180,7 +187,8 @@ private function _validateThanksPage($config)
private function _validateExpectedReturnStatus($config): mixed
{
if ($config->environment === BLUEM_ENVIRONMENT_TESTING) {
- if (! isset($config->expectedReturnStatus)
+ if (
+ ! isset($config->expectedReturnStatus)
|| ( $config->expectedReturnStatus !== ""
&& !in_array($config->expectedReturnStatus, $this->getPossibleReturnStatuses(), true))
) {
@@ -219,7 +227,8 @@ private function _validateEMandateReason($config)
private function _validateLocalInstrumentCode($config)
{
- if (! isset($config->localInstrumentCode)
+ if (
+ ! isset($config->localInstrumentCode)
|| ! in_array(
$config->localInstrumentCode,
[ 'B2B', 'CORE' ]
diff --git a/src/Validators/BluemXMLValidator.php b/src/Validators/BluemXMLValidator.php
index f3bf2b5..d994147 100644
--- a/src/Validators/BluemXMLValidator.php
+++ b/src/Validators/BluemXMLValidator.php
@@ -1,4 +1,5 @@
*
@@ -46,7 +47,7 @@ public function validate(string $data): self
// Verify a XML file
$xmlVerified = $xmlSignatureVerifier->verifyXml(file_get_contents($temp_file_path));
- if (! $xmlVerified) {
+ if (!$xmlVerified) {
$this->addError("Invalid signature");
}
} catch (Exception $e) {
@@ -72,12 +73,22 @@ private function getKeyFileName(): string
$prefix = 'webhook_bluem_nl_';
// Check the datetime for certificates
- if ( ( $current_date === "2024-07-01" && $current_time >= "12:00" ) || $current_date > "2024-07-01")
- {
+ if (
+ ($current_date === "2024-07-01" && $current_time >= "12:00")
+ || $current_date > "2024-07-01"
+ ) {
$timestamp = '20240701';
- } elseif ($this->env === BLUEM_ENVIRONMENT_TESTING && ( ( $current_date === "2023-06-28" && $current_time >= "08:00" ) || $current_date > "2023-06-28")) {
+ } elseif (
+ $this->env === BLUEM_ENVIRONMENT_TESTING
+ && (($current_date === "2023-06-28" && $current_time >= "08:00")
+ || $current_date > "2023-06-28")
+ ) {
$timestamp = '202306140200-202407050159';
- } elseif ($this->env === BLUEM_ENVIRONMENT_PRODUCTION && ( ( $current_date === "2023-07-04" && $current_time >= "08:00" ) || $current_date > "2023-07-04")) {
+ } elseif (
+ $this->env === BLUEM_ENVIRONMENT_PRODUCTION
+ && (($current_date === "2023-07-04" && $current_time >= "08:00")
+ || $current_date > "2023-07-04")
+ ) {
$timestamp = '202306140200-202407050159';
} else {
$timestamp = '202206090200-202307110159';
diff --git a/src/Validators/WebhookValidator.php b/src/Validators/WebhookValidator.php
index d857f9e..5ba5c6f 100644
--- a/src/Validators/WebhookValidator.php
+++ b/src/Validators/WebhookValidator.php
@@ -1,4 +1,5 @@
*
diff --git a/src/Validators/WebhookValidatorInterface.php b/src/Validators/WebhookValidatorInterface.php
index e9639ee..9eda059 100644
--- a/src/Validators/WebhookValidatorInterface.php
+++ b/src/Validators/WebhookValidatorInterface.php
@@ -1,4 +1,5 @@
*
diff --git a/src/Validators/WebhookXMLValidator.php b/src/Validators/WebhookXMLValidator.php
index d4f2ef2..6f3a2a6 100644
--- a/src/Validators/WebhookXMLValidator.php
+++ b/src/Validators/WebhookXMLValidator.php
@@ -1,4 +1,5 @@
*
diff --git a/src/Validators/WebhookXmlValidation.php b/src/Validators/WebhookXmlValidation.php
index b5af32c..3c41fc6 100644
--- a/src/Validators/WebhookXmlValidation.php
+++ b/src/Validators/WebhookXmlValidation.php
@@ -1,4 +1,5 @@
*
diff --git a/src/Webhook.php b/src/Webhook.php
index 5714fde..d489265 100644
--- a/src/Webhook.php
+++ b/src/Webhook.php
@@ -1,4 +1,5 @@
*
@@ -40,8 +41,7 @@ public function __construct(
private function parse($xmlData = ''): void
{
- if (empty($xmlData))
- {
+ if (empty($xmlData)) {
if (!$this->isHttpsRequest()) {
$this->exitWithError('Not HTTPS');
return;
@@ -272,7 +272,7 @@ public function getDebtorAccountName(): ?string
if (!$details instanceof \SimpleXMLElement) {
return "";
}
- return $details->DebtorAccountName."" ?? "";
+ return $details->DebtorAccountName . "" ?? "";
}
public function getDebtorIBAN(): ?string
{
@@ -280,7 +280,7 @@ public function getDebtorIBAN(): ?string
if (!$details instanceof \SimpleXMLElement) {
return "";
}
- return $details->DebtorIBAN."" ?? "";
+ return $details->DebtorIBAN . "" ?? "";
}
public function getDebtorBankID(): ?string
{
@@ -288,7 +288,7 @@ public function getDebtorBankID(): ?string
if (!$details instanceof \SimpleXMLElement) {
return "";
}
- return $details->DebtorBankID."" ?? "";
+ return $details->DebtorBankID . "" ?? "";
}
@@ -341,17 +341,17 @@ public function getAcceptanceReportArray(): array
public function getRequestType(): string
{
- return $this->getPayload()->RequestType ."";
+ return $this->getPayload()->RequestType . "";
}
public function getAuthenticationAuthorityID(): string
{
- return $this->getPayload()->AuthenticationAuthorityID.'';
+ return $this->getPayload()->AuthenticationAuthorityID . '';
}
public function getAuthenticationAuthorityName(): string
{
- return $this->getPayload()->AuthenticationAuthorityName.'';
+ return $this->getPayload()->AuthenticationAuthorityName . '';
}
public function getIdentityReportArray(): array
@@ -363,29 +363,29 @@ public function getIdentityReportArray(): array
}
return [
- 'DateTime' => $report->DateTime.'',
- 'CustomerIDResponse' => $report->CustomerIDResponse.'',
+ 'DateTime' => $report->DateTime . '',
+ 'CustomerIDResponse' => $report->CustomerIDResponse . '',
'NameResponse' => [
- 'Initials'=>$report->NameResponse->Initials. '',
- 'LegalLastName'=>$report->NameResponse->LegalLastName. '',
- 'LegalLastNamePrefix'=>$report->NameResponse->LegalLastNamePrefix. '',
- 'PreferredLastName'=>$report->NameResponse->PreferredLastName. '',
- 'PreferredLastNamePrefix'=>$report->NameResponse->PreferredLastNamePrefix. '',
- 'PartnerLastName'=>$report->NameResponse->PartnerLastName. '',
- 'PartnerLastNamePrefix'=>$report->NameResponse->PartnerLastNamePrefix. '',
+ 'Initials' => $report->NameResponse->Initials . '',
+ 'LegalLastName' => $report->NameResponse->LegalLastName . '',
+ 'LegalLastNamePrefix' => $report->NameResponse->LegalLastNamePrefix . '',
+ 'PreferredLastName' => $report->NameResponse->PreferredLastName . '',
+ 'PreferredLastNamePrefix' => $report->NameResponse->PreferredLastNamePrefix . '',
+ 'PartnerLastName' => $report->NameResponse->PartnerLastName . '',
+ 'PartnerLastNamePrefix' => $report->NameResponse->PartnerLastNamePrefix . '',
],
'AddressResponse' => [
- 'Street'=>$report->AddressResponse->Street. '',
- 'HouseNumber'=>$report->AddressResponse->HouseNumber. '',
- 'HouseNumberSuffix'=>$report->AddressResponse->HouseNumberSuffix. '' ?? '',
- 'PostalCode'=>$report->AddressResponse->PostalCode. '',
- 'City'=>$report->AddressResponse->City. '',
- 'CountryCode'=>$report->AddressResponse->CountryCode. '',
+ 'Street' => $report->AddressResponse->Street . '',
+ 'HouseNumber' => $report->AddressResponse->HouseNumber . '',
+ 'HouseNumberSuffix' => $report->AddressResponse->HouseNumberSuffix . '' ?? '',
+ 'PostalCode' => $report->AddressResponse->PostalCode . '',
+ 'City' => $report->AddressResponse->City . '',
+ 'CountryCode' => $report->AddressResponse->CountryCode . '',
],
'BirthDateResponse' => $report->BirthDateResponse . '',
'GenderResponse' => $report->GenderResponse . '',
'TelephoneResponse1' => $report->TelephoneResponse1 . '',
- 'EmailResponse' => $report->EmailResponse .''
+ 'EmailResponse' => $report->EmailResponse . ''
];
}
}
diff --git a/tests/Unit/BluemPaymentsTest.php b/tests/Unit/BluemPaymentsTest.php
new file mode 100644
index 0000000..a1d1e65
--- /dev/null
+++ b/tests/Unit/BluemPaymentsTest.php
@@ -0,0 +1,18 @@
+
+ *
+ * This source file is subject to the license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace Bluem\BluemPHP\Tests\Unit;
+
+class BluemPaymentsTest extends BluemTestCase
+{
+
+ public function testCanCreatePaymentRequest(): void
+ {
+
+ }
+}
diff --git a/tests/Unit/BluemTest.php b/tests/Unit/BluemTest.php
index 9742fe0..8c155cc 100644
--- a/tests/Unit/BluemTest.php
+++ b/tests/Unit/BluemTest.php
@@ -14,25 +14,10 @@
use Bluem\BluemPHP\Interfaces\BluemResponseInterface;
use Bluem\BluemPHP\Requests\BluemRequest;
use Bluem\BluemPHP\Responses\ErrorBluemResponse;
-use PHPUnit\Framework\TestCase;
use RuntimeException;
-use stdClass;
-class BluemTest extends TestCase
+class BluemTest extends BluemTestCase
{
- private Bluem $bluem;
-
- /**
- * @throws InvalidBluemConfigurationException
- */
- protected function setUp(): void
- {
- // Mock the configuration as needed
- $mockedConfig = $this->getConfig();
- $this->bluem = new Bluem($mockedConfig);
- }
-
-
public function testConstructorWithValidConfig(): void
{
@@ -84,25 +69,4 @@ public function testPerformRequestWithInvalidXml(): void
$this->assertInstanceOf(ErrorBluemResponse::class, $result);
}
- // helper classes
- private function getConfig(): stdClass
- {
- $bluem_config = new stdClass;
- $bluem_config->environment = 'test';
- $bluem_config->senderID = 'S12345';
-
- $bluem_config->brandID = 'BLUEM_BRANDID';
- $bluem_config->test_accessToken = 'BLUEM_TEST_ACCESS_TOKEN';
- $bluem_config->IDINBrandID = 'BLUEM_BRANDID';
- $bluem_config->merchantID = 'BLUEM_MERCHANTID';
- $bluem_config->merchantReturnURLBase = 'BLUEM_MERCHANTRETURNURLBASE';
-
- $bluem_config->production_accessToken = "";
- $bluem_config->expectedReturnStatus = "success";
- $bluem_config->eMandateReason = "eMandateReason";
- $bluem_config->sequenceType = "OOFF";
- $bluem_config->localInstrumentCode = "B2B";
-
- return $bluem_config;
- }
}
diff --git a/tests/Unit/BluemTestCase.php b/tests/Unit/BluemTestCase.php
new file mode 100644
index 0000000..5182403
--- /dev/null
+++ b/tests/Unit/BluemTestCase.php
@@ -0,0 +1,52 @@
+
+ *
+ * This source file is subject to the license that is bundled
+ * with this source code in the file LICENSE.
+ */
+
+namespace Bluem\BluemPHP\Tests\Unit;
+
+use Bluem\BluemPHP\Bluem;
+use Bluem\BluemPHP\Exceptions\InvalidBluemConfigurationException;
+use PHPUnit\Framework\TestCase;
+use stdClass;
+
+class BluemTestCase extends TestCase
+{
+ protected Bluem $bluem;
+
+ /**
+ * @throws InvalidBluemConfigurationException
+ */
+ protected function setUp(): void
+ {
+ // Mock the configuration as needed
+ $mockedConfig = $this->getConfig();
+ $this->bluem = new Bluem($mockedConfig);
+ }
+
+
+ // helper classes
+ protected function getConfig(): stdClass
+ {
+ $bluem_config = new stdClass;
+ $bluem_config->environment = 'test';
+ $bluem_config->senderID = 'S12345';
+
+ $bluem_config->brandID = 'BLUEM_BRANDID';
+ $bluem_config->test_accessToken = 'BLUEM_TEST_ACCESS_TOKEN';
+ $bluem_config->IDINBrandID = 'BLUEM_BRANDID';
+ $bluem_config->merchantID = 'BLUEM_MERCHANTID';
+ $bluem_config->merchantReturnURLBase = 'BLUEM_MERCHANTRETURNURLBASE';
+
+ $bluem_config->production_accessToken = "";
+ $bluem_config->expectedReturnStatus = "success";
+ $bluem_config->eMandateReason = "eMandateReason";
+ $bluem_config->sequenceType = "OOFF";
+ $bluem_config->localInstrumentCode = "B2B";
+
+ return $bluem_config;
+ }
+}