From 82b49151c241d1c912397f965ffe64a7de069638 Mon Sep 17 00:00:00 2001
From: Philipp Scheit
Date: Tue, 24 Jun 2025 14:45:55 +0200
Subject: [PATCH 1/8] bump version to php 7.4
---
composer.json | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/composer.json b/composer.json
index d747276..a370817 100644
--- a/composer.json
+++ b/composer.json
@@ -19,7 +19,7 @@
"config": {
"platform": {
- "php": "7.2"
+ "php": "7.4"
},
"allow-plugins": {
"composer/package-versions-deprecated": true
@@ -29,7 +29,7 @@
"require": {
"ext-json": "*",
"ext-curl": "*",
- "php": ">=7.2"
+ "php": ">=7.4"
},
"require-dev": {
"phpunit/phpunit": "^8.5",
From e8482d9dab22adb81da1ee97da90c4b80c0801ba Mon Sep 17 00:00:00 2001
From: Philipp Scheit
Date: Tue, 24 Jun 2025 14:46:26 +0200
Subject: [PATCH 2/8] install phpstan 2.x, configure
---
composer.json | 3 +-
composer.lock | 64 ++++++++++++++-
config/phpstan/Hamcrest/AnyOf.stub | 6 ++
.../Hamcrest/Arrays/IsArrayContainingKey.stub | 11 +++
config/phpstan/Hamcrest/BaseMatcher.stub | 8 ++
config/phpstan/Hamcrest/Description.stub | 6 ++
config/phpstan/Hamcrest/FeatureMatcher.stub | 6 ++
config/phpstan/Hamcrest/IsAnything.stub | 8 ++
config/phpstan/Hamcrest/IsEqual.stub | 8 ++
config/phpstan/Hamcrest/IsIdentical.stub | 6 ++
config/phpstan/Hamcrest/IsInstanceOf.stub | 6 ++
config/phpstan/Hamcrest/IsNonEmptyString.stub | 8 ++
config/phpstan/Hamcrest/IsNot.stub | 8 ++
config/phpstan/Hamcrest/IsTypeOf.stub | 8 ++
config/phpstan/Hamcrest/Matcher.stub | 9 +++
config/phpstan/Hamcrest/Matchers.stub | 77 +++++++++++++++++++
config/phpstan/Hamcrest/SelfDescribing.stub | 8 ++
config/phpstan/Hamcrest/StringContains.stub | 6 ++
.../phpstan/Hamcrest/Text/IsEmptyString.stub | 8 ++
.../Hamcrest/Text/SubstringMatcher.stub | 8 ++
.../Hamcrest/TypeSafeDiagnosingMatcher.stub | 6 ++
config/phpstan/Hamcrest/TypeSafeMatcher.stub | 6 ++
phpstan.neon | 29 +++++++
23 files changed, 309 insertions(+), 4 deletions(-)
create mode 100644 config/phpstan/Hamcrest/AnyOf.stub
create mode 100644 config/phpstan/Hamcrest/Arrays/IsArrayContainingKey.stub
create mode 100644 config/phpstan/Hamcrest/BaseMatcher.stub
create mode 100644 config/phpstan/Hamcrest/Description.stub
create mode 100644 config/phpstan/Hamcrest/FeatureMatcher.stub
create mode 100644 config/phpstan/Hamcrest/IsAnything.stub
create mode 100644 config/phpstan/Hamcrest/IsEqual.stub
create mode 100644 config/phpstan/Hamcrest/IsIdentical.stub
create mode 100644 config/phpstan/Hamcrest/IsInstanceOf.stub
create mode 100644 config/phpstan/Hamcrest/IsNonEmptyString.stub
create mode 100644 config/phpstan/Hamcrest/IsNot.stub
create mode 100644 config/phpstan/Hamcrest/IsTypeOf.stub
create mode 100644 config/phpstan/Hamcrest/Matcher.stub
create mode 100644 config/phpstan/Hamcrest/Matchers.stub
create mode 100644 config/phpstan/Hamcrest/SelfDescribing.stub
create mode 100644 config/phpstan/Hamcrest/StringContains.stub
create mode 100644 config/phpstan/Hamcrest/Text/IsEmptyString.stub
create mode 100644 config/phpstan/Hamcrest/Text/SubstringMatcher.stub
create mode 100644 config/phpstan/Hamcrest/TypeSafeDiagnosingMatcher.stub
create mode 100644 config/phpstan/Hamcrest/TypeSafeMatcher.stub
create mode 100644 phpstan.neon
diff --git a/composer.json b/composer.json
index a370817..c2d78a1 100644
--- a/composer.json
+++ b/composer.json
@@ -36,7 +36,8 @@
"phake/phake": "^4.5",
"hamcrest/hamcrest-php": "^2.0",
"phpdocumentor/reflection-docblock": "^5.3",
- "phpdocumentor/type-resolver": "^1.6"
+ "phpdocumentor/type-resolver": "^1.6",
+ "phpstan/phpstan": "^2.0.0"
},
"suggest": {
diff --git a/composer.lock b/composer.lock
index 01fdf5d..ed2c910 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": "7e4bb76b0594bdf76c5f74965e702dca",
+ "content-hash": "ccc864fe6d18a5e5b130da19e2d1d64f",
"packages": [],
"packages-dev": [
{
@@ -537,6 +537,64 @@
},
"time": "2022-03-15T21:29:03+00:00"
},
+ {
+ "name": "phpstan/phpstan",
+ "version": "2.1.17",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpstan.git",
+ "reference": "89b5ef665716fa2a52ecd2633f21007a6a349053"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/89b5ef665716fa2a52ecd2633f21007a6a349053",
+ "reference": "89b5ef665716fa2a52ecd2633f21007a6a349053",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4|^8.0"
+ },
+ "conflict": {
+ "phpstan/phpstan-shim": "*"
+ },
+ "bin": [
+ "phpstan",
+ "phpstan.phar"
+ ],
+ "type": "library",
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "PHPStan - PHP Static Analysis Tool",
+ "keywords": [
+ "dev",
+ "static analysis"
+ ],
+ "support": {
+ "docs": "https://phpstan.org/user-guide/getting-started",
+ "forum": "https://github.com/phpstan/phpstan/discussions",
+ "issues": "https://github.com/phpstan/phpstan/issues",
+ "security": "https://github.com/phpstan/phpstan/security/policy",
+ "source": "https://github.com/phpstan/phpstan-src"
+ },
+ "funding": [
+ {
+ "url": "https://github.com/ondrejmirtes",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/phpstan",
+ "type": "github"
+ }
+ ],
+ "time": "2025-05-21T20:55:28+00:00"
+ },
{
"name": "phpunit/php-code-coverage",
"version": "7.0.17",
@@ -1777,11 +1835,11 @@
"platform": {
"ext-json": "*",
"ext-curl": "*",
- "php": ">=7.2"
+ "php": ">=7.4"
},
"platform-dev": {},
"platform-overrides": {
- "php": "7.2"
+ "php": "7.4"
},
"plugin-api-version": "2.6.0"
}
diff --git a/config/phpstan/Hamcrest/AnyOf.stub b/config/phpstan/Hamcrest/AnyOf.stub
new file mode 100644
index 0000000..2c3ec70
--- /dev/null
+++ b/config/phpstan/Hamcrest/AnyOf.stub
@@ -0,0 +1,6 @@
+
Date: Tue, 24 Jun 2025 14:46:45 +0200
Subject: [PATCH 3/8] create simple justfile
---
Justfile | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 Justfile
diff --git a/Justfile b/Justfile
new file mode 100644
index 0000000..0caa2cb
--- /dev/null
+++ b/Justfile
@@ -0,0 +1,31 @@
+set dotenv-load := false
+set positional-arguments
+
+export COLUMNS := '550'
+
+default:
+ @just --list
+
+php := "php"
+composer := "composer"
+
+cli *args='':
+ {{ php }} bin/console "$@"
+
+phpstan *args='':
+ {{ php }} vendor/bin/phpstan "${@}"
+
+watch-phpstan *args='':
+ find src/ test/ -name '*.php' | entr j phpstan analyse "${@}"
+
+phpunit *args='':
+ {{ php }} vendor/bin/phpunit "${@}"
+
+composer *args='':
+ {{ composer }} "${@}"
+
+prep:
+ j phpstan
+ j phpunit
+
+
From e2e116b845b2cd8989027e21e63c53ead1a7bd67 Mon Sep 17 00:00:00 2001
From: Philipp Scheit
Date: Tue, 24 Jun 2025 14:47:09 +0200
Subject: [PATCH 4/8] keep it simple and go level 8 and exclude the test folder
for now, cause we have a lot errors
---
composer.json | 3 +-
composer.lock | 55 +-
phpstan-baseline-test.neon | 3655 ++++++++++++++++++++++++++++++++++++
phpstan.neon | 9 +-
4 files changed, 3719 insertions(+), 3 deletions(-)
create mode 100644 phpstan-baseline-test.neon
diff --git a/composer.json b/composer.json
index c2d78a1..50f0b66 100644
--- a/composer.json
+++ b/composer.json
@@ -37,7 +37,8 @@
"hamcrest/hamcrest-php": "^2.0",
"phpdocumentor/reflection-docblock": "^5.3",
"phpdocumentor/type-resolver": "^1.6",
- "phpstan/phpstan": "^2.0.0"
+ "phpstan/phpstan": "^2.0.0",
+ "phpstan/phpstan-phpunit": "^2.0"
},
"suggest": {
diff --git a/composer.lock b/composer.lock
index ed2c910..8f278b0 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": "ccc864fe6d18a5e5b130da19e2d1d64f",
+ "content-hash": "05d868d51b3409d74615549ab1783f6d",
"packages": [],
"packages-dev": [
{
@@ -595,6 +595,59 @@
],
"time": "2025-05-21T20:55:28+00:00"
},
+ {
+ "name": "phpstan/phpstan-phpunit",
+ "version": "2.0.6",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/phpstan/phpstan-phpunit.git",
+ "reference": "6b92469f8a7995e626da3aa487099617b8dfa260"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/6b92469f8a7995e626da3aa487099617b8dfa260",
+ "reference": "6b92469f8a7995e626da3aa487099617b8dfa260",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.4 || ^8.0",
+ "phpstan/phpstan": "^2.0.4"
+ },
+ "conflict": {
+ "phpunit/phpunit": "<7.0"
+ },
+ "require-dev": {
+ "nikic/php-parser": "^5",
+ "php-parallel-lint/php-parallel-lint": "^1.2",
+ "phpstan/phpstan-deprecation-rules": "^2.0",
+ "phpstan/phpstan-strict-rules": "^2.0",
+ "phpunit/phpunit": "^9.6"
+ },
+ "type": "phpstan-extension",
+ "extra": {
+ "phpstan": {
+ "includes": [
+ "extension.neon",
+ "rules.neon"
+ ]
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PHPStan\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "PHPUnit extensions and rules for PHPStan",
+ "support": {
+ "issues": "https://github.com/phpstan/phpstan-phpunit/issues",
+ "source": "https://github.com/phpstan/phpstan-phpunit/tree/2.0.6"
+ },
+ "time": "2025-03-26T12:47:06+00:00"
+ },
{
"name": "phpunit/php-code-coverage",
"version": "7.0.17",
diff --git a/phpstan-baseline-test.neon b/phpstan-baseline-test.neon
new file mode 100644
index 0000000..1bfc9ce
--- /dev/null
+++ b/phpstan-baseline-test.neon
@@ -0,0 +1,3655 @@
+parameters:
+ ignoreErrors:
+ -
+ message: '#^Call to an undefined method Phake\\Proxies\\StubberProxy\:\:build\(\)\.$#'
+ identifier: method.notFound
+ count: 2
+ path: test/WireMock/Client/MappingBuilderTest.php
+
+ -
+ message: '#^Call to an undefined method Phake\\Proxies\\VerifierProxy\:\:withHeader\(\)\.$#'
+ identifier: method.notFound
+ count: 1
+ path: test/WireMock/Client/MappingBuilderTest.php
+
+ -
+ message: '#^Call to an undefined method Phake\\Proxies\\VerifierProxy\:\:withQueryParam\(\)\.$#'
+ identifier: method.notFound
+ count: 1
+ path: test/WireMock/Client/MappingBuilderTest.php
+
+ -
+ message: '#^Call to an undefined method Phake\\Proxies\\VerifierProxy\:\:withRequestBody\(\)\.$#'
+ identifier: method.notFound
+ count: 1
+ path: test/WireMock/Client/MappingBuilderTest.php
+
+ -
+ message: '#^Cannot call method thenReturn\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 2
+ path: test/WireMock/Client/MappingBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\MappingBuilderTest\:\:testBuiltStubMappingHasRequestPatternAndResponseDefinition\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/MappingBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\MappingBuilderTest\:\:testMatchedRequestHeadersAreSetOnRequestPattern\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/MappingBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\MappingBuilderTest\:\:testMatchedRequestQueryParamsAreSetOnRequestPattern\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/MappingBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\MappingBuilderTest\:\:testRequestBodyMatcherIsSetOnRequestPattern\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/MappingBuilderTest.php
+
+ -
+ message: '#^Parameter \#1 \$mock of static method Phake\:\:verify\(\) expects Phake\\IMock, mixed given\.$#'
+ identifier: argument.type
+ count: 3
+ path: test/WireMock/Client/MappingBuilderTest.php
+
+ -
+ message: '#^Parameter \#1 \$requestPatternBuilder of class WireMock\\Client\\MappingBuilder constructor expects WireMock\\Client\\RequestPatternBuilder, mixed given\.$#'
+ identifier: argument.type
+ count: 4
+ path: test/WireMock/Client/MappingBuilderTest.php
+
+ -
+ message: '#^Parameter \#1 \$responseDefinitionBuilder of method WireMock\\Client\\MappingBuilder\:\:willReturn\(\) expects WireMock\\Client\\ResponseDefinitionBuilder, mixed given\.$#'
+ identifier: argument.type
+ count: 4
+ path: test/WireMock/Client/MappingBuilderTest.php
+
+ -
+ message: '#^Property WireMock\\Client\\MappingBuilderTest\:\:\$_mockRequestPatternBuilder has no type specified\.$#'
+ identifier: missingType.property
+ count: 1
+ path: test/WireMock/Client/MappingBuilderTest.php
+
+ -
+ message: '#^Property WireMock\\Client\\MappingBuilderTest\:\:\$_mockResponseDefinitionBuilder has no type specified\.$#'
+ identifier: missingType.property
+ count: 1
+ path: test/WireMock/Client/MappingBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\RequestPatternBuilderTest\:\:testBasicAuthIsInArrayIfSpecified\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/RequestPatternBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\RequestPatternBuilderTest\:\:testBuilderCanBeCreatedWithCustomMatcherNameAndParams\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/RequestPatternBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\RequestPatternBuilderTest\:\:testCookieWithValueMatchingStrategyIsInArrayIfSpecified\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/RequestPatternBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\RequestPatternBuilderTest\:\:testCustomMatcherDefinitionIsInArrayIfSpecified\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/RequestPatternBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\RequestPatternBuilderTest\:\:testHeaderAbsenceIsInArrayIfSpecified\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/RequestPatternBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\RequestPatternBuilderTest\:\:testHeaderWithValueMatchingStrategyIsInArrayIfSpecified\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/RequestPatternBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\RequestPatternBuilderTest\:\:testMethodAndUrlMatchingStrategyAreInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/RequestPatternBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\RequestPatternBuilderTest\:\:testRequestBodyPatternsAreInArrayIfSpecified\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/RequestPatternBuilderTest.php
+
+ -
+ message: '#^Cannot call method getAdditionalProxyRequestHeaders\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Cannot call method getBase64Body\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Cannot call method getBody\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 2
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Cannot call method getBodyFileName\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 2
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Cannot call method getFixedDelayMillis\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Cannot call method getHeaders\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 4
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Cannot call method getProxyBaseUrl\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 3
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Cannot call method getStatus\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 3
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Cannot call method getStatusMessage\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 2
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testBase64BodyIsAvailableInArrayIfSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testBodyFileIsAvailableInArrayIfSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testBodyFileIsNotAvailableInArrayIfNotSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testBodyIsAvailableInArrayIfSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testBodyIsNotAvailableInArrayIfNotSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testDefault200StatusIsAvailableInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testFixedDelayMillisecondsIsInArrayIfSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testHeaderIsAvailableInArrayAsArrayIfSetMultipleTimes\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testHeaderIsAvailableInArrayIfSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testHeaderIsNotAvailableInArrayIfNotSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testProxiedBuilderRetainsMatchersAddedSoFar\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testProxyAdditionalHeadersIsInArrayIfSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testProxyAdditionalHeadersIsNotInArrayIfEmpty\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testProxyBaseUrlIsAvailableIfSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testSpecifiedStatusIsAvailableInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testStatusMessageIsAvailableInArrayIfSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testStatusMessageIsNotAvailableInArrayIfNotSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\ValueMatchingStrategyTest\:\:testMatchingStrategyAndMatchedValueAreInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/ValueMatchingStrategyTest.php
+
+ -
+ message: '#^Access to an undefined property Phake\\Proxies\\StubberProxy\:\:\$deserialize\.$#'
+ identifier: property.notFound
+ count: 2
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Access to an undefined property Phake\\Proxies\\StubberProxy\:\:\$serialize\.$#'
+ identifier: property.notFound
+ count: 4
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Call to an undefined method Phake\\Proxies\\StubberProxy\:\:build\(\)\.$#'
+ identifier: method.notFound
+ count: 5
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Call to an undefined method Phake\\Proxies\\StubberProxy\:\:deserialize\(\)\.$#'
+ identifier: method.notFound
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Call to an undefined method Phake\\Proxies\\StubberProxy\:\:getId\(\)\.$#'
+ identifier: method.notFound
+ count: 3
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Call to an undefined method Phake\\Proxies\\StubberProxy\:\:post\(\)\.$#'
+ identifier: method.notFound
+ count: 3
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Call to an undefined method Phake\\Proxies\\StubberProxy\:\:waitForServerToGive200\(\)\.$#'
+ identifier: method.notFound
+ count: 2
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Call to an undefined method Phake\\Proxies\\VerifierProxy\:\:post\(\)\.$#'
+ identifier: method.notFound
+ count: 2
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Call to an undefined method Phake\\Proxies\\VerifierProxy\:\:put\(\)\.$#'
+ identifier: method.notFound
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Call to an undefined method Phake\\Proxies\\VerifierProxy\:\:setId\(\)\.$#'
+ identifier: method.notFound
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Cannot call method build\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Cannot call method getBody\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 6
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Cannot call method getHeaders\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 8
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Cannot call method getRequest\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Cannot call method getStatus\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 20
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Cannot call method getUrlMatchingStrategy\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Cannot call method thenReturn\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 20
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Cannot call method willReturn\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:_testConvenienceMethodBuildsUrlEqualTo\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:_testConvenienceMethodBuildsUrlEqualTo\(\) has parameter \$method with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:_testConvenienceMethodBuildsUrlEqualTo\(\) has parameter \$url with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testAnyWithUrlTreatedAsUrlEqualTo\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testApiIsAliveIfServerReturns200\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testApiIsNotAliveIfServerDoesNotReturn200\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testBadRequestEntityIsConvenienceForResponseWith422Status\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testBadRequestIsConvenienceForResponseWith400Status\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testCreatedIsConvenienceForResponseWith201Status\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testDeleteWithUrlTreatedAsUrlEqualTo\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testEditingStubWithoutAnIdThrowsException\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testEditingStubsPutsJsonSerialisedObjectAtUrlWithIdToWireMock\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testForbiddenIsConvenienceForResponseWith403Status\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testGetWithUrlTreatedAsUrlEqualTo\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testHeadWithUrlTreatedAsUrlEqualTo\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testJsonResponseIsConvenienceForResponseWithStatusBodyAndJsonContentType\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testNoContentIsConvenienceForResponseWith204Status\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testNotFoundIsConvenienceForResponseWith404Status\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testOkForContentTypeIsConvenienceForResponseWith200StatusWithContentType\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testOkIsConvenienceForResponseWith200Status\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testOkJsonIsConvenienceForResponseWith200StatusWithJsonContentType\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testOkTextXmlIsConvenienceForResponseWith200StatusWithTextXmlContentType\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testOkWithBodyIsConvenienceForResponseWith200StatusWithBody\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testOkXmlIsConvenienceForResponseWith200StatusWithAppXmlContentType\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testOptionsWithUrlTreatedAsUrlEqualTo\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testPatchWithUrlTreatedAsUrlEqualTo\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testPermanentRedirectIsConvenienceForResponseWith301StatusAndLocationHeader\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testPostWithUrlTreatedAsUrlEqualTo\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testProxyToAllIsConvenienceMethodForProxyingAnyToUrl\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testSeeOtherIsConvenienceForResponseWith303StatusAndLocationHeader\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testServerErrorIsConvenienceForResponseWith500Status\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testServiceUnavailableIsConvenienceForResponseWith503Status\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testStatusIsConvenienceForResponseWithSpecifiedStatus\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testStubbingAddsReturnedIdToStubMappingObject\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testStubbingPostsJsonSerialisedObjectToWireMock\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testTemporaryRedirectIsConvenienceForResponseWith302StatusAndLocationHeader\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testTraceWithUrlTreatedAsUrlEqualTo\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testUnauthorizedIsConvenienceForResponseWith401Status\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Method WireMock\\Client\\WireMockTest\:\:testVerifyingPostsJsonSerialisedObjectToWireMock\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Parameter \#1 \$exception of method PHPUnit\\Framework\\TestCase\:\:expectException\(\) expects class\-string\, string given\.$#'
+ identifier: argument.type
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Parameter \#1 \$mock of static method Phake\:\:verify\(\) expects Phake\\IMock, WireMock\\Client\\Curl given\.$#'
+ identifier: argument.type
+ count: 3
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Parameter \#1 \$mock of static method Phake\:\:when\(\) expects Phake\\IMock, WireMock\\Client\\Curl given\.$#'
+ identifier: argument.type
+ count: 3
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Parameter \#1 \$mock of static method Phake\:\:when\(\) expects Phake\\IMock, WireMock\\Client\\HttpWait given\.$#'
+ identifier: argument.type
+ count: 2
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Parameter \#1 \$mock of static method Phake\:\:when\(\) expects Phake\\IMock, WireMock\\Serde\\Serializer given\.$#'
+ identifier: argument.type
+ count: 7
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Parameter \#2 \$matchingValue of class WireMock\\Matching\\UrlMatchingStrategy constructor expects string, mixed given\.$#'
+ identifier: argument.type
+ count: 1
+ path: test/WireMock/Client/WireMockTest.php
+
+ -
+ message: '#^Cannot call method getChunkedDribbleDelay\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getFault\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getFixedDelayMillis\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getRandomDelayDistribution\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 3
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getResponse\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 6
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\FaultsAndDelaysIntegrationTest\:\:_testFaultCanBeStubbed\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\FaultsAndDelaysIntegrationTest\:\:_testFaultCanBeStubbed\(\) has parameter \$fault with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\FaultsAndDelaysIntegrationTest\:\:testChunkedDribbleDelayOnStubbedResponseCanBeSpecified\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\FaultsAndDelaysIntegrationTest\:\:testConnectionResetByPeerThenCloseFaultCanBeStubbed\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\FaultsAndDelaysIntegrationTest\:\:testEmptyResponseFaultCanBeStubbed\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\FaultsAndDelaysIntegrationTest\:\:testFixedDelayOnStubbedResponseCanBeSpecified\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\FaultsAndDelaysIntegrationTest\:\:testGlobalFixedDelayOnStubbedResponsesCanBeSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\FaultsAndDelaysIntegrationTest\:\:testGlobalRandomDelayOnStubbedResponsesCanBeSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\FaultsAndDelaysIntegrationTest\:\:testLogNormalDelayOnStubbedResponseCanBeSpecified\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\FaultsAndDelaysIntegrationTest\:\:testMalformedResponseChunkFaultCanBeStubbed\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\FaultsAndDelaysIntegrationTest\:\:testRandomDataThenCloseFaultCanBeStubbed\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\FaultsAndDelaysIntegrationTest\:\:testRandomDelayOnStubbedResponseCanBeSpecified\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\FaultsAndDelaysIntegrationTest\:\:testUniformDelayOnStubbedResponseCanBeSpecified\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Parameter \#1 \$localStubMapping of function assertThatTheOnlyMappingPresentIs expects WireMock\\Stubbing\\StubMapping, mixed given\.$#'
+ identifier: argument.type
+ count: 6
+ path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+
+ -
+ message: '#^Cannot access offset 0 on mixed\.$#'
+ identifier: offsetAccess.nonOffsetAccessible
+ count: 1
+ path: test/WireMock/Integration/MappingsAssertionFunctions.php
+
+ -
+ message: '#^Function assertThatTheOnlyMappingPresentIs\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/MappingsAssertionFunctions.php
+
+ -
+ message: '#^Function assertThatThereAreNoMappings\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/MappingsAssertionFunctions.php
+
+ -
+ message: '#^Function getMappings\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/MappingsAssertionFunctions.php
+
+ -
+ message: '#^Parameter \#1 \$json of method WireMock\\Serde\\Serializer\:\:deserialize\(\) expects string, string\|false given\.$#'
+ identifier: argument.type
+ count: 1
+ path: test/WireMock/Integration/MappingsAssertionFunctions.php
+
+ -
+ message: '#^Cannot call method getId\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Integration/MappingsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\MappingsIntegrationTest\:\:testGettingSingleMappingRetrievesStubById\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/MappingsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\MappingsIntegrationTest\:\:testMappingListCanBeLimitedToMostRecent\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/MappingsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\MappingsIntegrationTest\:\:testMappingListCanBeOffsetToRetrieveOlderStubs\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/MappingsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\MappingsIntegrationTest\:\:testMappingListContainsStubsPreviouslyCreated\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/MappingsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\MappingsIntegrationTest\:\:testMappingsListIsEmptyIfNoStubsHaveBeenMade\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/MappingsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\MappingsIntegrationTest\:\:testStubsCanBeFoundByMetadata\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/MappingsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\MappingsIntegrationTest\:\:testStubsCanBeRemovedByMetadata\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/MappingsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\MappingsIntegrationTest\:\:testStubsNotMatchingMetadataAreNotFound\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/MappingsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\MappingsIntegrationTest\:\:testStubsNotMatchingMetadataAreNotRemoved\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/MappingsIntegrationTest.php
+
+ -
+ message: '#^Parameter \#1 \$id of method WireMock\\Client\\WireMock\:\:getSingleStubMapping\(\) expects string, mixed given\.$#'
+ identifier: argument.type
+ count: 1
+ path: test/WireMock/Integration/MappingsIntegrationTest.php
+
+ -
+ message: '#^Cannot access offset ''Content\-Disposition'' on mixed\.$#'
+ identifier: offsetAccess.nonOffsetAccessible
+ count: 1
+ path: test/WireMock/Integration/MultipartIntegrationTest.php
+
+ -
+ message: '#^Cannot access offset ''X\-Header'' on mixed\.$#'
+ identifier: offsetAccess.nonOffsetAccessible
+ count: 1
+ path: test/WireMock/Integration/MultipartIntegrationTest.php
+
+ -
+ message: '#^Cannot access offset 0 on mixed\.$#'
+ identifier: offsetAccess.nonOffsetAccessible
+ count: 7
+ path: test/WireMock/Integration/MultipartIntegrationTest.php
+
+ -
+ message: '#^Cannot access offset 1 on mixed\.$#'
+ identifier: offsetAccess.nonOffsetAccessible
+ count: 1
+ path: test/WireMock/Integration/MultipartIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getBodyPatterns\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 2
+ path: test/WireMock/Integration/MultipartIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getHeaders\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 2
+ path: test/WireMock/Integration/MultipartIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getMatchingType\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 2
+ path: test/WireMock/Integration/MultipartIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getMultipartPatterns\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 6
+ path: test/WireMock/Integration/MultipartIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getRequest\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 6
+ path: test/WireMock/Integration/MultipartIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\MultipartIntegrationTest\:\:testMultipartMatchingTypeCanBetSetToAll\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/MultipartIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\MultipartIntegrationTest\:\:testMultipartMatchingTypeDefaultsToAny\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/MultipartIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\MultipartIntegrationTest\:\:testMultipartWithHeaderCanBeRegistered\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/MultipartIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\MultipartIntegrationTest\:\:testMultipartWithNameCanBeRegistered\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/MultipartIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\MultipartIntegrationTest\:\:testSimpleMultipartStubCanBeRegistered\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/MultipartIntegrationTest.php
+
+ -
+ message: '#^Parameter \#1 \$localStubMapping of function assertThatTheOnlyMappingPresentIs expects WireMock\\Stubbing\\StubMapping, mixed given\.$#'
+ identifier: argument.type
+ count: 5
+ path: test/WireMock/Integration/MultipartIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\NearMissesIntegrationTest\:\:testFindNearMissesForAllUnmatched\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/NearMissesIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\NearMissesIntegrationTest\:\:testFindNearMissesForLoggedRequest\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/NearMissesIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\NearMissesIntegrationTest\:\:testFindNearMissesForRequestPattern\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/NearMissesIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getAdditionalProxyRequestHeaders\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Integration/ProxyingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getProxyBaseUrl\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Integration/ProxyingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getProxyUrlPrefixToRemove\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Integration/ProxyingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getResponse\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 3
+ path: test/WireMock/Integration/ProxyingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\ProxyingIntegrationTest\:\:testAdditionProxiedRequestHeadersCanBeSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/ProxyingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\ProxyingIntegrationTest\:\:testProxyBaseUrlOfStubCanBeSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/ProxyingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\ProxyingIntegrationTest\:\:testProxyUrlPrefixToRemoveCanBeSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/ProxyingIntegrationTest.php
+
+ -
+ message: '#^Parameter \#1 \$localStubMapping of function assertThatTheOnlyMappingPresentIs expects WireMock\\Stubbing\\StubMapping, mixed given\.$#'
+ identifier: argument.type
+ count: 3
+ path: test/WireMock/Integration/ProxyingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method isAlive\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 2
+ path: test/WireMock/Integration/RecordingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RecordingIntegrationTest\:\:testPreviouslyIssuedRequestsCanBeSnapshotted\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RecordingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RecordingIntegrationTest\:\:testPreviouslyIssuedRequestsMatchingRecordingSpecCanBeSnapshotted\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RecordingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RecordingIntegrationTest\:\:testRecordedMappingsCanBeExcludedById\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RecordingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RecordingIntegrationTest\:\:testRecordedMappingsCanBeRequestedById\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RecordingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RecordingIntegrationTest\:\:testRecordedRequestsAreReturnedWhenStopping\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RecordingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RecordingIntegrationTest\:\:testRecordedRequestsMatchingRecordingSpecAreReturnedWhenStopping\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RecordingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RecordingIntegrationTest\:\:testRecordingCanBeStarted\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RecordingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RecordingIntegrationTest\:\:testRecordingCanBeStopped\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RecordingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RecordingIntegrationTest\:\:testRecordingStatusDefaultsToNeverStarted\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RecordingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RecordingIntegrationTest\:\:testSnapshotRecordingWithIdsOutputFormat\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RecordingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RecordingIntegrationTest\:\:testStartAndStopRecordingWithIdsOutputFormat\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RecordingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RecordingIntegrationTest\:\:testStartingRecordCanRecordNonProxiedRequestsIfAllowed\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RecordingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RecordingIntegrationTest\:\:testStartingRecordDoesNotRecordNonProxiedRequestsByDefault\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RecordingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RecordingIntegrationTest\:\:testStoppingRecordingBeforeStartingThrowsException\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RecordingIntegrationTest.php
+
+ -
+ message: '#^Static property WireMock\\Integration\\RecordingIntegrationTest\:\:\$_wireMock2 \(WireMock\\Client\\WireMock\) does not accept mixed\.$#'
+ identifier: assign.propertyType
+ count: 1
+ path: test/WireMock/Integration/RecordingIntegrationTest.php
+
+ -
+ message: '#^Static property WireMock\\Integration\\WireMockIntegrationTest\:\:\$_wireMock \(WireMock\\Client\\WireMock\) does not accept mixed\.$#'
+ identifier: assign.propertyType
+ count: 1
+ path: test/WireMock/Integration/RecordingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getId\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Integration/RequestsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RequestsIntegrationTest\:\:testFindingAllRequestsReturnsMatchingRequestDetails\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RequestsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RequestsIntegrationTest\:\:testGettingAllServeEventsCanBeLimited\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RequestsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RequestsIntegrationTest\:\:testGettingAllServeEventsCanBePaginatedWithServeEventQuery\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RequestsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RequestsIntegrationTest\:\:testGettingAllServeEventsReturnsAllRequestDetails\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RequestsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RequestsIntegrationTest\:\:testGettingAllServeEventsSinceATime\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RequestsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RequestsIntegrationTest\:\:testGettingServeEventsForStub\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RequestsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RequestsIntegrationTest\:\:testGettingUnmatchedRequests\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RequestsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RequestsIntegrationTest\:\:testGettingUnmatchedServeEvents\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RequestsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RequestsIntegrationTest\:\:testRemoveEventsByStubMetadataRemovesMatchingRequestsFromTheJournal\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RequestsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RequestsIntegrationTest\:\:testRemovingServeEventRemovesRequestByIdFromTheJournal\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RequestsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RequestsIntegrationTest\:\:testRemovingServeEventsRemovesRequestsByMatcherFromTheJournal\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RequestsIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\RequestsIntegrationTest\:\:testResettingAllRequestsRemovesPreviousRequestsFromTheJournal\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/RequestsIntegrationTest.php
+
+ -
+ message: '#^Parameter \#1 \$stubId of static method WireMock\\Client\\ServeEventQuery\:\:forStubMapping\(\) expects string, mixed given\.$#'
+ identifier: argument.type
+ count: 1
+ path: test/WireMock/Integration/RequestsIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getNewScenarioState\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Integration/ScenarioIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getRequiredScenarioState\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Integration/ScenarioIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getScenarioName\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Integration/ScenarioIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\ScenarioIntegrationTest\:\:testGettingScenarios\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/ScenarioIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\ScenarioIntegrationTest\:\:testNewScenarioStateOfStubCanBeSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/ScenarioIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\ScenarioIntegrationTest\:\:testRequiredScenarioStateOfStubCanBeSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/ScenarioIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\ScenarioIntegrationTest\:\:testScenarioNameOfStubCanBeSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/ScenarioIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\ScenarioIntegrationTest\:\:testScenarioStateCanBeSetDirectly\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/ScenarioIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\ScenarioIntegrationTest\:\:testScenariosCanBeReset\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/ScenarioIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\ScenarioIntegrationTest\:\:testSingleScenarioCanBeReset\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/ScenarioIntegrationTest.php
+
+ -
+ message: '#^Parameter \#1 \$localStubMapping of function assertThatTheOnlyMappingPresentIs expects WireMock\\Stubbing\\StubMapping, mixed given\.$#'
+ identifier: argument.type
+ count: 3
+ path: test/WireMock/Integration/ScenarioIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\ShutdownIntegrationTest\:\:testShutdownTerminatesStandaloneServer\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/ShutdownIntegrationTest.php
+
+ -
+ message: '#^Cannot access offset ''X\-Munged\-Date'' on mixed\.$#'
+ identifier: offsetAccess.nonOffsetAccessible
+ count: 4
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot access offset 0 on mixed\.$#'
+ identifier: offsetAccess.nonOffsetAccessible
+ count: 3
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getBodyPatterns\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 4
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getCustomMatcher\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 2
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getHeaders\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 7
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getId\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getMatchingType\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getMatchingValue\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 5
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getMetadata\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getName\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 2
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getParameters\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 2
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getRequest\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 20
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getResponse\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 6
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getTransformerParameters\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 2
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getTransformers\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 2
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method getUrlMatchingStrategy\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 7
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method reset\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method resetToDefault\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Cannot call method stubFor\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 2
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testAbsentCookiesCanBeMatched\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testAbsentHeadersCanBeMatched\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testAbsentQueryParamsCanBeMatched\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testCookiesCanBeMatched\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testHeadersCanBeMatched\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testHeadersCanBeStubbed\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testMappingsCanBeReset\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testMappingsCanBeResetToDefault\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testMultivalueHeadersCanBeStubbed\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testQueryParamsCanBeMatched\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testRequestCanBeMatchedByUrlPathEquality\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testRequestUrlAndBodyFileCanBeStubbed\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testRequestUrlCanBeMatchedByRegex\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testRequestUrlCanByMatchedAsAnyUrl\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testRequestUrlPathCanBeMatchedByRegex\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testRequestWithBinaryBodyCanBeStubbed\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testRequestWithUrlAndStringBodyCanBeStubbed\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponseCanBeStubbedByBasicAuthMatching\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponseCanBeStubbedByBodyContaining\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponseCanBeStubbedByBodyEqualingJson\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponseCanBeStubbedByBodyJsonPath\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponseCanBeStubbedByBodyMatching\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponseCanBeStubbedByBodyNotContaining\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponseCanBeStubbedByDateTimeMatcherWithActualFormat\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponseCanBeStubbedByDateTimeMatcherWithTruncatedActual\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponseCanBeStubbedByDateTimeMatcherWithTruncatedExpected\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponseCanBeStubbedByLogicalAndOfChainedMatchers\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponseCanBeStubbedByLogicalAndOfMatchersFromStaticMethod\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponseCanBeStubbedByLogicalOrOfChainedMatchers\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponseCanBeStubbedByLogicalOrOfMatchersFromStaticMethod\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponseTransformerAndParameterCanBeSetOnStubInOneGo\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponseTransformerParametersCanBeSetOnStub\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponseTransformersCanBeSetOnStub\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponsesCanBeStubbedByAfterLiteralMatcher\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponsesCanBeStubbedByAfterNowMatcher\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponsesCanBeStubbedByBeforeLiteralMatcher\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponsesCanBeStubbedByBeforeNowMatcher\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponsesCanBeStubbedByBodyXPath\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponsesCanBeStubbedByBodyXPathWithACombinedMatcher\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponsesCanBeStubbedByBodyXPathWithNamespace\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponsesCanBeStubbedByBodyXml\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponsesCanBeStubbedByBodyXmlExemptingSpecificComparisonTypes\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponsesCanBeStubbedByBodyXmlWithPlaceholders\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponsesCanBeStubbedByBodyXmlWithPlaceholdersAndCustomDelimiters\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponsesCanBeStubbedByDateTimeMatcherWithOffset\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponsesCanBeStubbedByDateTimeMatcherWithOffsetInStringSpec\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponsesCanBeStubbedByEqualToDateTimeLiteralMatcher\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponsesCanBeStubbedByHostMatching\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testResponsesCanBeStubbedByIsNowMatcher\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStatusCanBeStubbed\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStatusMessageCanBeStubbed\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubAttributesCanBeMatchedByBase64BinaryEquality\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubAttributesCanBeMatchedByCaseInsensitiveEquality\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubIdCanBeSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubIdIsReturnedInResponseHeader\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubImportCanBeSetToIgnoreDuplicates\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubImportCanBeSetToReplaceAnyExistingStubs\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubImportLeavesExistingStubsInPlaceByDefault\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubImportOverwritesStubsByDefault\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubImportWithMalformedIdThrowsExceptionFromWiremock\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubNameCanBeSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubNameIsReturnedInResponseHeader\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubPriorityCanBeSet\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubsCanBeCreatedWithCustomMatchers\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubsCanBeCreatedWithMetadataAttached\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubsCanBeCreatedWithStandardMatchersCombinedWithCustomMatchers\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubsCanBeEdited\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubsCanBeImmediatelyPersisted\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubsCanBeImported\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubsCanBeIndividuallyDeleted\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\StubbingIntegrationTest\:\:testStubsCanBeSaved\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Parameter \#1 \$id of method WireMock\\Client\\WireMock\:\:removeStub\(\) expects string, mixed given\.$#'
+ identifier: argument.type
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Parameter \#1 \$localStubMapping of function assertThatTheOnlyMappingPresentIs expects WireMock\\Stubbing\\StubMapping, mixed given\.$#'
+ identifier: argument.type
+ count: 61
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Parameter \#1 \$objectOrValue of method ReflectionProperty\:\:setValue\(\) expects object\|null, mixed given\.$#'
+ identifier: argument.type
+ count: 7
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Parameter \#2 \$array of function array_map expects array, mixed given\.$#'
+ identifier: argument.type
+ count: 3
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Parameter \#2 \$valueMatchingStrategy of method WireMock\\Client\\MappingBuilder\:\:withHeader\(\) expects WireMock\\Client\\ValueMatchingStrategy, mixed given\.$#'
+ identifier: argument.type
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Parameter \#2 \$valueMatchingStrategy of method WireMock\\Client\\MappingBuilder\:\:withQueryParam\(\) expects WireMock\\Client\\ValueMatchingStrategy, mixed given\.$#'
+ identifier: argument.type
+ count: 1
+ path: test/WireMock/Integration/StubbingIntegrationTest.php
+
+ -
+ message: '#^Binary operation "\." between ''/'' and mixed results in an error\.$#'
+ identifier: binaryOp.invalid
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Method WireMock\\Integration\\TestClient\:\:__construct\(\) has parameter \$_hostname with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Method WireMock\\Integration\\TestClient\:\:__construct\(\) has parameter \$_port with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Method WireMock\\Integration\\TestClient\:\:_makeTimedRequest\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Method WireMock\\Integration\\TestClient\:\:_makeTimedRequest\(\) has parameter \$ch with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Method WireMock\\Integration\\TestClient\:\:_makeUrl\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Method WireMock\\Integration\\TestClient\:\:_makeUrl\(\) has parameter \$path with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Method WireMock\\Integration\\TestClient\:\:get\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Method WireMock\\Integration\\TestClient\:\:get\(\) has parameter \$headers with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Method WireMock\\Integration\\TestClient\:\:get\(\) has parameter \$includeResponseHeaders with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Method WireMock\\Integration\\TestClient\:\:get\(\) has parameter \$path with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Method WireMock\\Integration\\TestClient\:\:getLastRequestTimeMillis\(\) should return float\|null but returns mixed\.$#'
+ identifier: return.type
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Method WireMock\\Integration\\TestClient\:\:post\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Method WireMock\\Integration\\TestClient\:\:post\(\) has parameter \$body with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Method WireMock\\Integration\\TestClient\:\:post\(\) has parameter \$path with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Parameter \#1 \$ch of function curl_exec expects resource, mixed given\.$#'
+ identifier: argument.type
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Parameter \#1 \$haystack of function strpos expects string, mixed given\.$#'
+ identifier: argument.type
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Parameter \#1 \$url of function curl_init expects string, mixed given\.$#'
+ identifier: argument.type
+ count: 2
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Parameter \#3 \$value of function curl_setopt expects array\, array given\.$#'
+ identifier: argument.type
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Parameter \#3 \$value of function curl_setopt expects array\|string, mixed given\.$#'
+ identifier: argument.type
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Part \$path \(mixed\) of encapsed string cannot be cast to string\.$#'
+ identifier: encapsedStringPart.nonString
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Part \$this\-\>_hostname \(mixed\) of encapsed string cannot be cast to string\.$#'
+ identifier: encapsedStringPart.nonString
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Part \$this\-\>_port \(mixed\) of encapsed string cannot be cast to string\.$#'
+ identifier: encapsedStringPart.nonString
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Property WireMock\\Integration\\TestClient\:\:\$_hostname has no type specified\.$#'
+ identifier: missingType.property
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Property WireMock\\Integration\\TestClient\:\:\$_lastRequestTimeMillis has no type specified\.$#'
+ identifier: missingType.property
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Property WireMock\\Integration\\TestClient\:\:\$_port has no type specified\.$#'
+ identifier: missingType.property
+ count: 1
+ path: test/WireMock/Integration/TestClient.php
+
+ -
+ message: '#^Cannot use \+\+ on mixed\.$#'
+ identifier: postInc.type
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\VerificationIntegrationTest\:\:testCanVerifyASpecificNumberOfRequestsOccurred\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\VerificationIntegrationTest\:\:testCanVerifyAsComparisonOperator\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\VerificationIntegrationTest\:\:testCanVerifyRequestDoesNotHaveHeader\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\VerificationIntegrationTest\:\:testCanVerifyRequestHasBody\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\VerificationIntegrationTest\:\:testCanVerifyRequestHasHeader\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\VerificationIntegrationTest\:\:testCanVerifyRequestWithQuery\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\VerificationIntegrationTest\:\:testCanVerifySimpleGetToUrl\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\VerificationIntegrationTest\:\:testVerifyingAbsenceOfPresentHeaderThrowsException\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\VerificationIntegrationTest\:\:testVerifyingRequestWithMissingHeaderThrowsException\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\VerificationIntegrationTest\:\:testVerifyingRequestWithMissingQueryThrowsException\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\VerificationIntegrationTest\:\:testVerifyingUnrequestedUrlThrowsException\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\VerificationIntegrationTest\:\:testVerifyingWiremockUrlEqualThrowsException\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\VerificationIntegrationTest\:\:testVerifyingWrongNumberOfRequestsThrowsException\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\VerificationIntegrationTest\:\:testVerifyingZeroRequestsWhenSomeRequestsWereMadeThrowsException\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\VerificationIntegrationTest\:\:verify\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\VerificationIntegrationTest\:\:verify\(\) has parameter \$requestPatternBuilderOrCount with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Parameter \#1 \$count of method PHPUnit\\Framework\\TestCase\:\:addToAssertionCount\(\) expects int, mixed given\.$#'
+ identifier: argument.type
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Parameter \#1 \$exception of method PHPUnit\\Framework\\TestCase\:\:expectException\(\) expects class\-string\, string given\.$#'
+ identifier: argument.type
+ count: 7
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Parameter \#1 \$requestPatternBuilderOrCount of method WireMock\\Client\\WireMock\:\:verify\(\) expects int\|WireMock\\Client\\RequestPatternBuilder\|WireMock\\Verification\\CountMatchingStrategy, mixed given\.$#'
+ identifier: argument.type
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Property WireMock\\Integration\\VerificationIntegrationTest\:\:\$_verificationCount has no type specified\.$#'
+ identifier: missingType.property
+ count: 1
+ path: test/WireMock/Integration/VerificationIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\WebhookIntegrationTest\:\:testWebhookCallbackCanBeRegistered\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/WebhookIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\WebhookIntegrationTest\:\:testWebhookCallbackWithBase64Body\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/WebhookIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\WebhookIntegrationTest\:\:testWebhookCallbackWithFixedDelay\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/WebhookIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\WebhookIntegrationTest\:\:testWebhookCallbackWithTemplatingBasedOnExtraParameter\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/WebhookIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\WebhookIntegrationTest\:\:testWebhookCallbackWithUniformRandomDelay\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/WebhookIntegrationTest.php
+
+ -
+ message: '#^Parameter \#1 \$localStubMapping of function assertThatTheOnlyMappingPresentIs expects WireMock\\Stubbing\\StubMapping, mixed given\.$#'
+ identifier: argument.type
+ count: 5
+ path: test/WireMock/Integration/WebhookIntegrationTest.php
+
+ -
+ message: '#^Cannot call method isAlive\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Integration/WireMockIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\WireMockIntegrationTest\:\:clearMappings\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/WireMockIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\WireMockIntegrationTest\:\:runCmd\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/WireMockIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Integration\\WireMockIntegrationTest\:\:runCmd\(\) has parameter \$cmd with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Integration/WireMockIntegrationTest.php
+
+ -
+ message: '#^Part \$cmd \(mixed\) of encapsed string cannot be cast to string\.$#'
+ identifier: encapsedStringPart.nonString
+ count: 1
+ path: test/WireMock/Integration/WireMockIntegrationTest.php
+
+ -
+ message: '#^Static property WireMock\\Integration\\WireMockIntegrationTest\:\:\$_wireMock \(WireMock\\Client\\WireMock\) does not accept mixed\.$#'
+ identifier: assign.propertyType
+ count: 1
+ path: test/WireMock/Integration/WireMockIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Matching\\RequestPatternTest\:\:testMethodAndMatchingStategyAreAvailable\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Matching/RequestPatternTest.php
+
+ -
+ message: '#^Method WireMock\\Matching\\RequestPatternTest\:\:testQueryParamMatchersAreAvailable\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Matching/RequestPatternTest.php
+
+ -
+ message: '#^Method WireMock\\Matching\\RequestPatternTest\:\:testRequestBodyMatchersAreAvailable\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Matching/RequestPatternTest.php
+
+ -
+ message: '#^Method WireMock\\Matching\\RequestPatternTest\:\:testRequestCookieMatchersAreAvailable\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Matching/RequestPatternTest.php
+
+ -
+ message: '#^Method WireMock\\Matching\\RequestPatternTest\:\:testRequestHeaderMatchersAreAvailable\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Matching/RequestPatternTest.php
+
+ -
+ message: '#^Method WireMock\\Matching\\UrlMatchingStrategyTest\:\:testMatchingTypeAndMatchingValueAreAvailable\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Matching/UrlMatchingStrategyTest.php
+
+ -
+ message: '#^Cannot call method normalize\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Cannot call method serialize\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:testAutoRequestBodyPatternIsIncludedInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:testBinaryBodySizeExtractThresholdIsIncludedInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:testCaptureHeadersAreIncludedInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:testCaptureHeadersWithoutCaseInsensitiveAreSerializedToEmptyObject\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:testEqualToJsonRequestBodyPatternIsIncludedInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:testEqualToRequestBodyPatternIsIncludedInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:testEqualToXmlRequestBodyPatternIsIncludedInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:testIgnoringRepeatsIsIncludedInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:testPersistenceIsIncludedInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:testRequestIdsAreIncludedInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:testRequestPatternIsIncludedInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:testTargetIsIncludedInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:testTextBodySizeExtractThresholdIsIncludedInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:testTransformerParemetersAreIncludedInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:testTransformersAreIncludedInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:toArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:toArray\(\) has parameter \$obj with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Property WireMock\\Recording\\RecordSpecBuildTest\:\:\$_serializer has no type specified\.$#'
+ identifier: missingType.property
+ count: 1
+ path: test/WireMock/Recording/RecordSpecBuildTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:providerBadDeserializeValues\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:providerBadSerializeValues\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:providerSerializableOnlyValues\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:providerSerializableValues\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:testNormalizationAndDenormalization\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:testNormalizationAndDenormalization\(\) has parameter \$expectedNormalized with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:testNormalizationAndDenormalization\(\) has parameter \$explicitJson with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:testNormalizationAndDenormalization\(\) has parameter \$explicitType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:testNormalizationAndDenormalization\(\) has parameter \$value with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:testNormalizationOnly\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:testNormalizationOnly\(\) has parameter \$expectedNormalized with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:testNormalizationOnly\(\) has parameter \$value with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:testThrowsWhenDeserializing\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:testThrowsWhenDeserializing\(\) has parameter \$expectedNormalized with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:testThrowsWhenDeserializing\(\) has parameter \$explicitJson with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:testThrowsWhenDeserializing\(\) has parameter \$explicitType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:testThrowsWhenDeserializing\(\) has parameter \$value with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:testThrowsWhenNormalizing\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerIntegrationTest\:\:testThrowsWhenNormalizing\(\) has parameter \$value with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Parameter \#1 \$className of method WireMock\\Serde\\SerializerIntegrationTest\:\:serializerFor\(\) expects string, mixed given\.$#'
+ identifier: argument.type
+ count: 2
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Parameter \#1 \$json of method WireMock\\Serde\\Serializer\:\:deserialize\(\) expects string, mixed given\.$#'
+ identifier: argument.type
+ count: 2
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Parameter \#1 \$original of class WireMock\\Serde\\TestClasses\\UnwrappedAndNamedProperty constructor expects WireMock\\Serde\\TestClasses\\FieldOnlyPrimitives, mixed given\.$#'
+ identifier: argument.type
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Parameter \#1 \$primitiveTypes of class WireMock\\Serde\\TestClasses\\ClassTypeFields constructor expects WireMock\\Serde\\TestClasses\\FieldOnlyPrimitives, mixed given\.$#'
+ identifier: argument.type
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Parameter \#2 \$type of method WireMock\\Serde\\Serializer\:\:deserialize\(\) expects string, mixed given\.$#'
+ identifier: argument.type
+ count: 2
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Parameter \#2 \$unwrappedClass of class WireMock\\Serde\\TestClasses\\UnwrappedClassProperty constructor expects WireMock\\Serde\\TestClasses\\FieldOnlyPrimitives, mixed given\.$#'
+ identifier: argument.type
+ count: 1
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Variable \$explicitType on left side of \?\? is never defined\.$#'
+ identifier: nullCoalesce.variable
+ count: 2
+ path: test/WireMock/Serde/SerializerIntegrationTest.php
+
+ -
+ message: '#^Call to an undefined method Phake\\Proxies\\StubberProxy\:\:denormalize\(\)\.$#'
+ identifier: method.notFound
+ count: 1
+ path: test/WireMock/Serde/SerializerTest.php
+
+ -
+ message: '#^Call to an undefined method Phake\\Proxies\\StubberProxy\:\:normalize\(\)\.$#'
+ identifier: method.notFound
+ count: 3
+ path: test/WireMock/Serde/SerializerTest.php
+
+ -
+ message: '#^Cannot call method thenReturn\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 4
+ path: test/WireMock/Serde/SerializerTest.php
+
+ -
+ message: '#^Method JsonSerializable@anonymous/WireMock/Serde/SerializerTest\.php\:36\:\:jsonSerialize\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/SerializerTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerTest\:\:providerPrimitives\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/SerializerTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerTest\:\:testDenormalizingDelegatesToSerdeType\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/SerializerTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerTest\:\:testNormalizingArrayRecursivelyDenormalizesKeepingKeys\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/SerializerTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerTest\:\:testNormalizingObjectRegisteredInLookupDelegatesToSerdeTypeClass\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/SerializerTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerTest\:\:testNormalizingPrimitivesIsANoOp\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/SerializerTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerTest\:\:testNormalizingPrimitivesIsANoOp\(\) has parameter \$primitiveValue with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Serde/SerializerTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerializerTest\:\:testSerializingObjectNotInLookupObservesJsonSerializableInterface\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/SerializerTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\TestClasses\\CatchAllAndNamedByProperty\:\:possibleNames\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/TestClasses/CatchAllAndNamedByProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\CatchAllAndNamedByProperty\:\:\$namer is unused\.$#'
+ identifier: property.unused
+ count: 1
+ path: test/WireMock/Serde/TestClasses/CatchAllAndNamedByProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\CatchAllAndNamedByProperty\:\:\$prop is unused\.$#'
+ identifier: property.unused
+ count: 1
+ path: test/WireMock/Serde/TestClasses/CatchAllAndNamedByProperty.php
+
+ -
+ message: '#^Static method WireMock\\Serde\\TestClasses\\CatchAllAndNamedByProperty\:\:possibleNames\(\) is unused\.$#'
+ identifier: method.unused
+ count: 1
+ path: test/WireMock/Serde/TestClasses/CatchAllAndNamedByProperty.php
+
+ -
+ message: '#^Method WireMock\\Serde\\TestClasses\\CatchAllAndNamedProperty\:\:__construct\(\) has parameter \$original with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/TestClasses/CatchAllAndNamedProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\CatchAllAndNamedProperty\:\:\$original \(array\\) does not accept array\.$#'
+ identifier: assign.propertyType
+ count: 1
+ path: test/WireMock/Serde/TestClasses/CatchAllAndNamedProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\CatchAllAndNamedProperty\:\:\$original is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/CatchAllAndNamedProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\CatchAllAssocArrayProperty\:\:\$catchAll is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/CatchAllAssocArrayProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\CatchAllAssocArrayProperty\:\:\$topLevel is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/CatchAllAssocArrayProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\CatchAllTypedArrayProperty\:\:\$catchAll is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/CatchAllTypedArrayProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\CatchAllTypedArrayProperty\:\:\$topLevel is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/CatchAllTypedArrayProperty.php
+
+ -
+ message: '#^Method WireMock\\Serde\\TestClasses\\CatchAllUntypedArrayProperty\:\:__construct\(\) has parameter \$catchAll with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/TestClasses/CatchAllUntypedArrayProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\CatchAllUntypedArrayProperty\:\:\$catchAll is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/CatchAllUntypedArrayProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\CatchAllUntypedArrayProperty\:\:\$catchAll type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/TestClasses/CatchAllUntypedArrayProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\CatchAllUntypedArrayProperty\:\:\$topLevel is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/CatchAllUntypedArrayProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\ClassTypeFields\:\:\$primitiveTypes is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/ClassTypeFields.php
+
+ -
+ message: '#^Constructor of class WireMock\\Serde\\TestClasses\\ConstructorParams has an unused parameter \$ignoredParam\.$#'
+ identifier: constructor.unusedParameter
+ count: 1
+ path: test/WireMock/Serde/TestClasses/ConstructorParams.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\ConstructorParams\:\:\$fieldWithConstructorParam is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/ConstructorParams.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\ConstructorParams\:\:\$fieldWithOptionalConstructorParam is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/ConstructorParams.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\DefaultedField\:\:\$defaulted is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/DefaultedField.php
+
+ -
+ message: '#^Method WireMock\\Serde\\TestClasses\\DiscriminatedTypeParent\:\:getDiscriminatorMapping\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/TestClasses/DiscriminatedTypeParent.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\DiscriminatedTypeParent\:\:\$type is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/DiscriminatedTypeParent.php
+
+ -
+ message: '#^Static method WireMock\\Serde\\TestClasses\\DiscriminatedTypeParent\:\:getDiscriminatorMapping\(\) is unused\.$#'
+ identifier: method.unused
+ count: 1
+ path: test/WireMock/Serde/TestClasses/DiscriminatedTypeParent.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\DiscriminatedTypeSubclassA\:\:\$subclassAProp is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/DiscriminatedTypeSubclassA.php
+
+ -
+ message: '#^Method WireMock\\Serde\\TestClasses\\DiscriminatedTypeSubclassB\:\:__construct\(\) has parameter \$subclassBProp with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/TestClasses/DiscriminatedTypeSubclassB.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\DiscriminatedTypeSubclassB\:\:\$subclassBProp is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/DiscriminatedTypeSubclassB.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\DiscriminatedTypeSubclassB\:\:\$subclassBProp type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/TestClasses/DiscriminatedTypeSubclassB.php
+
+ -
+ message: '#^Method WireMock\\Serde\\TestClasses\\FieldOnlyPrimitives\:\:create\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/TestClasses/FieldOnlyPrimitives.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\FieldOnlyPrimitives\:\:\$bool is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/FieldOnlyPrimitives.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\FieldOnlyPrimitives\:\:\$float is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/FieldOnlyPrimitives.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\FieldOnlyPrimitives\:\:\$int is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/FieldOnlyPrimitives.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\FieldOnlyPrimitives\:\:\$string is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/FieldOnlyPrimitives.php
+
+ -
+ message: '#^Method WireMock\\Serde\\TestClasses\\NamedByProperty\:\:names\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/TestClasses/NamedByProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\NamedByProperty\:\:\$value is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/NamedByProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\NamedByProperty\:\:\$valueName is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/NamedByProperty.php
+
+ -
+ message: '#^Static method WireMock\\Serde\\TestClasses\\NamedByProperty\:\:names\(\) is unused\.$#'
+ identifier: method.unused
+ count: 1
+ path: test/WireMock/Serde/TestClasses/NamedByProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\NamedProperty\:\:\$originalName is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/NamedProperty.php
+
+ -
+ message: '#^Method WireMock\\Serde\\TestClasses\\PrimitiveArrayFields\:\:__construct\(\) has parameter \$intArray with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/TestClasses/PrimitiveArrayFields.php
+
+ -
+ message: '#^Method WireMock\\Serde\\TestClasses\\PrimitiveArrayFields\:\:__construct\(\) has parameter \$intByString with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/TestClasses/PrimitiveArrayFields.php
+
+ -
+ message: '#^Method WireMock\\Serde\\TestClasses\\PrimitiveArrayFields\:\:__construct\(\) has parameter \$untypedArray with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/TestClasses/PrimitiveArrayFields.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\PrimitiveArrayFields\:\:\$intArray \(array\\) does not accept array\.$#'
+ identifier: assign.propertyType
+ count: 1
+ path: test/WireMock/Serde/TestClasses/PrimitiveArrayFields.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\PrimitiveArrayFields\:\:\$intArray is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/PrimitiveArrayFields.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\PrimitiveArrayFields\:\:\$intByString \(array\\) does not accept array\.$#'
+ identifier: assign.propertyType
+ count: 1
+ path: test/WireMock/Serde/TestClasses/PrimitiveArrayFields.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\PrimitiveArrayFields\:\:\$intByString is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/PrimitiveArrayFields.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\PrimitiveArrayFields\:\:\$untypedArray is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/PrimitiveArrayFields.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\PrimitiveArrayFields\:\:\$untypedArray type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/TestClasses/PrimitiveArrayFields.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\UnionTypeFields\:\:\$arrayOfUnion is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/UnionTypeFields.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\UnionTypeFields\:\:\$arrayUnion is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/UnionTypeFields.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\UnionTypeFields\:\:\$classUnion is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/UnionTypeFields.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\UnionTypeFields\:\:\$primitivesUnion is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/UnionTypeFields.php
+
+ -
+ message: '#^Method WireMock\\Serde\\TestClasses\\UnwrappedAndNamedByProperty\:\:possibleNames\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/TestClasses/UnwrappedAndNamedByProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\UnwrappedAndNamedByProperty\:\:\$namer is unused\.$#'
+ identifier: property.unused
+ count: 1
+ path: test/WireMock/Serde/TestClasses/UnwrappedAndNamedByProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\UnwrappedAndNamedByProperty\:\:\$prop is unused\.$#'
+ identifier: property.unused
+ count: 1
+ path: test/WireMock/Serde/TestClasses/UnwrappedAndNamedByProperty.php
+
+ -
+ message: '#^Static method WireMock\\Serde\\TestClasses\\UnwrappedAndNamedByProperty\:\:possibleNames\(\) is unused\.$#'
+ identifier: method.unused
+ count: 1
+ path: test/WireMock/Serde/TestClasses/UnwrappedAndNamedByProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\UnwrappedAndNamedProperty\:\:\$original is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/UnwrappedAndNamedProperty.php
+
+ -
+ message: '#^Method WireMock\\Serde\\TestClasses\\UnwrappedArrayProperty\:\:__construct\(\) has parameter \$unwrappedArray with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/TestClasses/UnwrappedArrayProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\UnwrappedArrayProperty\:\:\$unwrappedArray \(array\\) does not accept array\.$#'
+ identifier: assign.propertyType
+ count: 1
+ path: test/WireMock/Serde/TestClasses/UnwrappedArrayProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\UnwrappedArrayProperty\:\:\$unwrappedArray is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/UnwrappedArrayProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\UnwrappedClassProperty\:\:\$topLevel is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/UnwrappedClassProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\UnwrappedClassProperty\:\:\$unwrappedClass is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/UnwrappedClassProperty.php
+
+ -
+ message: '#^Property WireMock\\Serde\\TestClasses\\UnwrappedPrimitiveProperty\:\:\$unwrappedPrimitive is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Serde/TestClasses/UnwrappedPrimitiveProperty.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArray@anonymous/WireMock/Serde/Type/SerdeTypeArrayTest\.php\:14\:\:denormalizeFromArray\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypeArrayTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArray@anonymous/WireMock/Serde/Type/SerdeTypeArrayTest\.php\:14\:\:denormalizeFromArray\(\) has parameter \$path with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypeArrayTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArray@anonymous/WireMock/Serde/Type/SerdeTypeArrayTest\.php\:14\:\:denormalizeFromArray\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypeArrayTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArrayTest\:\:providerNonArrayData\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypeArrayTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArrayTest\:\:testDenormalizingNonArrayThrows\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypeArrayTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArrayTest\:\:testDenormalizingNonArrayThrows\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypeArrayTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeNullTest\:\:providerNonNullData\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypeNullTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeNullTest\:\:testDenormalizesNullToNull\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypeNullTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeNullTest\:\:testDenormalizingNonNullThrows\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypeNullTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeNullTest\:\:testDenormalizingNonNullThrows\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypeNullTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypePrimitiveTest\:\:providerMatchedTypeAndData\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypePrimitiveTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypePrimitiveTest\:\:providerMismatchedTypeAndData\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypePrimitiveTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypePrimitiveTest\:\:testDenormalizingArrayDataThrows\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypePrimitiveTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypePrimitiveTest\:\:testDenormalizingCorrectTypeDataIsANoOp\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypePrimitiveTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypePrimitiveTest\:\:testDenormalizingCorrectTypeDataIsANoOp\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypePrimitiveTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypePrimitiveTest\:\:testDenormalizingMismatchedTypeDataThrows\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypePrimitiveTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypePrimitiveTest\:\:testDenormalizingMismatchedTypeDataThrows\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypePrimitiveTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypePrimitiveTest\:\:testDenormalizingNullDataThrows\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypePrimitiveTest.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypePrimitiveTest\:\:testDenormalizingObjectDataThrows\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Serde/Type/SerdeTypePrimitiveTest.php
+
+ -
+ message: '#^Binary operation "\." between ''\?'' and mixed results in an error\.$#'
+ identifier: binaryOp.invalid
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Binary operation "\." between ''null\|'' and mixed results in an error\.$#'
+ identifier: binaryOp.invalid
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Binary operation "\." between mixed and ''\[\]'' results in an error\.$#'
+ identifier: binaryOp.invalid
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Binary operation "\." between mixed and ''\|null'' results in an error\.$#'
+ identifier: binaryOp.invalid
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:providerArrayKeyTypes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:providerOtherPrimitiveTypes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:providerPrimitiveAssocArrayTypes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:providerPrimitiveTypes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:providerUnsupportedTypes\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingArrayOfClass\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingArrayOfClassAddsClassToLookupAsRootType\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingArrayOfPrimitives\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingArrayOfPrimitives\(\) has parameter \$inputType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingArrayOfPrimitives\(\) has parameter \$outputType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingArrayOfUnion\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingAssocArrayOfPrimitives\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingAssocArrayOfPrimitives\(\) has parameter \$keyInputType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingAssocArrayOfPrimitives\(\) has parameter \$keyOutputType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingAssocArrayOfPrimitives\(\) has parameter \$valueInputType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingAssocArrayOfPrimitives\(\) has parameter \$valueOutputType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingAssocArrayWithBadPrimitiveKeyTypeIsNotSupported\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingAssocArrayWithBadPrimitiveKeyTypeIsNotSupported\(\) has parameter \$keyInputType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingAssocArrayWithClassValues\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingAssocArrayWithClassValuesAddsClassToLookupAsRootType\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingAssocArrayWithNonPrimitiveKeyTypeIsNotSupported\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingAssocArrayWithNonPrimitiveKeyTypeIsNotSupported\(\) has parameter \$keyInputType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingAssocArrayWithUnionValues\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingClassAddsClassTypesOfPropertiesToLookupAsNonRootType\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingClassAddsTypeToLookupAsRootType\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingClassWithPrimitiveTypeCatchAllThrowsException\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingDiscriminatedTypeAddsPossibleSubclassesToLookupAsRootTypes\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingKitchenSinkClass\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingNull\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingPrimitive\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingPrimitive\(\) has parameter \$inputType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingPrimitive\(\) has parameter \$outputType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingQuestionMarkNullableClass\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingQuestionMarkNullableNullIsNotSupported\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingQuestionMarkNullablePrimitive\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingQuestionMarkNullablePrimitive\(\) has parameter \$inputType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingQuestionMarkNullablePrimitive\(\) has parameter \$outputType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingQuestionMarkNullableUnionIsNotSupported\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingQuestionMarkNullableUntypedArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingUnionIncludingClass\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingUnionIncludingClassAddsClassToLookupAsRootType\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingUnionNullableAfterPrimitive\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingUnionNullableAfterPrimitive\(\) has parameter \$inputType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingUnionNullableAfterPrimitive\(\) has parameter \$outputType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingUnionNullableBeforePrimitive\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingUnionNullableBeforePrimitive\(\) has parameter \$inputType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingUnionNullableBeforePrimitive\(\) has parameter \$outputType with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingUnionOfPrimitivesAndNull\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingUnionWithAssocArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingUnionWithDuplicatedTypes\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingUnionWithMultipleArrayTypesIsNotSupported\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingUnionWithTypedArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingUnionWithUntypedArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingUnsupportedTypes\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingUnsupportedTypes\(\) has parameter \$type with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:testParsingUntypedArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Parameter \#1 \$type of method WireMock\\SerdeGen\\SerdeTypeParser\:\:parseTypeString\(\) expects string, mixed given\.$#'
+ identifier: argument.type
+ count: 2
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Parameter \#1 \$typeString of class WireMock\\Serde\\Type\\SerdeTypePrimitive constructor expects string, mixed given\.$#'
+ identifier: argument.type
+ count: 7
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Part \$keyIn \(mixed\) of encapsed string cannot be cast to string\.$#'
+ identifier: encapsedStringPart.nonString
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Part \$keyInputType \(mixed\) of encapsed string cannot be cast to string\.$#'
+ identifier: encapsedStringPart.nonString
+ count: 3
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Part \$valIn \(mixed\) of encapsed string cannot be cast to string\.$#'
+ identifier: encapsedStringPart.nonString
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Part \$valueInputType \(mixed\) of encapsed string cannot be cast to string\.$#'
+ identifier: encapsedStringPart.nonString
+ count: 1
+ path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
+
+ -
+ message: '#^Property WireMock\\SerdeGen\\TestClasses\\CatchAllPrimitiveProperty\:\:\$catchAllPrimitive is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/SerdeGen/TestClasses/CatchAllPrimitiveProperty.php
+
+ -
+ message: '#^Constructor of class WireMock\\SerdeGen\\TestClasses\\KitchenSink has an unused parameter \$ignoredParam\.$#'
+ identifier: constructor.unusedParameter
+ count: 1
+ path: test/WireMock/SerdeGen/TestClasses/KitchenSink.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\TestClasses\\KitchenSink\:\:__construct\(\) has parameter \$ignoredParam with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/SerdeGen/TestClasses/KitchenSink.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\TestClasses\\KitchenSink\:\:discriminate\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/TestClasses/KitchenSink.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\TestClasses\\KitchenSink\:\:possibleNames\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/TestClasses/KitchenSink.php
+
+ -
+ message: '#^Property WireMock\\SerdeGen\\TestClasses\\KitchenSink\:\:\$catchall is unused\.$#'
+ identifier: property.unused
+ count: 1
+ path: test/WireMock/SerdeGen/TestClasses/KitchenSink.php
+
+ -
+ message: '#^Property WireMock\\SerdeGen\\TestClasses\\KitchenSink\:\:\$catchall type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: test/WireMock/SerdeGen/TestClasses/KitchenSink.php
+
+ -
+ message: '#^Property WireMock\\SerdeGen\\TestClasses\\KitchenSink\:\:\$fieldOnly is unused\.$#'
+ identifier: property.unused
+ count: 1
+ path: test/WireMock/SerdeGen/TestClasses/KitchenSink.php
+
+ -
+ message: '#^Property WireMock\\SerdeGen\\TestClasses\\KitchenSink\:\:\$inlined is unused\.$#'
+ identifier: property.unused
+ count: 1
+ path: test/WireMock/SerdeGen/TestClasses/KitchenSink.php
+
+ -
+ message: '#^Property WireMock\\SerdeGen\\TestClasses\\KitchenSink\:\:\$namedByName is unused\.$#'
+ identifier: property.unused
+ count: 1
+ path: test/WireMock/SerdeGen/TestClasses/KitchenSink.php
+
+ -
+ message: '#^Property WireMock\\SerdeGen\\TestClasses\\KitchenSink\:\:\$namedByValue is unused\.$#'
+ identifier: property.unused
+ count: 1
+ path: test/WireMock/SerdeGen/TestClasses/KitchenSink.php
+
+ -
+ message: '#^Property WireMock\\SerdeGen\\TestClasses\\KitchenSink\:\:\$object is unused\.$#'
+ identifier: property.unused
+ count: 1
+ path: test/WireMock/SerdeGen/TestClasses/KitchenSink.php
+
+ -
+ message: '#^Property WireMock\\SerdeGen\\TestClasses\\KitchenSink\:\:\$originalName is unused\.$#'
+ identifier: property.unused
+ count: 1
+ path: test/WireMock/SerdeGen/TestClasses/KitchenSink.php
+
+ -
+ message: '#^Property WireMock\\SerdeGen\\TestClasses\\KitchenSink\:\:\$reqArg is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/SerdeGen/TestClasses/KitchenSink.php
+
+ -
+ message: '#^Static method WireMock\\SerdeGen\\TestClasses\\KitchenSink\:\:discriminate\(\) is unused\.$#'
+ identifier: method.unused
+ count: 1
+ path: test/WireMock/SerdeGen/TestClasses/KitchenSink.php
+
+ -
+ message: '#^Static method WireMock\\SerdeGen\\TestClasses\\KitchenSink\:\:possibleNames\(\) is unused\.$#'
+ identifier: method.unused
+ count: 1
+ path: test/WireMock/SerdeGen/TestClasses/KitchenSink.php
+
+ -
+ message: '#^Property WireMock\\SerdeGen\\TestClasses\\OneSimpleField\:\:\$field is unused\.$#'
+ identifier: property.unused
+ count: 1
+ path: test/WireMock/SerdeGen/TestClasses/OneSimpleField.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\WireMockSerdeGenTest\:\:testGeneratingLookup\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/SerdeGen/WireMockSerdeGenTest.php
+
+ -
+ message: '#^Cannot call method normalize\(\) on mixed\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: test/WireMock/Stubbing/StubMappingTest.php
+
+ -
+ message: '#^Method WireMock\\Stubbing\\StubMappingTest\:\:testIdIsInArrayIfSpecified\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Stubbing/StubMappingTest.php
+
+ -
+ message: '#^Method WireMock\\Stubbing\\StubMappingTest\:\:testNameIsInArrayIfSpecified\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Stubbing/StubMappingTest.php
+
+ -
+ message: '#^Method WireMock\\Stubbing\\StubMappingTest\:\:testPriorityIsInArrayIfSpecified\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Stubbing/StubMappingTest.php
+
+ -
+ message: '#^Method WireMock\\Stubbing\\StubMappingTest\:\:testRequestPatternAndResponseDefinitionAreAvailableInArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Stubbing/StubMappingTest.php
+
+ -
+ message: '#^Method WireMock\\Stubbing\\StubMappingTest\:\:testScenarioArrayIsMergedIntoArrayIfSpecified\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Stubbing/StubMappingTest.php
+
+ -
+ message: '#^Method WireMock\\Stubbing\\StubMappingTest\:\:toArray\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Stubbing/StubMappingTest.php
+
+ -
+ message: '#^Method WireMock\\Stubbing\\StubMappingTest\:\:toArray\(\) has parameter \$obj with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: test/WireMock/Stubbing/StubMappingTest.php
+
+ -
+ message: '#^Property WireMock\\Stubbing\\StubMappingTest\:\:\$_mockRequestPattern is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Stubbing/StubMappingTest.php
+
+ -
+ message: '#^Property WireMock\\Stubbing\\StubMappingTest\:\:\$_mockResponseDefinition is never read, only written\.$#'
+ identifier: property.onlyWritten
+ count: 1
+ path: test/WireMock/Stubbing/StubMappingTest.php
+
+ -
+ message: '#^Property WireMock\\Stubbing\\StubMappingTest\:\:\$_serializer has no type specified\.$#'
+ identifier: missingType.property
+ count: 1
+ path: test/WireMock/Stubbing/StubMappingTest.php
diff --git a/phpstan.neon b/phpstan.neon
index dc86248..1ac98e0 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -1,9 +1,16 @@
+includes:
+ - vendor/phpstan/phpstan-phpunit/extension.neon
+
parameters:
- level: max
+ level: 8
paths:
- src
- test
+ excludePaths:
+ analyse:
+ - test/
+
editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%&project=wiremock-php'
stubFiles:
From a4352ae46bb7e3519a60d1d926ee5d0c0b33f512 Mon Sep 17 00:00:00 2001
From: Philipp Scheit
Date: Tue, 24 Jun 2025 15:01:20 +0200
Subject: [PATCH 5/8] add a group to all integration tests to better selection
with phpunit
---
Justfile | 6 +++++-
.../WireMock/Integration/FaultsAndDelaysIntegrationTest.php | 3 +++
test/WireMock/Integration/MappingsIntegrationTest.php | 3 +++
test/WireMock/Integration/MultipartIntegrationTest.php | 3 +++
test/WireMock/Integration/NearMissesIntegrationTest.php | 3 +++
test/WireMock/Integration/ProxyingIntegrationTest.php | 3 +++
test/WireMock/Integration/RecordingIntegrationTest.php | 3 +++
test/WireMock/Integration/RequestsIntegrationTest.php | 3 +++
test/WireMock/Integration/ScenarioIntegrationTest.php | 3 +++
test/WireMock/Integration/ShutdownIntegrationTest.php | 3 +++
test/WireMock/Integration/StubbingIntegrationTest.php | 3 +++
test/WireMock/Integration/VerificationIntegrationTest.php | 3 +++
test/WireMock/Integration/WebhookIntegrationTest.php | 3 +++
13 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/Justfile b/Justfile
index 0caa2cb..5101054 100644
--- a/Justfile
+++ b/Justfile
@@ -19,13 +19,17 @@ watch-phpstan *args='':
find src/ test/ -name '*.php' | entr j phpstan analyse "${@}"
phpunit *args='':
- {{ php }} vendor/bin/phpunit "${@}"
+ cd test && {{ php }} ../vendor/bin/phpunit "${@}"
composer *args='':
{{ composer }} "${@}"
+units:
+ j phpunit --exclude-group=integration
+
prep:
j phpstan
j phpunit
+ j phpunit
diff --git a/test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php b/test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
index c434760..741ef85 100644
--- a/test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
+++ b/test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
@@ -8,6 +8,9 @@
use WireMock\Fault\UniformDistribution;
use WireMock\Stubbing\Fault;
+/**
+ * @group integration
+ */
class FaultsAndDelaysIntegrationTest extends WireMockIntegrationTest
{
protected function tearDown(): void
diff --git a/test/WireMock/Integration/MappingsIntegrationTest.php b/test/WireMock/Integration/MappingsIntegrationTest.php
index 1641ffc..fd7085b 100644
--- a/test/WireMock/Integration/MappingsIntegrationTest.php
+++ b/test/WireMock/Integration/MappingsIntegrationTest.php
@@ -4,6 +4,9 @@
use WireMock\Client\WireMock;
+/**
+ * @group integration
+ */
class MappingsIntegrationTest extends WireMockIntegrationTest
{
public function testMappingsListIsEmptyIfNoStubsHaveBeenMade()
diff --git a/test/WireMock/Integration/MultipartIntegrationTest.php b/test/WireMock/Integration/MultipartIntegrationTest.php
index 7aa6137..6389bbf 100644
--- a/test/WireMock/Integration/MultipartIntegrationTest.php
+++ b/test/WireMock/Integration/MultipartIntegrationTest.php
@@ -5,6 +5,9 @@
use WireMock\Client\MultipartValuePattern;
use WireMock\Client\WireMock;
+/**
+ * @group integration
+ */
class MultipartIntegrationTest extends WireMockIntegrationTest
{
public function testSimpleMultipartStubCanBeRegistered()
diff --git a/test/WireMock/Integration/NearMissesIntegrationTest.php b/test/WireMock/Integration/NearMissesIntegrationTest.php
index beec133..6b3e3de 100644
--- a/test/WireMock/Integration/NearMissesIntegrationTest.php
+++ b/test/WireMock/Integration/NearMissesIntegrationTest.php
@@ -4,6 +4,9 @@
use WireMock\Client\WireMock;
+/**
+ * @group integration
+ */
class NearMissesIntegrationTest extends WireMockIntegrationTest
{
public function testFindNearMissesForLoggedRequest()
diff --git a/test/WireMock/Integration/ProxyingIntegrationTest.php b/test/WireMock/Integration/ProxyingIntegrationTest.php
index 502b63d..4768496 100644
--- a/test/WireMock/Integration/ProxyingIntegrationTest.php
+++ b/test/WireMock/Integration/ProxyingIntegrationTest.php
@@ -4,6 +4,9 @@
use WireMock\Client\WireMock;
+/**
+ * @group integration
+ */
class ProxyingIntegrationTest extends WireMockIntegrationTest
{
public function testProxyBaseUrlOfStubCanBeSet()
diff --git a/test/WireMock/Integration/RecordingIntegrationTest.php b/test/WireMock/Integration/RecordingIntegrationTest.php
index dd1d139..bd4058d 100644
--- a/test/WireMock/Integration/RecordingIntegrationTest.php
+++ b/test/WireMock/Integration/RecordingIntegrationTest.php
@@ -8,6 +8,9 @@
use WireMock\Recording\RecordingStatusResult;
use WireMock\Recording\RecordSpec;
+/**
+ * @group integration
+ */
class RecordingIntegrationTest extends WireMockIntegrationTest
{
/** @var WireMock */
diff --git a/test/WireMock/Integration/RequestsIntegrationTest.php b/test/WireMock/Integration/RequestsIntegrationTest.php
index 28af8c8..e644d03 100644
--- a/test/WireMock/Integration/RequestsIntegrationTest.php
+++ b/test/WireMock/Integration/RequestsIntegrationTest.php
@@ -9,6 +9,9 @@
use WireMock\Client\ServeEventQuery;
use WireMock\Client\WireMock;
+/**
+ * @group integration
+ */
class RequestsIntegrationTest extends WireMockIntegrationTest
{
public function testGettingAllServeEventsReturnsAllRequestDetails()
diff --git a/test/WireMock/Integration/ScenarioIntegrationTest.php b/test/WireMock/Integration/ScenarioIntegrationTest.php
index b49e0da..633b3d9 100644
--- a/test/WireMock/Integration/ScenarioIntegrationTest.php
+++ b/test/WireMock/Integration/ScenarioIntegrationTest.php
@@ -5,6 +5,9 @@
use WireMock\Client\WireMock;
use WireMock\Stubbing\Scenario;
+/**
+ * @group integration
+ */
class ScenarioIntegrationTest extends WireMockIntegrationTest
{
public function testScenarioNameOfStubCanBeSet()
diff --git a/test/WireMock/Integration/ShutdownIntegrationTest.php b/test/WireMock/Integration/ShutdownIntegrationTest.php
index cbc0321..e406b8e 100644
--- a/test/WireMock/Integration/ShutdownIntegrationTest.php
+++ b/test/WireMock/Integration/ShutdownIntegrationTest.php
@@ -2,6 +2,9 @@
namespace WireMock\Integration;
+/**
+ * @group integration
+ */
class ShutdownIntegrationTest extends WireMockIntegrationTest
{
public function testShutdownTerminatesStandaloneServer()
diff --git a/test/WireMock/Integration/StubbingIntegrationTest.php b/test/WireMock/Integration/StubbingIntegrationTest.php
index 3aaaa60..3e4b794 100644
--- a/test/WireMock/Integration/StubbingIntegrationTest.php
+++ b/test/WireMock/Integration/StubbingIntegrationTest.php
@@ -11,6 +11,9 @@
use WireMock\Client\XmlUnitComparisonType;
use WireMock\Stubbing\StubMapping;
+/**
+ * @group integration
+ */
class StubbingIntegrationTest extends WireMockIntegrationTest
{
public function setUp(): void
diff --git a/test/WireMock/Integration/VerificationIntegrationTest.php b/test/WireMock/Integration/VerificationIntegrationTest.php
index f388e46..6a6f6c5 100644
--- a/test/WireMock/Integration/VerificationIntegrationTest.php
+++ b/test/WireMock/Integration/VerificationIntegrationTest.php
@@ -6,6 +6,9 @@
use WireMock\Client\VerificationException;
use WireMock\Client\WireMock;
+/**
+ * @group integration
+ */
class VerificationIntegrationTest extends WireMockIntegrationTest
{
private $_verificationCount = 0;
diff --git a/test/WireMock/Integration/WebhookIntegrationTest.php b/test/WireMock/Integration/WebhookIntegrationTest.php
index 370dbfd..e7e1aa4 100644
--- a/test/WireMock/Integration/WebhookIntegrationTest.php
+++ b/test/WireMock/Integration/WebhookIntegrationTest.php
@@ -5,6 +5,9 @@
use WireMock\Client\WireMock;
use WireMock\Http\RequestMethod;
+/**
+ * @group integration
+ */
class WebhookIntegrationTest extends WireMockIntegrationTest
{
public function testWebhookCallbackCanBeRegistered()
From 264afcfe6ffecba237d5edec514179ae86d70bb5 Mon Sep 17 00:00:00 2001
From: Philipp Scheit
Date: Tue, 24 Jun 2025 17:24:59 +0200
Subject: [PATCH 6/8] use php7.4 locally in justfile
---
Justfile | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/Justfile b/Justfile
index 5101054..79212f5 100644
--- a/Justfile
+++ b/Justfile
@@ -6,8 +6,8 @@ export COLUMNS := '550'
default:
@just --list
-php := "php"
-composer := "composer"
+php := "/usr/bin/php7.4"
+composer := "/usr/bin/php7.4 composer"
cli *args='':
{{ php }} bin/console "$@"
@@ -16,7 +16,7 @@ phpstan *args='':
{{ php }} vendor/bin/phpstan "${@}"
watch-phpstan *args='':
- find src/ test/ -name '*.php' | entr j phpstan analyse "${@}"
+ find src/ test/ -name '*.php' | entr {{ php }} vendor/bin/phpstan "${@}"
phpunit *args='':
cd test && {{ php }} ../vendor/bin/phpunit "${@}"
@@ -30,6 +30,5 @@ units:
prep:
j phpstan
j phpunit
- j phpunit
From d1775c339cd31cc48c29d6193d03b26ae66cec10 Mon Sep 17 00:00:00 2001
From: Philipp Scheit
Date: Tue, 24 Jun 2025 20:23:09 +0200
Subject: [PATCH 7/8] throw a better exception when Serde cannot serialize a
property because of mixed types
---
src/WireMock/SerdeGen/SerdeClassDefinitionFactory.php | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/WireMock/SerdeGen/SerdeClassDefinitionFactory.php b/src/WireMock/SerdeGen/SerdeClassDefinitionFactory.php
index d4de5d6..0eac6f4 100644
--- a/src/WireMock/SerdeGen/SerdeClassDefinitionFactory.php
+++ b/src/WireMock/SerdeGen/SerdeClassDefinitionFactory.php
@@ -49,6 +49,7 @@ public function __construct(SerdeTypeParser $serdeTypeParser)
/**
* @throws SerializationException|ReflectionException
+ * @param string $classType
*/
public function createClassDefinition(string $classType, bool $isRootType): SerdeClassDefinition
{
@@ -106,6 +107,7 @@ private function getClassDiscriminationInfo(ReflectionClass $refClass, Context $
*/
private function getProperties(ReflectionClass $refClass, Context $context): array
{
+ $parentClass = $refClass->getName();
$refProps = [];
do {
// Merge the props, ignoring antecedent props that have already been defined on descendants
@@ -132,7 +134,11 @@ private function getProperties(ReflectionClass $refClass, Context $context): arr
}
/** @var Var_ $varTag */
$varTag = $varTags[0];
- $propType = $this->serdeTypeParser->resolveTypeToSerdeType($varTag->getType());
+ try {
+ $propType = $this->serdeTypeParser->resolveTypeToSerdeType($varTag->getType());
+ } catch (SerializationException $e) {
+ throw new SerializationException('Cannot resolve type from '.$parentClass.'::$'.$refProp->getName().' with @var of '.$varTag->getType(), 0, $e);
+ }
/** @var SerdeNameTag|null $serdeNameTag */
$serdeNameTag = $this->getSinglePropTagIfPresent($docBlock, 'serde-name', $propName);
From 801b094a77a64efaa0c7c6fdb9b6e77a29fb12f9 Mon Sep 17 00:00:00 2001
From: Philipp Scheit
Date: Tue, 24 Jun 2025 20:40:22 +0200
Subject: [PATCH 8/8] try to fix all phpstan errors and baseline the rest
(especially entire test + and src/WireMock/SerDe and src/WireMock/SerdeGen)
Now unit tests are broken, because I added a lot of "mixed" property types, that are not supported by the Deserialization library.
---
...aseline-test.neon => phpstan-baseline.neon | 1260 +++++++----------
phpstan.neon | 7 +-
src/WireMock/Client/ClientException.php | 4 +-
.../Client/CountMatchingRequestsResult.php | 2 +-
src/WireMock/Client/Curl.php | 12 +-
.../Client/DateTimeMatchingStrategy.php | 19 +-
.../Client/EqualToMatchingStrategy.php | 6 +-
.../Client/EqualToXmlMatchingStrategy.php | 2 +-
src/WireMock/Client/HttpWait.php | 17 +-
.../Client/JsonPathValueMatchingStrategy.php | 7 -
.../Client/JsonValueMatchingStrategy.php | 13 +-
src/WireMock/Client/LoggedRequest.php | 30 +-
src/WireMock/Client/LoggedResponse.php | 6 +-
src/WireMock/Client/MappingBuilder.php | 9 +-
src/WireMock/Client/MultipartValuePattern.php | 16 +-
.../Client/MultipartValuePatternBuilder.php | 2 +-
src/WireMock/Client/NearMiss.php | 24 +-
src/WireMock/Client/RequestPatternBuilder.php | 8 +-
.../Client/ResponseDefinitionBuilder.php | 22 +-
src/WireMock/Client/ServeEventQuery.php | 12 +-
src/WireMock/Client/UnmatchedRequests.php | 2 +-
src/WireMock/Client/ValueMatchingStrategy.php | 30 +-
src/WireMock/Client/VerificationException.php | 18 +-
src/WireMock/Client/WireMock.php | 291 ++--
.../Client/XPathValueMatchingStrategy.php | 14 +-
src/WireMock/Fault/DelayDistribution.php | 2 +-
src/WireMock/Fault/GlobalDelaySettings.php | 11 +
src/WireMock/Http/ResponseDefinition.php | 75 +-
src/WireMock/Matching/RequestPattern.php | 26 +-
src/WireMock/Matching/UrlMatchingStrategy.php | 7 +-
src/WireMock/PostServe/WebhookDefinition.php | 7 +-
.../Recording/ProxiedServeEventFilters.php | 6 +
src/WireMock/Recording/RecordSpec.php | 32 +-
src/WireMock/Recording/RecordSpecBuilder.php | 18 +-
src/WireMock/Serde/ArrayMapUtils.php | 4 +-
src/WireMock/Serde/MethodFactory.php | 3 +-
.../Serde/SerdeClassDiscriminationInfo.php | 2 +-
src/WireMock/Serde/SerdeProp.php | 6 +-
.../Serde/StaticFactoryMethodValidator.php | 3 +-
.../Serde/Type/SerdeTypeAssocArray.php | 2 +-
src/WireMock/Serde/Type/SerdeTypeClass.php | 14 +-
.../Serde/Type/SerdeTypeTypedArray.php | 2 +-
src/WireMock/Serde/Type/SerdeTypeUnion.php | 6 +-
.../SerdeGen/PartialSerdeTypeLookup.php | 7 +-
.../SerdeGen/SerdeClassDefinitionFactory.php | 7 +-
.../SerdeGen/SerdeTypeLookupFactory.php | 4 +-
src/WireMock/SerdeGen/SerdeTypeParser.php | 4 +-
.../SerdeGen/Tag/SerdeCatchAllTag.php | 4 +-
.../SerdeGen/Tag/SerdeDiscriminateTypeTag.php | 4 +-
src/WireMock/SerdeGen/Tag/SerdeNameTag.php | 4 +-
src/WireMock/SerdeGen/Tag/SerdeNamedByTag.php | 4 +-
.../SerdeGen/Tag/SerdePossibleNamesTag.php | 4 +-
.../SerdeGen/Tag/SerdePossibleSubtypeTag.php | 2 +-
.../SerdeGen/Tag/SerdeUnwrappedTag.php | 4 +-
src/WireMock/SerdeGen/WireMockSerdeGen.php | 2 +-
src/WireMock/Stubbing/ScenarioMapping.php | 18 +-
src/WireMock/Stubbing/StubMapping.php | 44 +-
.../Verification/CountMatchingStrategy.php | 29 +-
.../Serde/TestClasses/ConstructorParams.php | 2 +-
.../TestClasses/DiscriminatedTypeParent.php | 3 +-
.../Serde/TestClasses/FieldOnlyPrimitives.php | 2 +-
.../Serde/TestClasses/UnionTypeFields.php | 2 +-
.../SerdeGen/TestClasses/KitchenSink.php | 2 +-
63 files changed, 1034 insertions(+), 1177 deletions(-)
rename phpstan-baseline-test.neon => phpstan-baseline.neon (84%)
diff --git a/phpstan-baseline-test.neon b/phpstan-baseline.neon
similarity index 84%
rename from phpstan-baseline-test.neon
rename to phpstan-baseline.neon
index 1bfc9ce..c6ecf35 100644
--- a/phpstan-baseline-test.neon
+++ b/phpstan-baseline.neon
@@ -1,5 +1,461 @@
parameters:
ignoreErrors:
+ -
+ message: '#^Method WireMock\\Serde\\ArrayMapUtils\:\:array_map_assoc\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/ArrayMapUtils.php
+
+ -
+ message: '#^Method WireMock\\Serde\\ClassDiscriminator\:\:getDiscriminatedType\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/ClassDiscriminator.php
+
+ -
+ message: '#^Method WireMock\\Serde\\ClassDiscriminatorMapping\:\:getDiscriminatedType\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/ClassDiscriminatorMapping.php
+
+ -
+ message: '#^Call to an undefined static method ReflectionMethod\:\:createFromMethodName\(\)\.$#'
+ identifier: staticMethod.notFound
+ count: 1
+ path: src/WireMock/Serde/MethodFactory.php
+
+ -
+ message: '#^Method WireMock\\Serde\\PropNaming\\ConstantPropertyNamingStrategy\:\:getSerializedName\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/PropNaming/ConstantPropertyNamingStrategy.php
+
+ -
+ message: '#^Method WireMock\\Serde\\PropNaming\\PropertyNamingStrategy\:\:getSerializedName\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/PropNaming/PropertyNamingStrategy.php
+
+ -
+ message: '#^Method WireMock\\Serde\\PropNaming\\ReferencingPropertyNamingStrategy\:\:getSerializedName\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/PropNaming/ReferencingPropertyNamingStrategy.php
+
+ -
+ message: '#^Cannot call method getTypeByFullyQualifiedClassName\(\) on WireMock\\Serde\\SerdeClassDiscriminationInfo\|null\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: src/WireMock/Serde/SerdeClassDefinition.php
+
+ -
+ message: '#^Property WireMock\\Serde\\SerdeClassDiscriminationInfo\:\:\$possibleSerdeTypes \(array\\) does not accept array\\.$#'
+ identifier: assign.propertyType
+ count: 1
+ path: src/WireMock/Serde/SerdeClassDiscriminationInfo.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerdeProp\:\:getData\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/WireMock/Serde/SerdeProp.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerdeProp\:\:getPossibleSerializedNames\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/SerdeProp.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerdeProp\:\:getSerializedName\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/SerdeProp.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerdeProp\:\:instantiateAndConsumeData\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/WireMock/Serde/SerdeProp.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerdeProp\:\:instantiateAndConsumeData\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/SerdeProp.php
+
+ -
+ message: '#^Method WireMock\\Serde\\SerdeProp\:\:instantiateAndConsumeData\(\) has parameter \$path with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/SerdeProp.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Serializer\:\:denormalize\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/WireMock/Serde/Serializer.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Serializer\:\:denormalize\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/Serializer.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Serializer\:\:serialize\(\) should return string but returns string\|false\.$#'
+ identifier: return.type
+ count: 1
+ path: src/WireMock/Serde/Serializer.php
+
+ -
+ message: '#^Parameter \#1 \$variable_representation of function unserialize expects string, string\|false given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/WireMock/Serde/SerializerFactory.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeType\:\:canDenormalize\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeType.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeType\:\:denormalize\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeType.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeType\:\:denormalize\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeType.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeType\:\:denormalize\(\) has parameter \$path with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeType.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArray\:\:canDenormalize\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeArray.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArray\:\:denormalize\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeArray.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArray\:\:denormalize\(\) has parameter \$path with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeArray.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArray\:\:denormalize\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeArray.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArray\:\:denormalizeFromArray\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeArray.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArray\:\:denormalizeFromArray\(\) has parameter \$path with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeArray.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArray\:\:denormalizeFromArray\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeArray.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeAssocArray\:\:denormalizeFromArray\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeAssocArray.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeAssocArray\:\:denormalizeFromArray\(\) has parameter \$path with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeAssocArray.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeAssocArray\:\:denormalizeFromArray\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeAssocArray.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeClass\:\:canDenormalize\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeClass.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeClass\:\:constructObject\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeClass.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeClass\:\:constructObject\(\) has parameter \$path with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeClass.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeClass\:\:constructObject\(\) never returns null so it can be removed from the return type\.$#'
+ identifier: return.unusedType
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeClass.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeClass\:\:denormalize\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeClass.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeClass\:\:denormalize\(\) has parameter \$path with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeClass.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeClass\:\:getDiscriminatedType\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeClass.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeClass\:\:instantiate\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeClass.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeClass\:\:normalize\(\) has parameter \$object with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeClass.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeClass\:\:normalize\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeClass.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeClass\:\:populateObject\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeClass.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeClass\:\:populateObject\(\) has parameter \$path with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeClass.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeClass\:\:reverseCatchAllProp\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeClass.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeClass\:\:reverseNamedByProps\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeClass.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeClass\:\:reverseNamedProps\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeClass.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeClass\:\:reverseUnwrappedProps\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeClass.php
+
+ -
+ message: '#^Parameter \#1 \$argument of class ReflectionClass constructor expects class\-string\\|T of object, string given\.$#'
+ identifier: argument.type
+ count: 2
+ path: src/WireMock/Serde/Type/SerdeTypeClass.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeNull\:\:canDenormalize\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeNull.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeNull\:\:denormalize\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeNull.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeNull\:\:denormalize\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeNull.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeNull\:\:denormalize\(\) has parameter \$path with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeNull.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypePrimitive\:\:canDenormalize\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypePrimitive.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypePrimitive\:\:denormalize\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypePrimitive.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypePrimitive\:\:denormalize\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypePrimitive.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypePrimitive\:\:denormalize\(\) has parameter \$path with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypePrimitive.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeTypedArray\:\:denormalizeFromArray\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeTypedArray.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeTypedArray\:\:denormalizeFromArray\(\) has parameter \$path with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeTypedArray.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeTypedArray\:\:denormalizeFromArray\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeTypedArray.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeUnion\:\:canDenormalize\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeUnion.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeUnion\:\:denormalize\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeUnion.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeUnion\:\:denormalize\(\) has parameter \$data with no type specified\.$#'
+ identifier: missingType.parameter
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeUnion.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeUnion\:\:denormalize\(\) has parameter \$path with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeUnion.php
+
+ -
+ message: '#^Parameter \#1 \$object of function get_class expects object, WireMock\\Serde\\Type\\SerdeTypeArray\|null given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeUnion.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeUntypedArray\:\:denormalizeFromArray\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeUntypedArray.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeUntypedArray\:\:denormalizeFromArray\(\) has parameter \$path with no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeUntypedArray.php
+
+ -
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeUntypedArray\:\:denormalizeFromArray\(\) return type has no value type specified in iterable type array\.$#'
+ identifier: missingType.iterableValue
+ count: 1
+ path: src/WireMock/Serde/Type/SerdeTypeUntypedArray.php
+
+ -
+ message: '#^Cannot access property \$name on ReflectionClass\|null\.$#'
+ identifier: property.nonObject
+ count: 1
+ path: src/WireMock/SerdeGen/SerdeClassDefinitionFactory.php
+
+ -
+ message: '#^Cannot call method __toString\(\) on phpDocumentor\\Reflection\\Type\|null\.$#'
+ identifier: method.nonObject
+ count: 1
+ path: src/WireMock/SerdeGen/SerdeClassDefinitionFactory.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeClassDefinitionFactory\:\:getClassDiscriminationInfo\(\) has parameter \$refClass with generic class ReflectionClass but does not specify its types\: T$#'
+ identifier: missingType.generics
+ count: 1
+ path: src/WireMock/SerdeGen/SerdeClassDefinitionFactory.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeClassDefinitionFactory\:\:getMandatoryConstructorParams\(\) has parameter \$refClass with generic class ReflectionClass but does not specify its types\: T$#'
+ identifier: missingType.generics
+ count: 1
+ path: src/WireMock/SerdeGen/SerdeClassDefinitionFactory.php
+
+ -
+ message: '#^Method WireMock\\SerdeGen\\SerdeClassDefinitionFactory\:\:getProperties\(\) has parameter \$refClass with generic class ReflectionClass but does not specify its types\: T$#'
+ identifier: missingType.generics
+ count: 1
+ path: src/WireMock/SerdeGen/SerdeClassDefinitionFactory.php
+
+ -
+ message: '#^Parameter \#1 \$argument of class ReflectionClass constructor expects class\-string\\|T of object, string given\.$#'
+ identifier: argument.type
+ count: 1
+ path: src/WireMock/SerdeGen/SerdeClassDefinitionFactory.php
+
+ -
+ message: '#^Parameter \#1 \$type of method WireMock\\SerdeGen\\SerdeTypeParser\:\:resolveTypeToSerdeType\(\) expects phpDocumentor\\Reflection\\Type, phpDocumentor\\Reflection\\Type\|null given\.$#'
+ identifier: argument.type
+ count: 3
+ path: src/WireMock/SerdeGen/SerdeClassDefinitionFactory.php
+
-
message: '#^Call to an undefined method Phake\\Proxies\\StubberProxy\:\:build\(\)\.$#'
identifier: method.notFound
@@ -24,12 +480,6 @@ parameters:
count: 1
path: test/WireMock/Client/MappingBuilderTest.php
- -
- message: '#^Cannot call method thenReturn\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 2
- path: test/WireMock/Client/MappingBuilderTest.php
-
-
message: '#^Method WireMock\\Client\\MappingBuilderTest\:\:testBuiltStubMappingHasRequestPatternAndResponseDefinition\(\) has no return type specified\.$#'
identifier: missingType.return
@@ -54,24 +504,6 @@ parameters:
count: 1
path: test/WireMock/Client/MappingBuilderTest.php
- -
- message: '#^Parameter \#1 \$mock of static method Phake\:\:verify\(\) expects Phake\\IMock, mixed given\.$#'
- identifier: argument.type
- count: 3
- path: test/WireMock/Client/MappingBuilderTest.php
-
- -
- message: '#^Parameter \#1 \$requestPatternBuilder of class WireMock\\Client\\MappingBuilder constructor expects WireMock\\Client\\RequestPatternBuilder, mixed given\.$#'
- identifier: argument.type
- count: 4
- path: test/WireMock/Client/MappingBuilderTest.php
-
- -
- message: '#^Parameter \#1 \$responseDefinitionBuilder of method WireMock\\Client\\MappingBuilder\:\:willReturn\(\) expects WireMock\\Client\\ResponseDefinitionBuilder, mixed given\.$#'
- identifier: argument.type
- count: 4
- path: test/WireMock/Client/MappingBuilderTest.php
-
-
message: '#^Property WireMock\\Client\\MappingBuilderTest\:\:\$_mockRequestPatternBuilder has no type specified\.$#'
identifier: missingType.property
@@ -132,60 +564,6 @@ parameters:
count: 1
path: test/WireMock/Client/RequestPatternBuilderTest.php
- -
- message: '#^Cannot call method getAdditionalProxyRequestHeaders\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
-
- -
- message: '#^Cannot call method getBase64Body\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
-
- -
- message: '#^Cannot call method getBody\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 2
- path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
-
- -
- message: '#^Cannot call method getBodyFileName\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 2
- path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
-
- -
- message: '#^Cannot call method getFixedDelayMillis\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
-
- -
- message: '#^Cannot call method getHeaders\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 4
- path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
-
- -
- message: '#^Cannot call method getProxyBaseUrl\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 3
- path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
-
- -
- message: '#^Cannot call method getStatus\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 3
- path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
-
- -
- message: '#^Cannot call method getStatusMessage\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 2
- path: test/WireMock/Client/ResponseDefinitionBuilderTest.php
-
-
message: '#^Method WireMock\\Client\\ResponseDefinitionBuilderTest\:\:testBase64BodyIsAvailableInArrayIfSet\(\) has no return type specified\.$#'
identifier: missingType.return
@@ -349,56 +727,8 @@ parameters:
path: test/WireMock/Client/WireMockTest.php
-
- message: '#^Call to an undefined method Phake\\Proxies\\VerifierProxy\:\:setId\(\)\.$#'
- identifier: method.notFound
- count: 1
- path: test/WireMock/Client/WireMockTest.php
-
- -
- message: '#^Cannot call method build\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Client/WireMockTest.php
-
- -
- message: '#^Cannot call method getBody\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 6
- path: test/WireMock/Client/WireMockTest.php
-
- -
- message: '#^Cannot call method getHeaders\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 8
- path: test/WireMock/Client/WireMockTest.php
-
- -
- message: '#^Cannot call method getRequest\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Client/WireMockTest.php
-
- -
- message: '#^Cannot call method getStatus\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 20
- path: test/WireMock/Client/WireMockTest.php
-
- -
- message: '#^Cannot call method getUrlMatchingStrategy\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Client/WireMockTest.php
-
- -
- message: '#^Cannot call method thenReturn\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 20
- path: test/WireMock/Client/WireMockTest.php
-
- -
- message: '#^Cannot call method willReturn\(\) on mixed\.$#'
- identifier: method.nonObject
+ message: '#^Call to an undefined method Phake\\Proxies\\VerifierProxy\:\:setId\(\)\.$#'
+ identifier: method.notFound
count: 1
path: test/WireMock/Client/WireMockTest.php
@@ -636,12 +966,6 @@ parameters:
count: 1
path: test/WireMock/Client/WireMockTest.php
- -
- message: '#^Parameter \#1 \$exception of method PHPUnit\\Framework\\TestCase\:\:expectException\(\) expects class\-string\, string given\.$#'
- identifier: argument.type
- count: 1
- path: test/WireMock/Client/WireMockTest.php
-
-
message: '#^Parameter \#1 \$mock of static method Phake\:\:verify\(\) expects Phake\\IMock, WireMock\\Client\\Curl given\.$#'
identifier: argument.type
@@ -666,42 +990,6 @@ parameters:
count: 7
path: test/WireMock/Client/WireMockTest.php
- -
- message: '#^Parameter \#2 \$matchingValue of class WireMock\\Matching\\UrlMatchingStrategy constructor expects string, mixed given\.$#'
- identifier: argument.type
- count: 1
- path: test/WireMock/Client/WireMockTest.php
-
- -
- message: '#^Cannot call method getChunkedDribbleDelay\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
-
- -
- message: '#^Cannot call method getFault\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
-
- -
- message: '#^Cannot call method getFixedDelayMillis\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
-
- -
- message: '#^Cannot call method getRandomDelayDistribution\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 3
- path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
-
- -
- message: '#^Cannot call method getResponse\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 6
- path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
-
-
message: '#^Method WireMock\\Integration\\FaultsAndDelaysIntegrationTest\:\:_testFaultCanBeStubbed\(\) has no return type specified\.$#'
identifier: missingType.return
@@ -780,18 +1068,6 @@ parameters:
count: 1
path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
- -
- message: '#^Parameter \#1 \$localStubMapping of function assertThatTheOnlyMappingPresentIs expects WireMock\\Stubbing\\StubMapping, mixed given\.$#'
- identifier: argument.type
- count: 6
- path: test/WireMock/Integration/FaultsAndDelaysIntegrationTest.php
-
- -
- message: '#^Cannot access offset 0 on mixed\.$#'
- identifier: offsetAccess.nonOffsetAccessible
- count: 1
- path: test/WireMock/Integration/MappingsAssertionFunctions.php
-
-
message: '#^Function assertThatTheOnlyMappingPresentIs\(\) has no return type specified\.$#'
identifier: missingType.return
@@ -816,12 +1092,6 @@ parameters:
count: 1
path: test/WireMock/Integration/MappingsAssertionFunctions.php
- -
- message: '#^Cannot call method getId\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Integration/MappingsIntegrationTest.php
-
-
message: '#^Method WireMock\\Integration\\MappingsIntegrationTest\:\:testGettingSingleMappingRetrievesStubById\(\) has no return type specified\.$#'
identifier: missingType.return
@@ -877,100 +1147,88 @@ parameters:
path: test/WireMock/Integration/MappingsIntegrationTest.php
-
- message: '#^Parameter \#1 \$id of method WireMock\\Client\\WireMock\:\:getSingleStubMapping\(\) expects string, mixed given\.$#'
+ message: '#^Parameter \#1 \$id of method WireMock\\Client\\WireMock\:\:getSingleStubMapping\(\) expects string, string\|null given\.$#'
identifier: argument.type
count: 1
path: test/WireMock/Integration/MappingsIntegrationTest.php
-
- message: '#^Cannot access offset ''Content\-Disposition'' on mixed\.$#'
- identifier: offsetAccess.nonOffsetAccessible
+ message: '#^Method WireMock\\Integration\\MultipartIntegrationTest\:\:testMultipartMatchingTypeCanBetSetToAll\(\) has no return type specified\.$#'
+ identifier: missingType.return
count: 1
path: test/WireMock/Integration/MultipartIntegrationTest.php
-
- message: '#^Cannot access offset ''X\-Header'' on mixed\.$#'
- identifier: offsetAccess.nonOffsetAccessible
+ message: '#^Method WireMock\\Integration\\MultipartIntegrationTest\:\:testMultipartMatchingTypeDefaultsToAny\(\) has no return type specified\.$#'
+ identifier: missingType.return
count: 1
path: test/WireMock/Integration/MultipartIntegrationTest.php
-
- message: '#^Cannot access offset 0 on mixed\.$#'
- identifier: offsetAccess.nonOffsetAccessible
- count: 7
- path: test/WireMock/Integration/MultipartIntegrationTest.php
-
- -
- message: '#^Cannot access offset 1 on mixed\.$#'
- identifier: offsetAccess.nonOffsetAccessible
+ message: '#^Method WireMock\\Integration\\MultipartIntegrationTest\:\:testMultipartWithHeaderCanBeRegistered\(\) has no return type specified\.$#'
+ identifier: missingType.return
count: 1
path: test/WireMock/Integration/MultipartIntegrationTest.php
-
- message: '#^Cannot call method getBodyPatterns\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 2
+ message: '#^Method WireMock\\Integration\\MultipartIntegrationTest\:\:testMultipartWithNameCanBeRegistered\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
path: test/WireMock/Integration/MultipartIntegrationTest.php
-
- message: '#^Cannot call method getHeaders\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 2
+ message: '#^Method WireMock\\Integration\\MultipartIntegrationTest\:\:testSimpleMultipartStubCanBeRegistered\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
path: test/WireMock/Integration/MultipartIntegrationTest.php
-
- message: '#^Cannot call method getMatchingType\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 2
+ message: '#^Offset ''Content\-Disposition'' might not exist on array\\|null\.$#'
+ identifier: offsetAccess.notFound
+ count: 1
path: test/WireMock/Integration/MultipartIntegrationTest.php
-
- message: '#^Cannot call method getMultipartPatterns\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 6
+ message: '#^Offset ''X\-Header'' might not exist on array\\|null\.$#'
+ identifier: offsetAccess.notFound
+ count: 1
path: test/WireMock/Integration/MultipartIntegrationTest.php
-
- message: '#^Cannot call method getRequest\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 6
+ message: '#^Offset 0 might not exist on array\\|null\.$#'
+ identifier: offsetAccess.notFound
+ count: 5
path: test/WireMock/Integration/MultipartIntegrationTest.php
-
- message: '#^Method WireMock\\Integration\\MultipartIntegrationTest\:\:testMultipartMatchingTypeCanBetSetToAll\(\) has no return type specified\.$#'
- identifier: missingType.return
- count: 1
+ message: '#^Offset 0 might not exist on array\\|null\.$#'
+ identifier: offsetAccess.notFound
+ count: 2
path: test/WireMock/Integration/MultipartIntegrationTest.php
-
- message: '#^Method WireMock\\Integration\\MultipartIntegrationTest\:\:testMultipartMatchingTypeDefaultsToAny\(\) has no return type specified\.$#'
- identifier: missingType.return
+ message: '#^Offset 1 might not exist on array\\|null\.$#'
+ identifier: offsetAccess.notFound
count: 1
path: test/WireMock/Integration/MultipartIntegrationTest.php
-
- message: '#^Method WireMock\\Integration\\MultipartIntegrationTest\:\:testMultipartWithHeaderCanBeRegistered\(\) has no return type specified\.$#'
- identifier: missingType.return
- count: 1
- path: test/WireMock/Integration/MultipartIntegrationTest.php
+ message: '#^Cannot call method getMatchingValue\(\) on WireMock\\Matching\\UrlMatchingStrategy\|null\.$#'
+ identifier: method.nonObject
+ count: 3
+ path: test/WireMock/Integration/NearMissesIntegrationTest.php
-
- message: '#^Method WireMock\\Integration\\MultipartIntegrationTest\:\:testMultipartWithNameCanBeRegistered\(\) has no return type specified\.$#'
- identifier: missingType.return
- count: 1
- path: test/WireMock/Integration/MultipartIntegrationTest.php
+ message: '#^Cannot call method getRequest\(\) on WireMock\\Stubbing\\StubMapping\|null\.$#'
+ identifier: method.nonObject
+ count: 2
+ path: test/WireMock/Integration/NearMissesIntegrationTest.php
-
- message: '#^Method WireMock\\Integration\\MultipartIntegrationTest\:\:testSimpleMultipartStubCanBeRegistered\(\) has no return type specified\.$#'
- identifier: missingType.return
+ message: '#^Cannot call method getUrlMatchingStrategy\(\) on WireMock\\Matching\\RequestPattern\|null\.$#'
+ identifier: method.nonObject
count: 1
- path: test/WireMock/Integration/MultipartIntegrationTest.php
-
- -
- message: '#^Parameter \#1 \$localStubMapping of function assertThatTheOnlyMappingPresentIs expects WireMock\\Stubbing\\StubMapping, mixed given\.$#'
- identifier: argument.type
- count: 5
- path: test/WireMock/Integration/MultipartIntegrationTest.php
+ path: test/WireMock/Integration/NearMissesIntegrationTest.php
-
message: '#^Method WireMock\\Integration\\NearMissesIntegrationTest\:\:testFindNearMissesForAllUnmatched\(\) has no return type specified\.$#'
@@ -990,30 +1248,6 @@ parameters:
count: 1
path: test/WireMock/Integration/NearMissesIntegrationTest.php
- -
- message: '#^Cannot call method getAdditionalProxyRequestHeaders\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Integration/ProxyingIntegrationTest.php
-
- -
- message: '#^Cannot call method getProxyBaseUrl\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Integration/ProxyingIntegrationTest.php
-
- -
- message: '#^Cannot call method getProxyUrlPrefixToRemove\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Integration/ProxyingIntegrationTest.php
-
- -
- message: '#^Cannot call method getResponse\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 3
- path: test/WireMock/Integration/ProxyingIntegrationTest.php
-
-
message: '#^Method WireMock\\Integration\\ProxyingIntegrationTest\:\:testAdditionProxiedRequestHeadersCanBeSet\(\) has no return type specified\.$#'
identifier: missingType.return
@@ -1032,18 +1266,6 @@ parameters:
count: 1
path: test/WireMock/Integration/ProxyingIntegrationTest.php
- -
- message: '#^Parameter \#1 \$localStubMapping of function assertThatTheOnlyMappingPresentIs expects WireMock\\Stubbing\\StubMapping, mixed given\.$#'
- identifier: argument.type
- count: 3
- path: test/WireMock/Integration/ProxyingIntegrationTest.php
-
- -
- message: '#^Cannot call method isAlive\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 2
- path: test/WireMock/Integration/RecordingIntegrationTest.php
-
-
message: '#^Method WireMock\\Integration\\RecordingIntegrationTest\:\:testPreviouslyIssuedRequestsCanBeSnapshotted\(\) has no return type specified\.$#'
identifier: missingType.return
@@ -1128,24 +1350,6 @@ parameters:
count: 1
path: test/WireMock/Integration/RecordingIntegrationTest.php
- -
- message: '#^Static property WireMock\\Integration\\RecordingIntegrationTest\:\:\$_wireMock2 \(WireMock\\Client\\WireMock\) does not accept mixed\.$#'
- identifier: assign.propertyType
- count: 1
- path: test/WireMock/Integration/RecordingIntegrationTest.php
-
- -
- message: '#^Static property WireMock\\Integration\\WireMockIntegrationTest\:\:\$_wireMock \(WireMock\\Client\\WireMock\) does not accept mixed\.$#'
- identifier: assign.propertyType
- count: 1
- path: test/WireMock/Integration/RecordingIntegrationTest.php
-
- -
- message: '#^Cannot call method getId\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Integration/RequestsIntegrationTest.php
-
-
message: '#^Method WireMock\\Integration\\RequestsIntegrationTest\:\:testFindingAllRequestsReturnsMatchingRequestDetails\(\) has no return type specified\.$#'
identifier: missingType.return
@@ -1219,29 +1423,11 @@ parameters:
path: test/WireMock/Integration/RequestsIntegrationTest.php
-
- message: '#^Parameter \#1 \$stubId of static method WireMock\\Client\\ServeEventQuery\:\:forStubMapping\(\) expects string, mixed given\.$#'
+ message: '#^Parameter \#1 \$stubId of static method WireMock\\Client\\ServeEventQuery\:\:forStubMapping\(\) expects string, string\|null given\.$#'
identifier: argument.type
count: 1
path: test/WireMock/Integration/RequestsIntegrationTest.php
- -
- message: '#^Cannot call method getNewScenarioState\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Integration/ScenarioIntegrationTest.php
-
- -
- message: '#^Cannot call method getRequiredScenarioState\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Integration/ScenarioIntegrationTest.php
-
- -
- message: '#^Cannot call method getScenarioName\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Integration/ScenarioIntegrationTest.php
-
-
message: '#^Method WireMock\\Integration\\ScenarioIntegrationTest\:\:testGettingScenarios\(\) has no return type specified\.$#'
identifier: missingType.return
@@ -1270,142 +1456,34 @@ parameters:
message: '#^Method WireMock\\Integration\\ScenarioIntegrationTest\:\:testScenarioStateCanBeSetDirectly\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
- path: test/WireMock/Integration/ScenarioIntegrationTest.php
-
- -
- message: '#^Method WireMock\\Integration\\ScenarioIntegrationTest\:\:testScenariosCanBeReset\(\) has no return type specified\.$#'
- identifier: missingType.return
- count: 1
- path: test/WireMock/Integration/ScenarioIntegrationTest.php
-
- -
- message: '#^Method WireMock\\Integration\\ScenarioIntegrationTest\:\:testSingleScenarioCanBeReset\(\) has no return type specified\.$#'
- identifier: missingType.return
- count: 1
- path: test/WireMock/Integration/ScenarioIntegrationTest.php
-
- -
- message: '#^Parameter \#1 \$localStubMapping of function assertThatTheOnlyMappingPresentIs expects WireMock\\Stubbing\\StubMapping, mixed given\.$#'
- identifier: argument.type
- count: 3
- path: test/WireMock/Integration/ScenarioIntegrationTest.php
-
- -
- message: '#^Method WireMock\\Integration\\ShutdownIntegrationTest\:\:testShutdownTerminatesStandaloneServer\(\) has no return type specified\.$#'
- identifier: missingType.return
- count: 1
- path: test/WireMock/Integration/ShutdownIntegrationTest.php
-
- -
- message: '#^Cannot access offset ''X\-Munged\-Date'' on mixed\.$#'
- identifier: offsetAccess.nonOffsetAccessible
- count: 4
- path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- -
- message: '#^Cannot access offset 0 on mixed\.$#'
- identifier: offsetAccess.nonOffsetAccessible
- count: 3
- path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- -
- message: '#^Cannot call method getBodyPatterns\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 4
- path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- -
- message: '#^Cannot call method getCustomMatcher\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 2
- path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- -
- message: '#^Cannot call method getHeaders\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 7
- path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- -
- message: '#^Cannot call method getId\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- -
- message: '#^Cannot call method getMatchingType\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- -
- message: '#^Cannot call method getMatchingValue\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 5
- path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- -
- message: '#^Cannot call method getMetadata\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- -
- message: '#^Cannot call method getName\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 2
- path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- -
- message: '#^Cannot call method getParameters\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 2
- path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- -
- message: '#^Cannot call method getRequest\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 20
- path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- -
- message: '#^Cannot call method getResponse\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 6
- path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- -
- message: '#^Cannot call method getTransformerParameters\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 2
- path: test/WireMock/Integration/StubbingIntegrationTest.php
+ path: test/WireMock/Integration/ScenarioIntegrationTest.php
-
- message: '#^Cannot call method getTransformers\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 2
- path: test/WireMock/Integration/StubbingIntegrationTest.php
+ message: '#^Method WireMock\\Integration\\ScenarioIntegrationTest\:\:testScenariosCanBeReset\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/ScenarioIntegrationTest.php
-
- message: '#^Cannot call method getUrlMatchingStrategy\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 7
- path: test/WireMock/Integration/StubbingIntegrationTest.php
+ message: '#^Method WireMock\\Integration\\ScenarioIntegrationTest\:\:testSingleScenarioCanBeReset\(\) has no return type specified\.$#'
+ identifier: missingType.return
+ count: 1
+ path: test/WireMock/Integration/ScenarioIntegrationTest.php
-
- message: '#^Cannot call method reset\(\) on mixed\.$#'
- identifier: method.nonObject
+ message: '#^Method WireMock\\Integration\\ShutdownIntegrationTest\:\:testShutdownTerminatesStandaloneServer\(\) has no return type specified\.$#'
+ identifier: missingType.return
count: 1
- path: test/WireMock/Integration/StubbingIntegrationTest.php
+ path: test/WireMock/Integration/ShutdownIntegrationTest.php
-
- message: '#^Cannot call method resetToDefault\(\) on mixed\.$#'
+ message: '#^Cannot call method getName\(\) on WireMock\\Matching\\CustomMatcherDefinition\|null\.$#'
identifier: method.nonObject
- count: 1
+ count: 2
path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- message: '#^Cannot call method stubFor\(\) on mixed\.$#'
+ message: '#^Cannot call method getParameters\(\) on WireMock\\Matching\\CustomMatcherDefinition\|null\.$#'
identifier: method.nonObject
count: 2
path: test/WireMock/Integration/StubbingIntegrationTest.php
@@ -1837,47 +1915,23 @@ parameters:
path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- message: '#^Parameter \#1 \$id of method WireMock\\Client\\WireMock\:\:removeStub\(\) expects string, mixed given\.$#'
- identifier: argument.type
- count: 1
- path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- -
- message: '#^Parameter \#1 \$localStubMapping of function assertThatTheOnlyMappingPresentIs expects WireMock\\Stubbing\\StubMapping, mixed given\.$#'
- identifier: argument.type
- count: 61
- path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- -
- message: '#^Parameter \#1 \$objectOrValue of method ReflectionProperty\:\:setValue\(\) expects object\|null, mixed given\.$#'
- identifier: argument.type
- count: 7
- path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- -
- message: '#^Parameter \#2 \$array of function array_map expects array, mixed given\.$#'
- identifier: argument.type
- count: 3
+ message: '#^Offset ''X\-Munged\-Date'' might not exist on array\\|null\.$#'
+ identifier: offsetAccess.notFound
+ count: 4
path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- message: '#^Parameter \#2 \$valueMatchingStrategy of method WireMock\\Client\\MappingBuilder\:\:withHeader\(\) expects WireMock\\Client\\ValueMatchingStrategy, mixed given\.$#'
- identifier: argument.type
+ message: '#^Offset 0 might not exist on array\\|null\.$#'
+ identifier: offsetAccess.notFound
count: 1
path: test/WireMock/Integration/StubbingIntegrationTest.php
-
- message: '#^Parameter \#2 \$valueMatchingStrategy of method WireMock\\Client\\MappingBuilder\:\:withQueryParam\(\) expects WireMock\\Client\\ValueMatchingStrategy, mixed given\.$#'
+ message: '#^Parameter \#1 \$id of method WireMock\\Client\\WireMock\:\:removeStub\(\) expects string, string\|null given\.$#'
identifier: argument.type
count: 1
path: test/WireMock/Integration/StubbingIntegrationTest.php
- -
- message: '#^Binary operation "\." between ''/'' and mixed results in an error\.$#'
- identifier: binaryOp.invalid
- count: 1
- path: test/WireMock/Integration/TestClient.php
-
-
message: '#^Method WireMock\\Integration\\TestClient\:\:__construct\(\) has parameter \$_hostname with no type specified\.$#'
identifier: missingType.parameter
@@ -1938,12 +1992,6 @@ parameters:
count: 1
path: test/WireMock/Integration/TestClient.php
- -
- message: '#^Method WireMock\\Integration\\TestClient\:\:getLastRequestTimeMillis\(\) should return float\|null but returns mixed\.$#'
- identifier: return.type
- count: 1
- path: test/WireMock/Integration/TestClient.php
-
-
message: '#^Method WireMock\\Integration\\TestClient\:\:post\(\) has no return type specified\.$#'
identifier: missingType.return
@@ -1962,54 +2010,6 @@ parameters:
count: 1
path: test/WireMock/Integration/TestClient.php
- -
- message: '#^Parameter \#1 \$ch of function curl_exec expects resource, mixed given\.$#'
- identifier: argument.type
- count: 1
- path: test/WireMock/Integration/TestClient.php
-
- -
- message: '#^Parameter \#1 \$haystack of function strpos expects string, mixed given\.$#'
- identifier: argument.type
- count: 1
- path: test/WireMock/Integration/TestClient.php
-
- -
- message: '#^Parameter \#1 \$url of function curl_init expects string, mixed given\.$#'
- identifier: argument.type
- count: 2
- path: test/WireMock/Integration/TestClient.php
-
- -
- message: '#^Parameter \#3 \$value of function curl_setopt expects array\, array given\.$#'
- identifier: argument.type
- count: 1
- path: test/WireMock/Integration/TestClient.php
-
- -
- message: '#^Parameter \#3 \$value of function curl_setopt expects array\|string, mixed given\.$#'
- identifier: argument.type
- count: 1
- path: test/WireMock/Integration/TestClient.php
-
- -
- message: '#^Part \$path \(mixed\) of encapsed string cannot be cast to string\.$#'
- identifier: encapsedStringPart.nonString
- count: 1
- path: test/WireMock/Integration/TestClient.php
-
- -
- message: '#^Part \$this\-\>_hostname \(mixed\) of encapsed string cannot be cast to string\.$#'
- identifier: encapsedStringPart.nonString
- count: 1
- path: test/WireMock/Integration/TestClient.php
-
- -
- message: '#^Part \$this\-\>_port \(mixed\) of encapsed string cannot be cast to string\.$#'
- identifier: encapsedStringPart.nonString
- count: 1
- path: test/WireMock/Integration/TestClient.php
-
-
message: '#^Property WireMock\\Integration\\TestClient\:\:\$_hostname has no type specified\.$#'
identifier: missingType.property
@@ -2028,12 +2028,6 @@ parameters:
count: 1
path: test/WireMock/Integration/TestClient.php
- -
- message: '#^Cannot use \+\+ on mixed\.$#'
- identifier: postInc.type
- count: 1
- path: test/WireMock/Integration/VerificationIntegrationTest.php
-
-
message: '#^Method WireMock\\Integration\\VerificationIntegrationTest\:\:testCanVerifyASpecificNumberOfRequestsOccurred\(\) has no return type specified\.$#'
identifier: missingType.return
@@ -2130,24 +2124,6 @@ parameters:
count: 1
path: test/WireMock/Integration/VerificationIntegrationTest.php
- -
- message: '#^Parameter \#1 \$count of method PHPUnit\\Framework\\TestCase\:\:addToAssertionCount\(\) expects int, mixed given\.$#'
- identifier: argument.type
- count: 1
- path: test/WireMock/Integration/VerificationIntegrationTest.php
-
- -
- message: '#^Parameter \#1 \$exception of method PHPUnit\\Framework\\TestCase\:\:expectException\(\) expects class\-string\, string given\.$#'
- identifier: argument.type
- count: 7
- path: test/WireMock/Integration/VerificationIntegrationTest.php
-
- -
- message: '#^Parameter \#1 \$requestPatternBuilderOrCount of method WireMock\\Client\\WireMock\:\:verify\(\) expects int\|WireMock\\Client\\RequestPatternBuilder\|WireMock\\Verification\\CountMatchingStrategy, mixed given\.$#'
- identifier: argument.type
- count: 1
- path: test/WireMock/Integration/VerificationIntegrationTest.php
-
-
message: '#^Property WireMock\\Integration\\VerificationIntegrationTest\:\:\$_verificationCount has no type specified\.$#'
identifier: missingType.property
@@ -2184,18 +2160,6 @@ parameters:
count: 1
path: test/WireMock/Integration/WebhookIntegrationTest.php
- -
- message: '#^Parameter \#1 \$localStubMapping of function assertThatTheOnlyMappingPresentIs expects WireMock\\Stubbing\\StubMapping, mixed given\.$#'
- identifier: argument.type
- count: 5
- path: test/WireMock/Integration/WebhookIntegrationTest.php
-
- -
- message: '#^Cannot call method isAlive\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Integration/WireMockIntegrationTest.php
-
-
message: '#^Method WireMock\\Integration\\WireMockIntegrationTest\:\:clearMappings\(\) has no return type specified\.$#'
identifier: missingType.return
@@ -2214,18 +2178,6 @@ parameters:
count: 1
path: test/WireMock/Integration/WireMockIntegrationTest.php
- -
- message: '#^Part \$cmd \(mixed\) of encapsed string cannot be cast to string\.$#'
- identifier: encapsedStringPart.nonString
- count: 1
- path: test/WireMock/Integration/WireMockIntegrationTest.php
-
- -
- message: '#^Static property WireMock\\Integration\\WireMockIntegrationTest\:\:\$_wireMock \(WireMock\\Client\\WireMock\) does not accept mixed\.$#'
- identifier: assign.propertyType
- count: 1
- path: test/WireMock/Integration/WireMockIntegrationTest.php
-
-
message: '#^Method WireMock\\Matching\\RequestPatternTest\:\:testMethodAndMatchingStategyAreAvailable\(\) has no return type specified\.$#'
identifier: missingType.return
@@ -2262,18 +2214,6 @@ parameters:
count: 1
path: test/WireMock/Matching/UrlMatchingStrategyTest.php
- -
- message: '#^Cannot call method normalize\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Recording/RecordSpecBuildTest.php
-
- -
- message: '#^Cannot call method serialize\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Recording/RecordSpecBuildTest.php
-
-
message: '#^Method WireMock\\Recording\\RecordSpecBuildTest\:\:testAutoRequestBodyPatternIsIncludedInArray\(\) has no return type specified\.$#'
identifier: missingType.return
@@ -2496,42 +2436,6 @@ parameters:
count: 1
path: test/WireMock/Serde/SerializerIntegrationTest.php
- -
- message: '#^Parameter \#1 \$className of method WireMock\\Serde\\SerializerIntegrationTest\:\:serializerFor\(\) expects string, mixed given\.$#'
- identifier: argument.type
- count: 2
- path: test/WireMock/Serde/SerializerIntegrationTest.php
-
- -
- message: '#^Parameter \#1 \$json of method WireMock\\Serde\\Serializer\:\:deserialize\(\) expects string, mixed given\.$#'
- identifier: argument.type
- count: 2
- path: test/WireMock/Serde/SerializerIntegrationTest.php
-
- -
- message: '#^Parameter \#1 \$original of class WireMock\\Serde\\TestClasses\\UnwrappedAndNamedProperty constructor expects WireMock\\Serde\\TestClasses\\FieldOnlyPrimitives, mixed given\.$#'
- identifier: argument.type
- count: 1
- path: test/WireMock/Serde/SerializerIntegrationTest.php
-
- -
- message: '#^Parameter \#1 \$primitiveTypes of class WireMock\\Serde\\TestClasses\\ClassTypeFields constructor expects WireMock\\Serde\\TestClasses\\FieldOnlyPrimitives, mixed given\.$#'
- identifier: argument.type
- count: 1
- path: test/WireMock/Serde/SerializerIntegrationTest.php
-
- -
- message: '#^Parameter \#2 \$type of method WireMock\\Serde\\Serializer\:\:deserialize\(\) expects string, mixed given\.$#'
- identifier: argument.type
- count: 2
- path: test/WireMock/Serde/SerializerIntegrationTest.php
-
- -
- message: '#^Parameter \#2 \$unwrappedClass of class WireMock\\Serde\\TestClasses\\UnwrappedClassProperty constructor expects WireMock\\Serde\\TestClasses\\FieldOnlyPrimitives, mixed given\.$#'
- identifier: argument.type
- count: 1
- path: test/WireMock/Serde/SerializerIntegrationTest.php
-
-
message: '#^Variable \$explicitType on left side of \?\? is never defined\.$#'
identifier: nullCoalesce.variable
@@ -2551,13 +2455,7 @@ parameters:
path: test/WireMock/Serde/SerializerTest.php
-
- message: '#^Cannot call method thenReturn\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 4
- path: test/WireMock/Serde/SerializerTest.php
-
- -
- message: '#^Method JsonSerializable@anonymous/WireMock/Serde/SerializerTest\.php\:36\:\:jsonSerialize\(\) return type has no value type specified in iterable type array\.$#'
+ message: '#^Method JsonSerializable@anonymous/test/WireMock/Serde/SerializerTest\.php\:36\:\:jsonSerialize\(\) return type has no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: test/WireMock/Serde/SerializerTest.php
@@ -2634,12 +2532,6 @@ parameters:
count: 1
path: test/WireMock/Serde/TestClasses/CatchAllAndNamedProperty.php
- -
- message: '#^Property WireMock\\Serde\\TestClasses\\CatchAllAndNamedProperty\:\:\$original \(array\\) does not accept array\.$#'
- identifier: assign.propertyType
- count: 1
- path: test/WireMock/Serde/TestClasses/CatchAllAndNamedProperty.php
-
-
message: '#^Property WireMock\\Serde\\TestClasses\\CatchAllAndNamedProperty\:\:\$original is never read, only written\.$#'
identifier: property.onlyWritten
@@ -2670,12 +2562,6 @@ parameters:
count: 1
path: test/WireMock/Serde/TestClasses/CatchAllTypedArrayProperty.php
- -
- message: '#^Method WireMock\\Serde\\TestClasses\\CatchAllUntypedArrayProperty\:\:__construct\(\) has parameter \$catchAll with no value type specified in iterable type array\.$#'
- identifier: missingType.iterableValue
- count: 1
- path: test/WireMock/Serde/TestClasses/CatchAllUntypedArrayProperty.php
-
-
message: '#^Property WireMock\\Serde\\TestClasses\\CatchAllUntypedArrayProperty\:\:\$catchAll is never read, only written\.$#'
identifier: property.onlyWritten
@@ -2736,12 +2622,6 @@ parameters:
count: 1
path: test/WireMock/Serde/TestClasses/DiscriminatedTypeParent.php
- -
- message: '#^Static method WireMock\\Serde\\TestClasses\\DiscriminatedTypeParent\:\:getDiscriminatorMapping\(\) is unused\.$#'
- identifier: method.unused
- count: 1
- path: test/WireMock/Serde/TestClasses/DiscriminatedTypeParent.php
-
-
message: '#^Property WireMock\\Serde\\TestClasses\\DiscriminatedTypeSubclassA\:\:\$subclassAProp is never read, only written\.$#'
identifier: property.onlyWritten
@@ -2760,12 +2640,6 @@ parameters:
count: 1
path: test/WireMock/Serde/TestClasses/DiscriminatedTypeSubclassB.php
- -
- message: '#^Property WireMock\\Serde\\TestClasses\\DiscriminatedTypeSubclassB\:\:\$subclassBProp type has no value type specified in iterable type array\.$#'
- identifier: missingType.iterableValue
- count: 1
- path: test/WireMock/Serde/TestClasses/DiscriminatedTypeSubclassB.php
-
-
message: '#^Method WireMock\\Serde\\TestClasses\\FieldOnlyPrimitives\:\:create\(\) has no return type specified\.$#'
identifier: missingType.return
@@ -2844,24 +2718,12 @@ parameters:
count: 1
path: test/WireMock/Serde/TestClasses/PrimitiveArrayFields.php
- -
- message: '#^Property WireMock\\Serde\\TestClasses\\PrimitiveArrayFields\:\:\$intArray \(array\\) does not accept array\.$#'
- identifier: assign.propertyType
- count: 1
- path: test/WireMock/Serde/TestClasses/PrimitiveArrayFields.php
-
-
message: '#^Property WireMock\\Serde\\TestClasses\\PrimitiveArrayFields\:\:\$intArray is never read, only written\.$#'
identifier: property.onlyWritten
count: 1
path: test/WireMock/Serde/TestClasses/PrimitiveArrayFields.php
- -
- message: '#^Property WireMock\\Serde\\TestClasses\\PrimitiveArrayFields\:\:\$intByString \(array\\) does not accept array\.$#'
- identifier: assign.propertyType
- count: 1
- path: test/WireMock/Serde/TestClasses/PrimitiveArrayFields.php
-
-
message: '#^Property WireMock\\Serde\\TestClasses\\PrimitiveArrayFields\:\:\$intByString is never read, only written\.$#'
identifier: property.onlyWritten
@@ -2874,12 +2736,6 @@ parameters:
count: 1
path: test/WireMock/Serde/TestClasses/PrimitiveArrayFields.php
- -
- message: '#^Property WireMock\\Serde\\TestClasses\\PrimitiveArrayFields\:\:\$untypedArray type has no value type specified in iterable type array\.$#'
- identifier: missingType.iterableValue
- count: 1
- path: test/WireMock/Serde/TestClasses/PrimitiveArrayFields.php
-
-
message: '#^Property WireMock\\Serde\\TestClasses\\UnionTypeFields\:\:\$arrayOfUnion is never read, only written\.$#'
identifier: property.onlyWritten
@@ -2940,12 +2796,6 @@ parameters:
count: 1
path: test/WireMock/Serde/TestClasses/UnwrappedArrayProperty.php
- -
- message: '#^Property WireMock\\Serde\\TestClasses\\UnwrappedArrayProperty\:\:\$unwrappedArray \(array\\) does not accept array\.$#'
- identifier: assign.propertyType
- count: 1
- path: test/WireMock/Serde/TestClasses/UnwrappedArrayProperty.php
-
-
message: '#^Property WireMock\\Serde\\TestClasses\\UnwrappedArrayProperty\:\:\$unwrappedArray is never read, only written\.$#'
identifier: property.onlyWritten
@@ -2971,19 +2821,19 @@ parameters:
path: test/WireMock/Serde/TestClasses/UnwrappedPrimitiveProperty.php
-
- message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArray@anonymous/WireMock/Serde/Type/SerdeTypeArrayTest\.php\:14\:\:denormalizeFromArray\(\) has parameter \$data with no value type specified in iterable type array\.$#'
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArray@anonymous/test/WireMock/Serde/Type/SerdeTypeArrayTest\.php\:14\:\:denormalizeFromArray\(\) has parameter \$data with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: test/WireMock/Serde/Type/SerdeTypeArrayTest.php
-
- message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArray@anonymous/WireMock/Serde/Type/SerdeTypeArrayTest\.php\:14\:\:denormalizeFromArray\(\) has parameter \$path with no value type specified in iterable type array\.$#'
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArray@anonymous/test/WireMock/Serde/Type/SerdeTypeArrayTest\.php\:14\:\:denormalizeFromArray\(\) has parameter \$path with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: test/WireMock/Serde/Type/SerdeTypeArrayTest.php
-
- message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArray@anonymous/WireMock/Serde/Type/SerdeTypeArrayTest\.php\:14\:\:denormalizeFromArray\(\) return type has no value type specified in iterable type array\.$#'
+ message: '#^Method WireMock\\Serde\\Type\\SerdeTypeArray@anonymous/test/WireMock/Serde/Type/SerdeTypeArrayTest\.php\:14\:\:denormalizeFromArray\(\) return type has no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: test/WireMock/Serde/Type/SerdeTypeArrayTest.php
@@ -3084,30 +2934,6 @@ parameters:
count: 1
path: test/WireMock/Serde/Type/SerdeTypePrimitiveTest.php
- -
- message: '#^Binary operation "\." between ''\?'' and mixed results in an error\.$#'
- identifier: binaryOp.invalid
- count: 1
- path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
-
- -
- message: '#^Binary operation "\." between ''null\|'' and mixed results in an error\.$#'
- identifier: binaryOp.invalid
- count: 1
- path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
-
- -
- message: '#^Binary operation "\." between mixed and ''\[\]'' results in an error\.$#'
- identifier: binaryOp.invalid
- count: 1
- path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
-
- -
- message: '#^Binary operation "\." between mixed and ''\|null'' results in an error\.$#'
- identifier: binaryOp.invalid
- count: 1
- path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
-
-
message: '#^Method WireMock\\SerdeGen\\SerdeTypeParserTest\:\:providerArrayKeyTypes\(\) return type has no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
@@ -3444,42 +3270,6 @@ parameters:
count: 1
path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
- -
- message: '#^Parameter \#1 \$type of method WireMock\\SerdeGen\\SerdeTypeParser\:\:parseTypeString\(\) expects string, mixed given\.$#'
- identifier: argument.type
- count: 2
- path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
-
- -
- message: '#^Parameter \#1 \$typeString of class WireMock\\Serde\\Type\\SerdeTypePrimitive constructor expects string, mixed given\.$#'
- identifier: argument.type
- count: 7
- path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
-
- -
- message: '#^Part \$keyIn \(mixed\) of encapsed string cannot be cast to string\.$#'
- identifier: encapsedStringPart.nonString
- count: 1
- path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
-
- -
- message: '#^Part \$keyInputType \(mixed\) of encapsed string cannot be cast to string\.$#'
- identifier: encapsedStringPart.nonString
- count: 3
- path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
-
- -
- message: '#^Part \$valIn \(mixed\) of encapsed string cannot be cast to string\.$#'
- identifier: encapsedStringPart.nonString
- count: 1
- path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
-
- -
- message: '#^Part \$valueInputType \(mixed\) of encapsed string cannot be cast to string\.$#'
- identifier: encapsedStringPart.nonString
- count: 1
- path: test/WireMock/SerdeGen/SerdeTypeParserTest.php
-
-
message: '#^Property WireMock\\SerdeGen\\TestClasses\\CatchAllPrimitiveProperty\:\:\$catchAllPrimitive is never read, only written\.$#'
identifier: property.onlyWritten
@@ -3588,12 +3378,6 @@ parameters:
count: 1
path: test/WireMock/SerdeGen/WireMockSerdeGenTest.php
- -
- message: '#^Cannot call method normalize\(\) on mixed\.$#'
- identifier: method.nonObject
- count: 1
- path: test/WireMock/Stubbing/StubMappingTest.php
-
-
message: '#^Method WireMock\\Stubbing\\StubMappingTest\:\:testIdIsInArrayIfSpecified\(\) has no return type specified\.$#'
identifier: missingType.return
diff --git a/phpstan.neon b/phpstan.neon
index 1ac98e0..897cd4a 100644
--- a/phpstan.neon
+++ b/phpstan.neon
@@ -1,5 +1,6 @@
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
+ - phpstan-baseline.neon
parameters:
level: 8
@@ -7,12 +8,10 @@ parameters:
- src
- test
- excludePaths:
- analyse:
- - test/
-
editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%&project=wiremock-php'
+ reportUnmatchedIgnoredErrors: false
+
stubFiles:
- config/phpstan/Hamcrest/Description.stub
- config/phpstan/Hamcrest/SelfDescribing.stub
diff --git a/src/WireMock/Client/ClientException.php b/src/WireMock/Client/ClientException.php
index 12d8125..0ca63ba 100644
--- a/src/WireMock/Client/ClientException.php
+++ b/src/WireMock/Client/ClientException.php
@@ -4,8 +4,8 @@
class ClientException extends \Exception
{
- private $_responseCode;
- private $_response;
+ private int $_responseCode;
+ private string $_response;
public function __construct(int $responseCode, string $response)
{
diff --git a/src/WireMock/Client/CountMatchingRequestsResult.php b/src/WireMock/Client/CountMatchingRequestsResult.php
index 9e181a4..eb60905 100644
--- a/src/WireMock/Client/CountMatchingRequestsResult.php
+++ b/src/WireMock/Client/CountMatchingRequestsResult.php
@@ -8,7 +8,7 @@ class CountMatchingRequestsResult
private $count;
/**
- * @param $count
+ * @param int $count
*/
public function __construct($count)
{
diff --git a/src/WireMock/Client/Curl.php b/src/WireMock/Client/Curl.php
index cd0c077..990d3ef 100644
--- a/src/WireMock/Client/Curl.php
+++ b/src/WireMock/Client/Curl.php
@@ -2,6 +2,8 @@
namespace WireMock\Client;
+use http\Exception\RuntimeException;
+
class Curl
{
/**
@@ -27,7 +29,7 @@ public function post(string $url, ?string $body = null): string
/**
* @param string $url
- * @param array|string|null $body The request body
+ * @param string|null $body The request body
* @return string The response body
* @throws ClientException
*/
@@ -47,6 +49,9 @@ public function delete(string $url): string
}
/**
+ * @param non-empty-string $method
+ * @param string $url
+ * @return string
* @throws ClientException
*/
private function makeCurlRequest(string $method, string $url, ?string $json = null)
@@ -66,6 +71,11 @@ private function makeCurlRequest(string $method, string $url, ?string $json = nu
));
$result = curl_exec($ch);
+ assert($result !== true, 'if CURLOPT_RETURNTRANSFER is set, this is never true');
+
+ if ($result === false) {
+ throw new RuntimeException('curl_exec failed (returned FALSE)');
+ }
$responseCode = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
if ($responseCode < 200 || $responseCode >= 300) {
diff --git a/src/WireMock/Client/DateTimeMatchingStrategy.php b/src/WireMock/Client/DateTimeMatchingStrategy.php
index 220f2d1..21d3625 100644
--- a/src/WireMock/Client/DateTimeMatchingStrategy.php
+++ b/src/WireMock/Client/DateTimeMatchingStrategy.php
@@ -35,6 +35,10 @@ class DateTimeMatchingStrategy extends ValueMatchingStrategy
/** @var string|null */
private $truncateExpected = null;
+ /**
+ * @param string $matchingType
+ * @param mixed $matchingValue
+ */
public function __construct($matchingType, $matchingValue)
{
parent::__construct($matchingType, $matchingValue);
@@ -113,17 +117,26 @@ public function getTruncateExpected(): ?string
return $this->truncateExpected;
}
- public static function before($dateTimeSpec)
+ /**
+ * @param mixed $dateTimeSpec
+ */
+ public static function before($dateTimeSpec): self
{
return new self("before", $dateTimeSpec);
}
- public static function equalToDateTime($dateTimeSpec)
+ /**
+ * @param mixed $dateTimeSpec
+ */
+ public static function equalToDateTime($dateTimeSpec): self
{
return new self("equalToDateTime", $dateTimeSpec);
}
- public static function after($dateTimeSpec)
+ /**
+ * @param mixed $dateTimeSpec
+ */
+ public static function after($dateTimeSpec): self
{
return new self("after", $dateTimeSpec);
}
diff --git a/src/WireMock/Client/EqualToMatchingStrategy.php b/src/WireMock/Client/EqualToMatchingStrategy.php
index 278b8c9..05e15be 100644
--- a/src/WireMock/Client/EqualToMatchingStrategy.php
+++ b/src/WireMock/Client/EqualToMatchingStrategy.php
@@ -4,9 +4,13 @@
class EqualToMatchingStrategy extends ValueMatchingStrategy
{
- /** @var bool */
+ /** @var boolean */
private $caseInsensitive = false;
+ /**
+ * @param mixed $matchingValue
+ * @param bool $caseInsensitive
+ */
public function __construct($matchingValue, $caseInsensitive = false)
{
parent::__construct('equalTo', $matchingValue);
diff --git a/src/WireMock/Client/EqualToXmlMatchingStrategy.php b/src/WireMock/Client/EqualToXmlMatchingStrategy.php
index c1151b3..1600319 100644
--- a/src/WireMock/Client/EqualToXmlMatchingStrategy.php
+++ b/src/WireMock/Client/EqualToXmlMatchingStrategy.php
@@ -3,7 +3,7 @@
class EqualToXmlMatchingStrategy extends ValueMatchingStrategy
{
- /** @var bool */
+ /** @var boolean */
private $enablePlaceholders;
/** @var string|null */
private $placeholderOpeningDelimiterRegex;
diff --git a/src/WireMock/Client/HttpWait.php b/src/WireMock/Client/HttpWait.php
index 761b3d7..c9986de 100644
--- a/src/WireMock/Client/HttpWait.php
+++ b/src/WireMock/Client/HttpWait.php
@@ -4,7 +4,12 @@
class HttpWait
{
- public function waitForServerToGive200($url, $timeoutSecs = 10, $debug = true)
+ /**
+ * @param string $url
+ * @param int $timeoutSecs
+ * @param bool $debug
+ */
+ public function waitForServerToGive200($url, $timeoutSecs = 10, $debug = true): bool
{
$debugTrace = array();
$startTime = microtime(true);
@@ -17,11 +22,11 @@ public function waitForServerToGive200($url, $timeoutSecs = 10, $debug = true)
continue;
}
- if (isset($headers) && isset($headers[0]) && strpos($headers[0], '200 OK') !== false) {
+ if ($headers && isset($headers[0]) && strpos($headers[0], '200 OK') !== false) {
$serverStarted = true;
break;
} else {
- if (!isset($headers)) {
+ if (!$headers) {
$debugTrace[] = "$url not yet up. \$headers not set";
} else if (!isset($headers[0])) {
$debugTrace[] = "$url not yet up. \$headers[0] not set";
@@ -42,7 +47,11 @@ public function waitForServerToGive200($url, $timeoutSecs = 10, $debug = true)
return $serverStarted;
}
- public function waitForServerToFailToRespond($url, $timeoutSecs = 5)
+ /**
+ * @param string $url
+ * @param int $timeoutSecs
+ */
+ public function waitForServerToFailToRespond($url, $timeoutSecs = 5): bool
{
$startTime = microtime(true);
$serverFailedToRespond = false;
diff --git a/src/WireMock/Client/JsonPathValueMatchingStrategy.php b/src/WireMock/Client/JsonPathValueMatchingStrategy.php
index 8955d6f..05606a5 100644
--- a/src/WireMock/Client/JsonPathValueMatchingStrategy.php
+++ b/src/WireMock/Client/JsonPathValueMatchingStrategy.php
@@ -4,13 +4,6 @@
class JsonPathValueMatchingStrategy extends ValueMatchingStrategy
{
- /**
- * @var string|AdvancedPathPattern
- * @serde-named-by matchingType
- * @serde-possible-names matchingValueNames
- */
- protected $matchingValue;
-
/**
* @param string|AdvancedPathPattern $matchingValue
*/
diff --git a/src/WireMock/Client/JsonValueMatchingStrategy.php b/src/WireMock/Client/JsonValueMatchingStrategy.php
index 11c3480..ea86b84 100644
--- a/src/WireMock/Client/JsonValueMatchingStrategy.php
+++ b/src/WireMock/Client/JsonValueMatchingStrategy.php
@@ -5,10 +5,15 @@
class JsonValueMatchingStrategy extends ValueMatchingStrategy
{
/** @var boolean|null */
- private $ignoreArrayOrder = null;
+ private $ignoreArrayOrder;
/** @var boolean|null */
- private $ignoreExtraElements = null;
+ private $ignoreExtraElements;
+ /**
+ * @param mixed $matchingValue
+ * @param bool|null $ignoreArrayOrder
+ * @param bool|null $ignoreExtraElements
+ */
public function __construct($matchingValue, $ignoreArrayOrder = null, $ignoreExtraElements = null)
{
parent::__construct('equalToJson', $matchingValue);
@@ -17,7 +22,7 @@ public function __construct($matchingValue, $ignoreArrayOrder = null, $ignoreExt
}
/**
- * @return bool|null
+ * @return boolean|null
*/
public function getIgnoreArrayOrder()
{
@@ -25,7 +30,7 @@ public function getIgnoreArrayOrder()
}
/**
- * @return bool|null
+ * @return boolean|null
*/
public function getIgnoreExtraElements()
{
diff --git a/src/WireMock/Client/LoggedRequest.php b/src/WireMock/Client/LoggedRequest.php
index d788614..2cbf244 100644
--- a/src/WireMock/Client/LoggedRequest.php
+++ b/src/WireMock/Client/LoggedRequest.php
@@ -5,27 +5,27 @@
class LoggedRequest
{
/** @var string */
- private $url;
+ private $url; // @phpstan-ignore property.onlyRead (serde can write this)
/** @var string */
- private $absoluteUrl;
+ private $absoluteUrl; // @phpstan-ignore property.onlyRead (serde can write this)
/** @var string */
- private $method;
+ private $method; // @phpstan-ignore property.onlyRead (serde can write this)
/** @var string */
- private $clientIp;
+ private $clientIp; // @phpstan-ignore property.onlyRead (serde can write this)
/** @var array */
- private $headers;
+ private $headers; // @phpstan-ignore property.onlyRead (serde can write this)
/** @var array */
- private $cookies;
+ private $cookies; // @phpstan-ignore property.onlyRead (serde can write this)
/** @var string */
- private $body;
+ private $body; // @phpstan-ignore property.onlyRead (serde can write this)
/** @var string */
- private $bodyAsBase64;
- /** @var bool */
- private $browserProxyRequest;
+ private $bodyAsBase64; // @phpstan-ignore property.onlyRead (serde can write this)
+ /** @var boolean */
+ private $browserProxyRequest; // @phpstan-ignore property.onlyRead (serde can write this)
/** @var int */
- private $loggedDate;
+ private $loggedDate; // @phpstan-ignore property.onlyRead (serde can write this)
/** @var string */
- private $loggedDateString;
+ private $loggedDateString; // @phpstan-ignore property.onlyRead (serde can write this)
/**
* @return string
@@ -60,7 +60,7 @@ public function getClientIp()
}
/**
- * @return array
+ * @return array
*/
public function getHeaders()
{
@@ -68,7 +68,7 @@ public function getHeaders()
}
/**
- * @return array
+ * @return array
*/
public function getCookies()
{
@@ -92,7 +92,7 @@ public function getBodyAsBase64()
}
/**
- * @return boolean
+ * @return bool
*/
public function isBrowserProxyRequest()
{
diff --git a/src/WireMock/Client/LoggedResponse.php b/src/WireMock/Client/LoggedResponse.php
index 4ce8bdf..557d157 100644
--- a/src/WireMock/Client/LoggedResponse.php
+++ b/src/WireMock/Client/LoggedResponse.php
@@ -6,14 +6,14 @@ class LoggedResponse
{
/** @var int */
private $status;
- /** @var array */
+ /** @var array */
private $headers;
/** @var string */
private $body;
/**
* @param int $status
- * @param array $headers
+ * @param array $headers
* @param string $body
*/
public function __construct($status, $body, $headers = [])
@@ -32,7 +32,7 @@ public function getStatus()
}
/**
- * @return array
+ * @return array
*/
public function getHeaders()
{
diff --git a/src/WireMock/Client/MappingBuilder.php b/src/WireMock/Client/MappingBuilder.php
index ea73bf2..895129b 100644
--- a/src/WireMock/Client/MappingBuilder.php
+++ b/src/WireMock/Client/MappingBuilder.php
@@ -20,7 +20,7 @@ class MappingBuilder
private $priority;
/** @var ScenarioMappingBuilder */
private $scenarioBuilder;
- /** @var array */
+ /** @var array */
private $metadata;
/** @var boolean */
private $isPersistent;
@@ -178,7 +178,7 @@ public function willSetStateTo($newScenarioState)
}
/**
- * @param array $metadata
+ * @param array $metadata
* @return MappingBuilder
*/
public function withMetadata(array $metadata)
@@ -189,7 +189,7 @@ public function withMetadata(array $metadata)
/**
* @param string $matcherName
- * @param array $params
+ * @param array $params
* @return MappingBuilder
*/
public function andMatching($matcherName, $params = array())
@@ -222,10 +222,9 @@ public function withPostServeAction($name, WebhookDefinition $webhook)
}
/**
- * @return StubMapping
* @throws \Exception
*/
- public function build()
+ public function build(): StubMapping
{
$responseDefinition = $this->responseDefinitionBuilder->build();
return new StubMapping(
diff --git a/src/WireMock/Client/MultipartValuePattern.php b/src/WireMock/Client/MultipartValuePattern.php
index b30cb6b..ad8a738 100644
--- a/src/WireMock/Client/MultipartValuePattern.php
+++ b/src/WireMock/Client/MultipartValuePattern.php
@@ -11,16 +11,16 @@ class MultipartValuePattern
private $bodyPatterns;
/** @var array|null */
private $headers;
- /** @var string */
+ /** @var string|null */
private $name;
- /** @var string */
+ /** @var string|null */
private $matchingType;
/**
* @param ValueMatchingStrategy[]|null $bodyPatterns
* @param array|null $headers
- * @param string $name
- * @param string $matchingType
+ * @param string|null $name
+ * @param string|null $matchingType
*/
public function __construct($bodyPatterns = null, $headers = null, $name = null, $matchingType = null)
{
@@ -31,7 +31,7 @@ public function __construct($bodyPatterns = null, $headers = null, $name = null,
}
/**
- * @return array
+ * @return ValueMatchingStrategy[]|null
*/
public function getBodyPatterns()
{
@@ -39,7 +39,7 @@ public function getBodyPatterns()
}
/**
- * @return array
+ * @return array|null
*/
public function getHeaders()
{
@@ -47,7 +47,7 @@ public function getHeaders()
}
/**
- * @return string
+ * @return string|null
*/
public function getName()
{
@@ -55,7 +55,7 @@ public function getName()
}
/**
- * @return string
+ * @return string|null
*/
public function getMatchingType()
{
diff --git a/src/WireMock/Client/MultipartValuePatternBuilder.php b/src/WireMock/Client/MultipartValuePatternBuilder.php
index 73eeb30..b812c52 100644
--- a/src/WireMock/Client/MultipartValuePatternBuilder.php
+++ b/src/WireMock/Client/MultipartValuePatternBuilder.php
@@ -55,7 +55,7 @@ public function matchingType($type)
return $this;
}
- public function build()
+ public function build(): MultipartValuePattern
{
return new MultipartValuePattern(
$this->bodyPatterns,
diff --git a/src/WireMock/Client/NearMiss.php b/src/WireMock/Client/NearMiss.php
index bf72a8d..affae42 100644
--- a/src/WireMock/Client/NearMiss.php
+++ b/src/WireMock/Client/NearMiss.php
@@ -16,12 +16,6 @@ class NearMiss
/** @var MatchResult */
private $matchResult;
- /**
- * @param LoggedRequest $request
- * @param StubMapping|null $stubMapping
- * @param RequestPattern|null $requestPattern
- * @param MatchResult $matchResult
- */
public function __construct(
LoggedRequest $request,
?StubMapping $stubMapping,
@@ -34,35 +28,23 @@ public function __construct(
$this->matchResult = $matchResult;
}
- /**
- * @return LoggedRequest
- */
public function getRequest()
{
return $this->request;
}
- /**
- * @return StubMapping
- */
public function getMapping()
{
return $this->stubMapping;
}
- /**
- * @return RequestPattern
- */
- public function getRequestPattern()
+ public function getRequestPattern(): ?RequestPattern
{
return $this->requestPattern;
}
- /**
- * @return MatchResult
- */
- public function getMatchResult()
+ public function getMatchResult(): MatchResult
{
return $this->matchResult;
}
-}
\ No newline at end of file
+}
diff --git a/src/WireMock/Client/RequestPatternBuilder.php b/src/WireMock/Client/RequestPatternBuilder.php
index 66ce392..2f7dd70 100644
--- a/src/WireMock/Client/RequestPatternBuilder.php
+++ b/src/WireMock/Client/RequestPatternBuilder.php
@@ -8,7 +8,9 @@
class RequestPatternBuilder
{
+ /** @var string|null */
private $method;
+ /** @var UrlMatchingStrategy|null */
private $urlMatchingStrategy;
/** @var array|null */
private $headers;
@@ -24,12 +26,12 @@ class RequestPatternBuilder
private $basicCredentials;
/** @var CustomMatcherDefinition */
private $customMatcherDefinition;
- /** @var ValueMatchingStrategy[] */
+ /** @var ValueMatchingStrategy|null */
private $hostPattern;
/**
* @param string $methodOrCustomMatcherName
- * @param UrlMatchingStrategy|array $urlMatchingStrategyOrCustomParams
+ * @param UrlMatchingStrategy|array $urlMatchingStrategyOrCustomParams
*/
public function __construct($methodOrCustomMatcherName, $urlMatchingStrategyOrCustomParams)
{
@@ -118,7 +120,7 @@ public function withBasicAuth($username, $password)
/**
* @param string $customMatcherName
- * @param array $customParams
+ * @param array $customParams
* @return RequestPatternBuilder
*/
public function withCustomMatcher($customMatcherName, $customParams)
diff --git a/src/WireMock/Client/ResponseDefinitionBuilder.php b/src/WireMock/Client/ResponseDefinitionBuilder.php
index 4e9355f..9ecabca 100644
--- a/src/WireMock/Client/ResponseDefinitionBuilder.php
+++ b/src/WireMock/Client/ResponseDefinitionBuilder.php
@@ -10,24 +10,34 @@
class ResponseDefinitionBuilder
{
+ /** @var int */
protected $status = 200;
+ /** @var string|null */
protected $statusMessage;
+ /** @var string|null */
protected $body;
+ /** @var string|null */
protected $bodyFile;
+ /** @var string|null */
protected $bodyData;
+ /** @var array|null */
protected $headers;
+ /** @var string|null */
protected $proxyBaseUrl;
+ /** @var int|null */
protected $fixedDelayMillis;
/** @var DelayDistribution */
protected $randomDelayDistribution;
/** @var ChunkedDribbleDelay */
protected $chunkedDribbleDelay;
+ /** @var string|null */
protected $fault;
/** @var string[]|null */
private $transformers;
- /** @var array|null */
+ /** @var array|null */
private $transformerParameters;
+ /** @var array|null */
protected $additionalRequestHeaders;
/** @var string */
protected $proxyUrlPrefixToRemove;
@@ -84,8 +94,8 @@ public function withBodyData($bytesAsString)
}
/**
- * @param $headerName
- * @param $headerValue
+ * @param string $headerName
+ * @param string $headerValue
* @return ResponseDefinitionBuilder
*/
public function withHeader($headerName, $headerValue)
@@ -145,7 +155,7 @@ public function withLogNormalRandomDelay($median, $sigma)
/**
* @param int $lower
- * @param int upper
+ * @param int $upper
* @return ResponseDefinitionBuilder
*/
public function withUniformRandomDelay($lower, $upper)
@@ -166,7 +176,7 @@ public function withChunkedDribbleDelay($numberOfChunks, $totalDurationMillis)
}
/**
- * @param $fault
+ * @param string $fault
* @return ResponseDefinitionBuilder
*/
public function withFault($fault)
@@ -208,7 +218,7 @@ public function withTransformer($transformerName, $paramName, $paramValue)
return $this;
}
- public function build()
+ public function build(): ResponseDefinition
{
return new ResponseDefinition(
$this->status,
diff --git a/src/WireMock/Client/ServeEventQuery.php b/src/WireMock/Client/ServeEventQuery.php
index 825da89..b924cdb 100644
--- a/src/WireMock/Client/ServeEventQuery.php
+++ b/src/WireMock/Client/ServeEventQuery.php
@@ -54,19 +54,19 @@ public function withStubMapping($stubId)
return $this;
}
- public function toParamsString()
+ public function toParamsString(): string
{
$params = [];
- if ($this->since) {
+ if (isset($this->since)) {
$params[] = 'since=' . urlencode($this->since->format(DateTime::ATOM));
}
- if ($this->limit) {
- $params[] = 'limit=' . urlencode($this->limit);
+ if (isset($this->limit)) {
+ $params[] = 'limit=' . urlencode((string) $this->limit);
}
- if ($this->unmatched) {
+ if (isset($this->unmatched)) {
$params[] = 'unmatched=true';
}
- if ($this->matchingStubId) {
+ if (isset($this->matchingStubId)) {
$params[] = 'matchingStub=' . urlencode($this->matchingStubId);
}
return join('&', $params);
diff --git a/src/WireMock/Client/UnmatchedRequests.php b/src/WireMock/Client/UnmatchedRequests.php
index 21c5263..42303e3 100644
--- a/src/WireMock/Client/UnmatchedRequests.php
+++ b/src/WireMock/Client/UnmatchedRequests.php
@@ -28,7 +28,7 @@ public function getRequests()
}
/**
- * @return boolean
+ * @return bool
*/
public function getRequestJournalDisabled()
{
diff --git a/src/WireMock/Client/ValueMatchingStrategy.php b/src/WireMock/Client/ValueMatchingStrategy.php
index ff92c4b..336da48 100644
--- a/src/WireMock/Client/ValueMatchingStrategy.php
+++ b/src/WireMock/Client/ValueMatchingStrategy.php
@@ -18,6 +18,7 @@
*/
class ValueMatchingStrategy
{
+ /** @var array */
private static $subclassByMatchingType = [
'absent' => ValueMatchingStrategy::class,
'binaryEqualTo' => ValueMatchingStrategy::class,
@@ -43,8 +44,14 @@ class ValueMatchingStrategy
'and' => LogicalOperatorMatchingStrategy::class,
'or' => LogicalOperatorMatchingStrategy::class,
];
- /** @noinspection PhpUnusedPrivateMethodInspection */
- private static function matchingValueNames(): array { return array_keys(self::$subclassByMatchingType); }
+ /**
+ * @return list
+ * @noinspection PhpUnusedPrivateMethodInspection
+ */
+ private static function matchingValueNames(): array // @phpstan-ignore method.unused (used by serde)
+ {
+ return array_keys(self::$subclassByMatchingType);
+ }
/** @var string */
protected $matchingType;
@@ -55,6 +62,10 @@ private static function matchingValueNames(): array { return array_keys(self::$s
*/
protected $matchingValue;
+ /**
+ * @param string $matchingType
+ * @param mixed $matchingValue
+ */
public function __construct($matchingType, $matchingValue)
{
$this->matchingType = $matchingType;
@@ -70,33 +81,40 @@ public function getMatchingType(): string
}
/**
- * @return bool|string|ValueMatchingStrategy[]
+ * @return boolean|string|ValueMatchingStrategy[]
*/
public function getMatchingValue()
{
return $this->matchingValue;
}
- public function and(ValueMatchingStrategy $other)
+ public function and(ValueMatchingStrategy $other): LogicalOperatorMatchingStrategy
{
return LogicalOperatorMatchingStrategy::andAll($this, $other);
}
- public function or(ValueMatchingStrategy $other)
+ public function or(ValueMatchingStrategy $other): LogicalOperatorMatchingStrategy
{
return LogicalOperatorMatchingStrategy::orAll($this, $other);
}
/** @noinspection PhpUnusedPrivateMethodInspection */
- private static function getDiscriminatorMapping(): ClassDiscriminator
+ private static function getDiscriminatorMapping(): ClassDiscriminator // @phpstan-ignore method.unused
{
return new class(self::$subclassByMatchingType) implements ClassDiscriminator {
+ /** @var array */
private $subclassByMatchingType;
+ /**
+ * @param array $subclassByMatchingType
+ */
public function __construct($subclassByMatchingType)
{
$this->subclassByMatchingType = $subclassByMatchingType;
}
+ /**
+ * @param array $data
+ */
function getDiscriminatedType($data): string
{
foreach ($data as $key => $value) {
diff --git a/src/WireMock/Client/VerificationException.php b/src/WireMock/Client/VerificationException.php
index 06303f0..3361dc2 100644
--- a/src/WireMock/Client/VerificationException.php
+++ b/src/WireMock/Client/VerificationException.php
@@ -2,20 +2,6 @@
namespace WireMock\Client;
-//
-// If PHPUnit is on the include path, VerificationException extends AssertionFailedError (to automatically fail tests).
-// If not, it just extends Exception (to prevent forcing a dependency on PHPUnit).
-//
-if (class_exists('PHPUnit_Framework_AssertionFailedError')) {
- class VerificationException extends \PHPUnit_Framework_AssertionFailedError
- {
- }
-} else if (class_exists('\PHPUnit\Framework\AssertionFailedError')) {
- class VerificationException extends \PHPUnit\Framework\AssertionFailedError
- {
- }
-} else {
- class VerificationException extends \Exception
- {
- }
+class VerificationException extends \PHPUnit\Framework\AssertionFailedError
+{
}
diff --git a/src/WireMock/Client/WireMock.php b/src/WireMock/Client/WireMock.php
index da28a7d..7c96adb 100644
--- a/src/WireMock/Client/WireMock.php
+++ b/src/WireMock/Client/WireMock.php
@@ -3,6 +3,8 @@
namespace WireMock\Client;
use DateTime;
+use http\Client\Request;
+use http\Url;
use WireMock\Fault\DelayDistribution;
use WireMock\Fault\GlobalDelaySettings;
use WireMock\Matching\UrlMatchingStrategy;
@@ -23,14 +25,15 @@ class WireMock
private $hostname;
/** @var int */
private $port;
- /** @var HttpWait */
- private $httpWait;
- /** @var Curl */
- private $curl;
- /** @var Serializer */
- private $serializer;
+ private HttpWait $httpWait;
+ private Curl $curl;
+ private Serializer $serializer;
- public static function create($hostname = 'localhost', $port = 8080)
+ /**
+ * @param string $hostname
+ * @param int $port
+ */
+ public static function create($hostname = 'localhost', $port = 8080): self
{
$httpWait = new HttpWait();
$curl = new Curl();
@@ -39,6 +42,10 @@ public static function create($hostname = 'localhost', $port = 8080)
return new self($httpWait, $curl, $serializer, $hostname, $port);
}
+ /**
+ * @param string $hostname
+ * @param int $port
+ */
public function __construct(
HttpWait $httpWait,
Curl $curl,
@@ -53,19 +60,23 @@ public function __construct(
$this->serializer = $serializer;
}
- public function isAlive($timeoutSecs = 10, $debug = true)
+ /**
+ * @param boolean $debug
+ * @param int $timeoutSecs
+ */
+ public function isAlive($timeoutSecs = 10, $debug = true): bool
{
$url = $this->_makeUrl('__admin/');
return $this->httpWait->waitForServerToGive200($url, $timeoutSecs, $debug);
}
- public function isShutDown()
+ public function isShutDown(): bool
{
$url = $this->_makeUrl('__admin/');
return $this->httpWait->waitForServerToFailToRespond($url);
}
- public function stubFor(MappingBuilder $mappingBuilder)
+ public function stubFor(MappingBuilder $mappingBuilder): StubMapping
{
$stubMapping = $mappingBuilder->build();
/** @var StubMapping $responseMapping */
@@ -74,7 +85,7 @@ public function stubFor(MappingBuilder $mappingBuilder)
return $stubMapping;
}
- public function editStub(MappingBuilder $mappingBuilder)
+ public function editStub(MappingBuilder $mappingBuilder): StubMapping
{
$stubMapping = $mappingBuilder->build();
if (!$stubMapping->getId()) {
@@ -87,7 +98,7 @@ public function editStub(MappingBuilder $mappingBuilder)
/**
* @param StubImport|StubImportBuilder $stubImportsOrBuilder
*/
- public function importStubs($stubImportsOrBuilder)
+ public function importStubs($stubImportsOrBuilder): void
{
$stubImports = ($stubImportsOrBuilder instanceof StubImport) ?
$stubImportsOrBuilder :
@@ -96,12 +107,12 @@ public function importStubs($stubImportsOrBuilder)
}
/**
- * @param RequestPatternBuilder|CountMatchingStrategy|integer $requestPatternBuilderOrCount
+ * @param RequestPatternBuilder|CountMatchingStrategy|int $requestPatternBuilderOrCount
* @param RequestPatternBuilder|null $requestPatternBuilder
* @throws ClientException
* @throws VerificationException
*/
- public function verify($requestPatternBuilderOrCount, ?RequestPatternBuilder $requestPatternBuilder = null)
+ public function verify($requestPatternBuilderOrCount, ?RequestPatternBuilder $requestPatternBuilder = null): void
{
if ($requestPatternBuilderOrCount instanceof CountMatchingStrategy) {
$patternBuilder = $requestPatternBuilder;
@@ -114,7 +125,7 @@ public function verify($requestPatternBuilderOrCount, ?RequestPatternBuilder $re
$numberOfRequestsMatcher = null;
}
- $requestPattern = $patternBuilder->build();
+ $requestPattern = $patternBuilder->build(); // @phpstan-ignore method.nonObject (@TODO this looks like an actual bug to me?)
$response = $this->doPost('__admin/requests/count', $requestPattern, CountMatchingRequestsResult::class);
$count = $response->getCount();
@@ -188,15 +199,14 @@ public function findNearMissesFor($loggedRequestOrPattern)
{
if ($loggedRequestOrPattern instanceof LoggedRequest) {
$path = '__admin/near-misses/request';
- } else if ($loggedRequestOrPattern instanceof RequestPatternBuilder) {
+ } elseif ($loggedRequestOrPattern instanceof RequestPatternBuilder) {
$loggedRequestOrPattern = $loggedRequestOrPattern->build();
$path = '__admin/near-misses/request-pattern';
} else {
throw new \Exception('Unexpected near miss specifier: ' . print_r($loggedRequestOrPattern, true));
}
- /** @var FindNearMissesResult $result */
- $result = $this->doPost($path, $loggedRequestOrPattern, FindNearMissesResult::class);
- return $result;
+
+ return $this->doPost($path, $loggedRequestOrPattern, FindNearMissesResult::class);
}
/**
@@ -210,7 +220,7 @@ public function findNearMissesForAllUnmatched()
/**
* Deletes all serve events from the WireMock server's request journal
*/
- public function resetAllRequests()
+ public function resetAllRequests(): void
{
$this->doDelete('__admin/requests');
}
@@ -219,7 +229,7 @@ public function resetAllRequests()
* Removes specified serve event from the WireMock server's request journal
* @param string $id
*/
- public function removeServeEvent($id)
+ public function removeServeEvent($id): void
{
$this->doDelete("__admin/requests/$id");
}
@@ -227,7 +237,7 @@ public function removeServeEvent($id)
/**
* @param RequestPatternBuilder $requestPatternBuilder
*/
- public function removeServeEvents($requestPatternBuilder)
+ public function removeServeEvents($requestPatternBuilder): void
{
$this->doPost('__admin/requests/remove', $requestPatternBuilder->build());
}
@@ -235,7 +245,7 @@ public function removeServeEvents($requestPatternBuilder)
/**
* @param ValueMatchingStrategy $valueMatchingStrategy
*/
- public function removeEventsByStubMetadata($valueMatchingStrategy)
+ public function removeEventsByStubMetadata($valueMatchingStrategy): void
{
$this->doPost('__admin/requests/remove-by-metadata', $valueMatchingStrategy);
}
@@ -245,7 +255,7 @@ public function removeEventsByStubMetadata($valueMatchingStrategy)
*
* @param int $delayMillis
*/
- public function setGlobalFixedDelay($delayMillis)
+ public function setGlobalFixedDelay($delayMillis): void
{
$this->doPost('__admin/settings', GlobalDelaySettings::fixed($delayMillis));
}
@@ -253,7 +263,7 @@ public function setGlobalFixedDelay($delayMillis)
/**
* @param DelayDistribution $delayDistribution
*/
- public function setGlobalRandomDelay($delayDistribution)
+ public function setGlobalRandomDelay($delayDistribution): void
{
$this->doPost('__admin/settings', GlobalDelaySettings::random($delayDistribution));
}
@@ -261,12 +271,12 @@ public function setGlobalRandomDelay($delayDistribution)
/**
* Note: this function isn't part of the Java API
*/
- public function resetGlobalDelays()
+ public function resetGlobalDelays(): void
{
$this->doPost('__admin/settings', GlobalDelaySettings::none());
}
- public function saveAllMappings()
+ public function saveAllMappings(): void
{
$this->doPost('__admin/mappings/save');
}
@@ -276,7 +286,7 @@ public function saveAllMappings()
*
* @param string $id A string representation of a GUID
*/
- public function removeStub($id)
+ public function removeStub($id): void
{
$this->doDelete('__admin/mappings/' . urlencode($id));
}
@@ -284,7 +294,7 @@ public function removeStub($id)
/**
* Reset all stubbings and the request journal
*/
- public function reset()
+ public function reset(): void
{
$this->doPost('__admin/reset');
}
@@ -292,7 +302,7 @@ public function reset()
/**
* Reset all stubbings, reload those from the mappings directory, and reset the request journal
*/
- public function resetToDefault()
+ public function resetToDefault(): void
{
$this->doPost('__admin/mappings/reset');
}
@@ -308,7 +318,7 @@ public function getAllScenarios()
/**
* Reset all scenarios to the Scenario.STARTED state
*/
- public function resetAllScenarios()
+ public function resetAllScenarios(): void
{
$this->doPost('__admin/scenarios/reset');
}
@@ -317,7 +327,7 @@ public function resetAllScenarios()
* Reset a single scenario to the Scenario.STARTED state
* @param string $scenarioName
*/
- public function resetScenario($scenarioName)
+ public function resetScenario($scenarioName): void
{
$this->doPut('__admin/scenarios/' . urlencode($scenarioName) . '/state');
}
@@ -326,7 +336,7 @@ public function resetScenario($scenarioName)
* @param string $scenarioName
* @param string $stateName
*/
- public function setScenarioState($scenarioName, $stateName)
+ public function setScenarioState($scenarioName, $stateName): void
{
$this->doPut(
'__admin/scenarios/' . urlencode($scenarioName) . '/state',
@@ -334,29 +344,29 @@ public function setScenarioState($scenarioName, $stateName)
);
}
- public function shutdownServer()
+ public function shutdownServer(): void
{
$this->doPost('__admin/shutdown');
}
/**
- * @param int $limit
- * @param int $offset
+ * @param ?int $limit
+ * @param ?int $offset
* @return ListStubMappingsResult
*/
- public function listAllStubMappings($limit = null, $offset = null)
+ public function listAllStubMappings(?int $limit = null, ?int $offset = null)
{
$pathAndParams = '__admin/mappings';
- if ($limit || $offset) {
+ if ($limit !== null || $offset !== null) {
$pathAndParams .= '?';
- if ($limit) {
- $pathAndParams .= 'limit=' . urlencode($limit);
+ if ($limit !== null) {
+ $pathAndParams .= 'limit=' . $limit;
}
- if ($limit && $offset) {
+ if ($limit !== null && $offset !== null) {
$pathAndParams .= '&';
}
- if ($offset) {
- $pathAndParams .= 'offset=' . urlencode($offset);
+ if ($offset !== null) {
+ $pathAndParams .= 'offset=' . $offset;
}
}
return $this->doGet($pathAndParams, ListStubMappingsResult::class);
@@ -384,7 +394,7 @@ public function findStubsByMetadata($valueMatchingStrategy)
/**
* @param ValueMatchingStrategy $valueMatchingStrategy
*/
- public function removeStubsByMetadata($valueMatchingStrategy)
+ public function removeStubsByMetadata($valueMatchingStrategy): void
{
$this->doPost('__admin/mappings/remove-by-metadata', $valueMatchingStrategy);
}
@@ -392,7 +402,7 @@ public function removeStubsByMetadata($valueMatchingStrategy)
/**
* @param RecordSpecBuilder|string $recordingSpecOrUrl
*/
- public function startRecording($recordingSpecOrUrl)
+ public function startRecording($recordingSpecOrUrl): void
{
if (is_string($recordingSpecOrUrl)) {
$spec = self::recordSpec()->forTarget($recordingSpecOrUrl)->build();
@@ -430,9 +440,15 @@ public function snapshotRecord($recordingSpecBuilder = null)
}
/**
+ * @template T of object
* @param string $path
- * @param string|null $resultType
+ * @param string|null|class-string $resultType
* @return mixed
+ * @phpstan-return (
+ * $resultType is class-string
+ * ? T
+ * : ($resultType is class-string ? object : mixed)
+ * )
*/
private function doGet(string $path, ?string $resultType = null)
{
@@ -446,10 +462,16 @@ private function doGet(string $path, ?string $resultType = null)
}
/**
+ * @template T of object
* @param string $path
* @param mixed $body
- * @param string|null $resultType
+ * @param string|null|class-string $resultType
* @return mixed
+ * @phpstan-return (
+ * $resultType is class-string
+ * ? T
+ * : ($resultType is class-string ? object : mixed)
+ * )
*/
private function doPost(string $path, $body = null, ?string $resultType = null)
{
@@ -468,10 +490,16 @@ private function doPost(string $path, $body = null, ?string $resultType = null)
}
/**
+ * @template T of object
* @param string $path
* @param mixed $body
- * @param string|null $resultType
+ * @param string|null|class-string $resultType
* @return mixed
+ * @phpstan-return (
+ * $resultType is class-string
+ * ? T
+ * : ($resultType is class-string ? object : mixed)
+ * )
*/
private function doPut(string $path, $body = null, ?string $resultType = null)
{
@@ -490,9 +518,15 @@ private function doPut(string $path, $body = null, ?string $resultType = null)
}
/**
+ * @template T of object
* @param string $path
- * @param string|null $resultType
+ * @param string|null|class-string $resultType
* @return mixed
+ * @phpstan-return (
+ * $resultType is class-string
+ * ? T
+ * : ($resultType is class-string ? object : mixed)
+ * )
*/
private function doDelete(string $path, ?string $resultType = null)
{
@@ -505,7 +539,7 @@ private function doDelete(string $path, ?string $resultType = null)
}
}
- private function _makeUrl($path)
+ private function _makeUrl(string $path): string
{
return "http://$this->hostname:$this->port/$path";
}
@@ -514,7 +548,7 @@ private function _makeUrl($path)
* @param UrlMatchingStrategy|string $urlMatchingStrategy
* @return MappingBuilder
*/
- public static function get($urlMatchingStrategy)
+ public static function get($urlMatchingStrategy): MappingBuilder
{
if (is_string($urlMatchingStrategy)) {
$urlMatchingStrategy = self::urlEqualTo($urlMatchingStrategy);
@@ -527,7 +561,7 @@ public static function get($urlMatchingStrategy)
* @param UrlMatchingStrategy|string $urlMatchingStrategy
* @return MappingBuilder
*/
- public static function post($urlMatchingStrategy)
+ public static function post($urlMatchingStrategy): MappingBuilder
{
if (is_string($urlMatchingStrategy)) {
$urlMatchingStrategy = self::urlEqualTo($urlMatchingStrategy);
@@ -540,7 +574,7 @@ public static function post($urlMatchingStrategy)
* @param UrlMatchingStrategy|string $urlMatchingStrategy
* @return MappingBuilder
*/
- public static function put($urlMatchingStrategy)
+ public static function put($urlMatchingStrategy): MappingBuilder
{
if (is_string($urlMatchingStrategy)) {
$urlMatchingStrategy = self::urlEqualTo($urlMatchingStrategy);
@@ -553,7 +587,7 @@ public static function put($urlMatchingStrategy)
* @param UrlMatchingStrategy|string $urlMatchingStrategy
* @return MappingBuilder
*/
- public static function delete($urlMatchingStrategy)
+ public static function delete($urlMatchingStrategy): MappingBuilder
{
if (is_string($urlMatchingStrategy)) {
$urlMatchingStrategy = self::urlEqualTo($urlMatchingStrategy);
@@ -566,7 +600,7 @@ public static function delete($urlMatchingStrategy)
* @param UrlMatchingStrategy|string $urlMatchingStrategy
* @return MappingBuilder
*/
- public static function patch($urlMatchingStrategy)
+ public static function patch($urlMatchingStrategy): MappingBuilder
{
if (is_string($urlMatchingStrategy)) {
$urlMatchingStrategy = self::urlEqualTo($urlMatchingStrategy);
@@ -579,7 +613,7 @@ public static function patch($urlMatchingStrategy)
* @param UrlMatchingStrategy|string $urlMatchingStrategy
* @return MappingBuilder
*/
- public static function head($urlMatchingStrategy)
+ public static function head($urlMatchingStrategy): MappingBuilder
{
if (is_string($urlMatchingStrategy)) {
$urlMatchingStrategy = self::urlEqualTo($urlMatchingStrategy);
@@ -592,7 +626,7 @@ public static function head($urlMatchingStrategy)
* @param UrlMatchingStrategy|string $urlMatchingStrategy
* @return MappingBuilder
*/
- public static function options($urlMatchingStrategy)
+ public static function options($urlMatchingStrategy): MappingBuilder
{
if (is_string($urlMatchingStrategy)) {
$urlMatchingStrategy = self::urlEqualTo($urlMatchingStrategy);
@@ -605,7 +639,7 @@ public static function options($urlMatchingStrategy)
* @param UrlMatchingStrategy|string $urlMatchingStrategy
* @return MappingBuilder
*/
- public static function trace($urlMatchingStrategy)
+ public static function trace($urlMatchingStrategy): MappingBuilder
{
if (is_string($urlMatchingStrategy)) {
$urlMatchingStrategy = self::urlEqualTo($urlMatchingStrategy);
@@ -618,7 +652,7 @@ public static function trace($urlMatchingStrategy)
* @param UrlMatchingStrategy|string $urlMatchingStrategy
* @return MappingBuilder
*/
- public static function any($urlMatchingStrategy)
+ public static function any($urlMatchingStrategy): MappingBuilder
{
if (is_string($urlMatchingStrategy)) {
$urlMatchingStrategy = self::urlEqualTo($urlMatchingStrategy);
@@ -629,10 +663,10 @@ public static function any($urlMatchingStrategy)
/**
* @param string $matcherName
- * @param array $params
+ * @param array $params
* @return MappingBuilder
*/
- public static function requestMatching($matcherName, $params = array())
+ public static function requestMatching($matcherName, $params = array()): MappingBuilder
{
$requestPattern = new RequestPatternBuilder($matcherName, $params);
return new MappingBuilder($requestPattern);
@@ -642,7 +676,7 @@ public static function requestMatching($matcherName, $params = array())
* @param string $url
* @return UrlMatchingStrategy
*/
- public static function urlEqualTo($url)
+ public static function urlEqualTo($url): UrlMatchingStrategy
{
return new UrlMatchingStrategy('url', $url);
}
@@ -651,7 +685,7 @@ public static function urlEqualTo($url)
* @param string $urlRegex
* @return UrlMatchingStrategy
*/
- public static function urlMatching($urlRegex)
+ public static function urlMatching($urlRegex): UrlMatchingStrategy
{
return new UrlMatchingStrategy('urlPattern', $urlRegex);
}
@@ -660,7 +694,7 @@ public static function urlMatching($urlRegex)
* @param string $urlPath
* @return UrlMatchingStrategy
*/
- public static function urlPathEqualTo($urlPath)
+ public static function urlPathEqualTo($urlPath): UrlMatchingStrategy
{
return new UrlMatchingStrategy('urlPath', $urlPath);
}
@@ -669,7 +703,7 @@ public static function urlPathEqualTo($urlPath)
* @param string $urlPathRegex
* @return UrlMatchingStrategy
*/
- public static function urlPathMatching($urlPathRegex)
+ public static function urlPathMatching($urlPathRegex): UrlMatchingStrategy
{
return new UrlMatchingStrategy('urlPathPattern', $urlPathRegex);
}
@@ -677,7 +711,7 @@ public static function urlPathMatching($urlPathRegex)
/**
* @return UrlMatchingStrategy
*/
- public static function anyUrl()
+ public static function anyUrl(): UrlMatchingStrategy
{
return new UrlMatchingStrategy('urlPattern', '.*');
}
@@ -686,7 +720,7 @@ public static function anyUrl()
* @param string $value
* @return EqualToMatchingStrategy
*/
- public static function equalTo($value)
+ public static function equalTo($value): EqualToMatchingStrategy
{
return new EqualToMatchingStrategy($value);
}
@@ -695,7 +729,7 @@ public static function equalTo($value)
* @param string $value
* @return EqualToMatchingStrategy
*/
- public static function equalToIgnoreCase($value)
+ public static function equalToIgnoreCase($value): EqualToMatchingStrategy
{
return new EqualToMatchingStrategy($value, true);
}
@@ -704,7 +738,7 @@ public static function equalToIgnoreCase($value)
* @param string $base64String
* @return ValueMatchingStrategy
*/
- public static function binaryEqualTo($base64String)
+ public static function binaryEqualTo($base64String): ValueMatchingStrategy
{
return new ValueMatchingStrategy('binaryEqualTo', $base64String);
}
@@ -713,7 +747,7 @@ public static function binaryEqualTo($base64String)
* @param string $value
* @return ValueMatchingStrategy
*/
- public static function matching($value)
+ public static function matching($value): ValueMatchingStrategy
{
return new ValueMatchingStrategy('matches', $value);
}
@@ -722,7 +756,7 @@ public static function matching($value)
* @param string $value
* @return ValueMatchingStrategy
*/
- public static function notMatching($value)
+ public static function notMatching($value): ValueMatchingStrategy
{
return new ValueMatchingStrategy('doesNotMatch', $value);
}
@@ -731,7 +765,7 @@ public static function notMatching($value)
* @param string $value
* @return ValueMatchingStrategy
*/
- public static function containing($value)
+ public static function containing($value): ValueMatchingStrategy
{
return new ValueMatchingStrategy('contains', $value);
}
@@ -740,18 +774,17 @@ public static function containing($value)
* @param string $value
* @return ValueMatchingStrategy
*/
- public static function notContaining($value)
+ public static function notContaining($value): ValueMatchingStrategy
{
return new ValueMatchingStrategy('doesNotContain', $value);
}
/**
* @param string $value
- * @param boolean $ignoreArrayOrder
- * @param boolean $ignoreExtraElements
- * @return ValueMatchingStrategy
+ * @param boolean|null $ignoreArrayOrder
+ * @param boolean|null $ignoreExtraElements
*/
- public static function equalToJson($value, $ignoreArrayOrder = null, $ignoreExtraElements = null)
+ public static function equalToJson($value, $ignoreArrayOrder = null, $ignoreExtraElements = null): JsonValueMatchingStrategy
{
return new JsonValueMatchingStrategy($value, $ignoreArrayOrder, $ignoreExtraElements);
}
@@ -761,7 +794,7 @@ public static function equalToJson($value, $ignoreArrayOrder = null, $ignoreExtr
* @param ValueMatchingStrategy $valueMatchingStrategy
* @return JsonPathValueMatchingStrategy
*/
- public static function matchingJsonPath($jsonPath, $valueMatchingStrategy = null)
+ public static function matchingJsonPath($jsonPath, $valueMatchingStrategy = null): JsonPathValueMatchingStrategy
{
return new JsonPathValueMatchingStrategy(
$valueMatchingStrategy === null ?
@@ -780,7 +813,7 @@ public static function equalToXml($xml,
$enablePlaceholders = false,
$placeholderOpeningDelimiterRegex = null,
$placeholderClosingDelimiterRegex = null
- ) {
+ ): EqualToXmlMatchingStrategy {
return new EqualToXmlMatchingStrategy(
$xml,
$enablePlaceholders,
@@ -794,15 +827,15 @@ public static function equalToXml($xml,
* @param ValueMatchingStrategy $valueMatchingStrategy
* @return XPathValueMatchingStrategy
*/
- public static function matchingXPath($xPath, $valueMatchingStrategy = null)
+ public static function matchingXPath($xPath, $valueMatchingStrategy = null): XPathValueMatchingStrategy
{
- return new XPathValueMatchingStrategy($xPath, $valueMatchingStrategy);
+ return new XPathValueMatchingStrategy($xPath);
}
/**
* @return MultipartValuePatternBuilder
*/
- public static function aMultipart()
+ public static function aMultipart(): MultipartValuePatternBuilder
{
return new MultipartValuePatternBuilder();
}
@@ -810,7 +843,7 @@ public static function aMultipart()
/**
* @return ValueMatchingStrategy
*/
- public static function absent()
+ public static function absent(): ValueMatchingStrategy
{
return new ValueMatchingStrategy('absent', true);
}
@@ -819,7 +852,7 @@ public static function absent()
* @param int $count
* @return CountMatchingStrategy
*/
- public static function lessThan($count)
+ public static function lessThan($count): CountMatchingStrategy
{
return CountMatchingStrategy::lessThan($count);
}
@@ -828,7 +861,7 @@ public static function lessThan($count)
* @param int $count
* @return CountMatchingStrategy
*/
- public static function lessThanOrExactly($count)
+ public static function lessThanOrExactly($count): CountMatchingStrategy
{
return CountMatchingStrategy::lessThanOrExactly($count);
}
@@ -837,7 +870,7 @@ public static function lessThanOrExactly($count)
* @param int $count
* @return CountMatchingStrategy
*/
- public static function exactly($count)
+ public static function exactly($count): CountMatchingStrategy
{
return CountMatchingStrategy::exactly($count);
}
@@ -846,7 +879,7 @@ public static function exactly($count)
* @param int $count
* @return CountMatchingStrategy
*/
- public static function moreThanOrExactly($count)
+ public static function moreThanOrExactly($count): CountMatchingStrategy
{
return CountMatchingStrategy::moreThanOrExactly($count);
}
@@ -855,7 +888,7 @@ public static function moreThanOrExactly($count)
* @param int $count
* @return CountMatchingStrategy
*/
- public static function moreThan($count)
+ public static function moreThan($count): CountMatchingStrategy
{
return CountMatchingStrategy::moreThan($count);
}
@@ -864,7 +897,7 @@ public static function moreThan($count)
* @param string $dateTimeSpec
* @return DateTimeMatchingStrategy
*/
- public static function before($dateTimeSpec)
+ public static function before($dateTimeSpec): DateTimeMatchingStrategy
{
return DateTimeMatchingStrategy::before($dateTimeSpec);
}
@@ -872,7 +905,7 @@ public static function before($dateTimeSpec)
/**
* @return DateTimeMatchingStrategy
*/
- public static function beforeNow()
+ public static function beforeNow(): DateTimeMatchingStrategy
{
return DateTimeMatchingStrategy::before("now");
}
@@ -881,7 +914,7 @@ public static function beforeNow()
* @param string $dateTimeSpec
* @return DateTimeMatchingStrategy
*/
- public static function equalToDateTime($dateTimeSpec)
+ public static function equalToDateTime($dateTimeSpec): DateTimeMatchingStrategy
{
return DateTimeMatchingStrategy::equalToDateTime($dateTimeSpec);
}
@@ -889,7 +922,7 @@ public static function equalToDateTime($dateTimeSpec)
/**
* @return DateTimeMatchingStrategy
*/
- public static function isNow()
+ public static function isNow(): DateTimeMatchingStrategy
{
return DateTimeMatchingStrategy::equalToDateTime("now");
}
@@ -898,7 +931,7 @@ public static function isNow()
* @param string $dateTimeSpec
* @return DateTimeMatchingStrategy
*/
- public static function after($dateTimeSpec)
+ public static function after($dateTimeSpec): DateTimeMatchingStrategy
{
return DateTimeMatchingStrategy::after($dateTimeSpec);
}
@@ -906,7 +939,7 @@ public static function after($dateTimeSpec)
/**
* @return DateTimeMatchingStrategy
*/
- public static function afterNow()
+ public static function afterNow(): DateTimeMatchingStrategy
{
return DateTimeMatchingStrategy::after("now");
}
@@ -915,7 +948,7 @@ public static function afterNow()
* @param ValueMatchingStrategy ...$matchers
* @return LogicalOperatorMatchingStrategy
*/
- public static function and(...$matchers)
+ public static function and(...$matchers): LogicalOperatorMatchingStrategy
{
return LogicalOperatorMatchingStrategy::andAll(...$matchers);
}
@@ -924,95 +957,57 @@ public static function and(...$matchers)
* @param ValueMatchingStrategy ...$matchers
* @return LogicalOperatorMatchingStrategy
*/
- public static function or(...$matchers)
+ public static function or(...$matchers): LogicalOperatorMatchingStrategy
{
return LogicalOperatorMatchingStrategy::orAll(...$matchers);
}
- /**
- * @return RecordSpecBuilder
- */
- public static function recordSpec()
+ public static function recordSpec(): RecordSpecBuilder
{
return new RecordSpecBuilder();
}
- /**
- * @return ResponseDefinitionBuilder
- */
- public static function aResponse()
+ public static function aResponse(): ResponseDefinitionBuilder
{
return new ResponseDefinitionBuilder();
}
- /**
- * @param UrlMatchingStrategy $urlMatchingStrategy
- * @return RequestPatternBuilder
- */
- public static function getRequestedFor(UrlMatchingStrategy $urlMatchingStrategy)
+ public static function getRequestedFor(UrlMatchingStrategy $urlMatchingStrategy): RequestPatternBuilder
{
return new RequestPatternBuilder('GET', $urlMatchingStrategy);
}
- /**
- * @param UrlMatchingStrategy $urlMatchingStrategy
- * @return RequestPatternBuilder
- */
- public static function postRequestedFor(UrlMatchingStrategy $urlMatchingStrategy)
+ public static function postRequestedFor(UrlMatchingStrategy $urlMatchingStrategy): RequestPatternBuilder
{
return new RequestPatternBuilder('POST', $urlMatchingStrategy);
}
- /**
- * @param UrlMatchingStrategy $urlMatchingStrategy
- * @return RequestPatternBuilder
- */
- public static function putRequestedFor(UrlMatchingStrategy $urlMatchingStrategy)
+ public static function putRequestedFor(UrlMatchingStrategy $urlMatchingStrategy): RequestPatternBuilder
{
return new RequestPatternBuilder('PUT', $urlMatchingStrategy);
}
- /**
- * @param UrlMatchingStrategy $urlMatchingStrategy
- * @return RequestPatternBuilder
- */
- public static function deleteRequestedFor(UrlMatchingStrategy $urlMatchingStrategy)
+ public static function deleteRequestedFor(UrlMatchingStrategy $urlMatchingStrategy): RequestPatternBuilder
{
return new RequestPatternBuilder('DELETE', $urlMatchingStrategy);
}
- /**
- * @param UrlMatchingStrategy $urlMatchingStrategy
- * @return RequestPatternBuilder
- */
- public static function optionsRequestedFor(UrlMatchingStrategy $urlMatchingStrategy)
+ public static function optionsRequestedFor(UrlMatchingStrategy $urlMatchingStrategy): RequestPatternBuilder
{
return new RequestPatternBuilder('OPTIONS', $urlMatchingStrategy);
}
- /**
- * @param UrlMatchingStrategy $urlMatchingStrategy
- * @return RequestPatternBuilder
- */
- public static function patchRequestedFor(UrlMatchingStrategy $urlMatchingStrategy)
+ public static function patchRequestedFor(UrlMatchingStrategy $urlMatchingStrategy): RequestPatternBuilder
{
return new RequestPatternBuilder('PATCH', $urlMatchingStrategy);
}
- /**
- * @param UrlMatchingStrategy $urlMatchingStrategy
- * @return RequestPatternBuilder
- */
- public static function headRequestedFor(UrlMatchingStrategy $urlMatchingStrategy)
+ public static function headRequestedFor(UrlMatchingStrategy $urlMatchingStrategy): RequestPatternBuilder
{
return new RequestPatternBuilder('HEAD', $urlMatchingStrategy);
}
- /**
- * @param UrlMatchingStrategy $urlMatchingStrategy
- * @return RequestPatternBuilder
- */
- public static function traceRequestedFor(UrlMatchingStrategy $urlMatchingStrategy)
+ public static function traceRequestedFor(UrlMatchingStrategy $urlMatchingStrategy): RequestPatternBuilder
{
return new RequestPatternBuilder('TRACE', $urlMatchingStrategy);
}
@@ -1075,7 +1070,8 @@ public static function okTextXml($body)
* @param integer $status
* @return ResponseDefinitionBuilder
*/
- public static function jsonResponse($body, $status) {
+ public static function jsonResponse($body, $status)
+ {
return self::aResponse()
->withStatus($status)
->withHeader('Content-Type', "application/json")
@@ -1198,10 +1194,7 @@ public static function status($status)
return self::aResponse()->withStatus($status);
}
- /**
- * @return StubImportBuilder
- */
- public static function stubImport()
+ public static function stubImport(): StubImportBuilder
{
return new StubImportBuilder();
}
diff --git a/src/WireMock/Client/XPathValueMatchingStrategy.php b/src/WireMock/Client/XPathValueMatchingStrategy.php
index 40ac304..9ec6c5c 100644
--- a/src/WireMock/Client/XPathValueMatchingStrategy.php
+++ b/src/WireMock/Client/XPathValueMatchingStrategy.php
@@ -4,13 +4,7 @@
class XPathValueMatchingStrategy extends ValueMatchingStrategy
{
- /**
- * @var string|AdvancedPathPattern
- * @serde-named-by matchingType
- * @serde-possible-names matchingValueNames
- */
- protected $matchingValue;
- /** @var array|null */
+ /** @var array|null */
private $xPathNamespaces;
/**
@@ -28,12 +22,16 @@ public function __construct($matchingValue)
*/
public function withXPathNamespace($name, $namespaceUri)
{
+ if (!isset($this->xPathNamespaces)) {
+ $this->xPathNamespaces = [];
+ }
+
$this->xPathNamespaces[$name] = $namespaceUri;
return $this;
}
/**
- * @return array|null
+ * @return array|null
*/
public function getXPathNamespaces(): ?array
{
diff --git a/src/WireMock/Fault/DelayDistribution.php b/src/WireMock/Fault/DelayDistribution.php
index 24d436f..7e3f39b 100644
--- a/src/WireMock/Fault/DelayDistribution.php
+++ b/src/WireMock/Fault/DelayDistribution.php
@@ -33,7 +33,7 @@ public function getType(): string
}
/** @noinspection PhpUnusedPrivateMethodInspection */
- private static function getDiscriminatorMapping(): ClassDiscriminator
+ private static function getDiscriminatorMapping(): ClassDiscriminator // @phpstan-ignore method.unused
{
return new ClassDiscriminatorMapping('type', [
'lognormal' => LogNormal::class,
diff --git a/src/WireMock/Fault/GlobalDelaySettings.php b/src/WireMock/Fault/GlobalDelaySettings.php
index 21c8c4c..ee26414 100644
--- a/src/WireMock/Fault/GlobalDelaySettings.php
+++ b/src/WireMock/Fault/GlobalDelaySettings.php
@@ -4,16 +4,27 @@
abstract class GlobalDelaySettings
{
+ /**
+ * @param int $millis
+ * @return array{delayDistribution: null, fixedDelay: int}
+ */
public static function fixed($millis)
{
return ['delayDistribution' => null, 'fixedDelay' => $millis];
}
+ /**
+ * @param DelayDistribution $distribution
+ * @return array{delayDistribution: DelayDistribution, fixedDelay: null}
+ */
public static function random($distribution)
{
return ['delayDistribution' => $distribution, 'fixedDelay' => null];
}
+ /**
+ * @return array{delayDistribution: null, fixedDelay: null}
+ */
public static function none()
{
return ['delayDistribution' => null, 'fixedDelay' => null];
diff --git a/src/WireMock/Http/ResponseDefinition.php b/src/WireMock/Http/ResponseDefinition.php
index 1800513..6f4e59c 100644
--- a/src/WireMock/Http/ResponseDefinition.php
+++ b/src/WireMock/Http/ResponseDefinition.php
@@ -9,22 +9,22 @@ class ResponseDefinition
{
/** @var int */
private $status;
- /** @var string */
+ /** @var string|null */
private $statusMessage;
- /** @var string */
+ /** @var string|null */
private $body;
- /** @var string */
+ /** @var string|null */
private $bodyFileName;
- /** @var string */
+ /** @var string|null */
private $base64Body;
- /** @var array|null */
+ /** @var array|null */
private $headers;
- /** @var string */
+ /** @var string|null */
private $proxyBaseUrl;
- /** @var array|null */
+ /** @var array|null */
private $additionalProxyRequestHeaders;
/**
- * @var int
+ * @var int|null
* @serde-name fixedDelayMilliseconds
*/
private $fixedDelayMillis;
@@ -35,31 +35,32 @@ class ResponseDefinition
protected $randomDelayDistribution;
/** @var ?ChunkedDribbleDelay */
protected $chunkedDribbleDelay;
- /** @var string */
+ /** @var string|null */
private $fault;
/** @var string[]|null */
private $transformers;
- /** @var array|null */
+ /** @var array|null */
private $transformerParameters;
- /** @var string */
+ /** @var string|null */
private $proxyUrlPrefixToRemove;
/**
* ResponseDefinition constructor.
* @param int $status
- * @param string $statusMessage
- * @param string $body
- * @param string $bodyFile
- * @param string $base64Body
- * @param array|null $headers
- * @param string $proxyBaseUrl
- * @param array $additionalProxyRequestHeaders
- * @param int $fixedDelayMillis
- * @param DelayDistribution $randomDelayDistribution
- * @param ChunkedDribbleDelay $chunkedDribbleDelay
- * @param string $fault
+ * @param string|null $statusMessage
+ * @param string|null $body
+ * @param string|null $bodyFile
+ * @param string|null $base64Body
+ * @param array|null $headers
+ * @param string|null $proxyBaseUrl
+ * @param array|null $additionalProxyRequestHeaders
+ * @param int|null $fixedDelayMillis
+ * @param DelayDistribution|null $randomDelayDistribution
+ * @param ChunkedDribbleDelay|null $chunkedDribbleDelay
+ * @param string|null $fault
* @param string[]|null $transformers
- * @param array|null $transformerParameters
+ * @param array|null $transformerParameters
+ * @param string|null $proxyUrlPrefixToRemove
*/
public function __construct(
$status,
@@ -104,7 +105,7 @@ public function getStatus()
}
/**
- * @return string
+ * @return string|null
*/
public function getStatusMessage()
{
@@ -112,7 +113,7 @@ public function getStatusMessage()
}
/**
- * @return string
+ * @return string|null
*/
public function getBody()
{
@@ -120,7 +121,7 @@ public function getBody()
}
/**
- * @return string
+ * @return string|null
*/
public function getBodyFileName()
{
@@ -128,7 +129,7 @@ public function getBodyFileName()
}
/**
- * @return string
+ * @return string|null
*/
public function getBase64Body()
{
@@ -136,7 +137,7 @@ public function getBase64Body()
}
/**
- * @return array
+ * @return array|null
*/
public function getHeaders()
{
@@ -144,7 +145,7 @@ public function getHeaders()
}
/**
- * @return string
+ * @return string|null
*/
public function getProxyBaseUrl()
{
@@ -152,7 +153,7 @@ public function getProxyBaseUrl()
}
/**
- * @return array
+ * @return array|null
*/
public function getAdditionalProxyRequestHeaders()
{
@@ -160,7 +161,7 @@ public function getAdditionalProxyRequestHeaders()
}
/**
- * @return int
+ * @return int|null
*/
public function getFixedDelayMillis()
{
@@ -168,7 +169,7 @@ public function getFixedDelayMillis()
}
/**
- * @return DelayDistribution
+ * @return DelayDistribution|null
*/
public function getRandomDelayDistribution()
{
@@ -176,7 +177,7 @@ public function getRandomDelayDistribution()
}
/**
- * @return ChunkedDribbleDelay
+ * @return ChunkedDribbleDelay|null
*/
public function getChunkedDribbleDelay()
{
@@ -184,7 +185,7 @@ public function getChunkedDribbleDelay()
}
/**
- * @return string
+ * @return string|null
*/
public function getFault()
{
@@ -192,7 +193,7 @@ public function getFault()
}
/**
- * @return string[]
+ * @return string[]|null
*/
public function getTransformers()
{
@@ -200,7 +201,7 @@ public function getTransformers()
}
/**
- * @return array
+ * @return array|null
*/
public function getTransformerParameters()
{
@@ -208,7 +209,7 @@ public function getTransformerParameters()
}
/**
- * @return string
+ * @return string|null
*/
public function getProxyUrlPrefixToRemove()
{
diff --git a/src/WireMock/Matching/RequestPattern.php b/src/WireMock/Matching/RequestPattern.php
index 49a902b..b5c432f 100644
--- a/src/WireMock/Matching/RequestPattern.php
+++ b/src/WireMock/Matching/RequestPattern.php
@@ -8,7 +8,7 @@
class RequestPattern
{
- /** @var string */
+ /** @var string|null */
private $method;
/**
* @var UrlMatchingStrategy|null
@@ -33,12 +33,12 @@ class RequestPattern
private $host;
/**
- * @param string $method
- * @param UrlMatchingStrategy $urlMatchingStrategy
+ * @param string|null $method
+ * @param UrlMatchingStrategy|null $urlMatchingStrategy
* @param array|null $headers
* @param array|null $cookies
* @param ValueMatchingStrategy[]|null $bodyPatterns
- * @param ValueMatchingStrategy[] $multipartPatterns
+ * @param MultipartValuePattern[]|null $multipartPatterns
* @param array|null $queryParameters
* @param BasicCredentials $basicCredentials
* @param CustomMatcherDefinition $customMatcherDefinition
@@ -69,7 +69,7 @@ public function __construct(
}
/**
- * @return string
+ * @return string|null
*/
public function getMethod()
{
@@ -77,7 +77,7 @@ public function getMethod()
}
/**
- * @return UrlMatchingStrategy
+ * @return UrlMatchingStrategy|null
*/
public function getUrlMatchingStrategy()
{
@@ -85,7 +85,7 @@ public function getUrlMatchingStrategy()
}
/**
- * @return array
+ * @return array|null
*/
public function getHeaders()
{
@@ -93,7 +93,7 @@ public function getHeaders()
}
/**
- * @return array
+ * @return array|null
*/
public function getCookies()
{
@@ -101,7 +101,7 @@ public function getCookies()
}
/**
- * @return array
+ * @return array|null
*/
public function getQueryParameters()
{
@@ -109,7 +109,7 @@ public function getQueryParameters()
}
/**
- * @return ValueMatchingStrategy[]
+ * @return ValueMatchingStrategy[]|null
*/
public function getBodyPatterns()
{
@@ -117,7 +117,7 @@ public function getBodyPatterns()
}
/**
- * @return ValueMatchingStrategy[]
+ * @return MultipartValuePattern[]|null
*/
public function getMultipartPatterns()
{
@@ -125,7 +125,7 @@ public function getMultipartPatterns()
}
/**
- * @return BasicCredentials
+ * @return BasicCredentials|null
*/
public function getBasicAuthCredentials()
{
@@ -133,7 +133,7 @@ public function getBasicAuthCredentials()
}
/**
- * @return CustomMatcherDefinition
+ * @return CustomMatcherDefinition|null
*/
public function getCustomMatcher()
{
diff --git a/src/WireMock/Matching/UrlMatchingStrategy.php b/src/WireMock/Matching/UrlMatchingStrategy.php
index 353b3e4..0283c8e 100644
--- a/src/WireMock/Matching/UrlMatchingStrategy.php
+++ b/src/WireMock/Matching/UrlMatchingStrategy.php
@@ -13,8 +13,11 @@ class UrlMatchingStrategy
*/
private $matchingValue;
- /** @noinspection PhpUnusedPrivateMethodInspection */
- private static function matchingValueNames(): array
+ /**
+ * @noinspection PhpUnusedPrivateMethodInspection
+ * @return list
+ */
+ private static function matchingValueNames(): array // @phpstan-ignore method.unused
{
return ['url', 'urlPattern', 'urlPath', 'urlPathPattern'];
}
diff --git a/src/WireMock/PostServe/WebhookDefinition.php b/src/WireMock/PostServe/WebhookDefinition.php
index a629216..645837a 100644
--- a/src/WireMock/PostServe/WebhookDefinition.php
+++ b/src/WireMock/PostServe/WebhookDefinition.php
@@ -22,7 +22,7 @@ class WebhookDefinition
/** @var DelayDistribution|null */
private $delay;
/**
- * @var array|null
+ * @var array|null
* @serde-catch-all
*/
private $extraParameters;
@@ -80,6 +80,9 @@ public function withUniformRandomDelay(int $lower, int $upper): self
return $this->withRandomDelay(new UniformDistribution($lower, $upper));
}
+ /**
+ * @param mixed $value
+ */
public function withExtraParameter(string $name, $value): self
{
$this->extraParameters[$name] = $value;
@@ -137,7 +140,7 @@ public function getDelay(): ?DelayDistribution
}
/**
- * @return array|null
+ * @return array|null
*/
public function getExtraParameters(): ?array
{
diff --git a/src/WireMock/Recording/ProxiedServeEventFilters.php b/src/WireMock/Recording/ProxiedServeEventFilters.php
index f6ab74d..4d928aa 100644
--- a/src/WireMock/Recording/ProxiedServeEventFilters.php
+++ b/src/WireMock/Recording/ProxiedServeEventFilters.php
@@ -21,6 +21,9 @@ class ProxiedServeEventFilters
/** @var ?boolean */
private $allowNonProxied;
+ /**
+ * @param array $requestIds
+ */
public function __construct(?RequestPattern $requestPattern, ?array $requestIds, ?bool $allowNonProxied)
{
$this->requestPattern = $requestPattern;
@@ -33,6 +36,9 @@ public function getRequestPattern(): ?RequestPattern
return $this->requestPattern;
}
+ /**
+ * @return array
+ */
public function getRequestIds(): ?array
{
return $this->requestIds;
diff --git a/src/WireMock/Recording/RecordSpec.php b/src/WireMock/Recording/RecordSpec.php
index 2af806a..8714e6e 100644
--- a/src/WireMock/Recording/RecordSpec.php
+++ b/src/WireMock/Recording/RecordSpec.php
@@ -11,9 +11,9 @@ class RecordSpec
private $targetBaseUrl;
/** @var ProxiedServeEventFilters|null */
private $filters;
- /** @var array|null */
+ /** @var array|null */
private $captureHeaders;
- /** @var array|null */
+ /** @var array|null */
private $extractBodyCriteria;
/** @var boolean */
private $persist;
@@ -21,24 +21,24 @@ class RecordSpec
private $repeatsAsScenarios;
/** @var string[]|null */
private $transformers;
- /** @var array|null */
+ /** @var array|null */
private $transformerParameters;
- /** @var array|null */
+ /** @var array|null */
private $requestBodyPattern;
- /** @var string */
+ /** @var string|null */
private $outputFormat;
/**
* @param string $targetBaseUrl
- * @param ProxiedServeEventFilters $filters
- * @param array|null $captureHeaders
- * @param array $extractBodyCriteria
+ * @param ProxiedServeEventFilters|null $filters
+ * @param array|null $captureHeaders
+ * @param array|null $extractBodyCriteria
* @param boolean $persist
* @param boolean $repeatsAsScenarios
- * @param string[] $transformers
- * @param array $transformerParameters
- * @param array $requestBodyPattern
- * @param string $outputFormat
+ * @param string[]|null $transformers
+ * @param array|null $transformerParameters
+ * @param array|null $requestBodyPattern
+ * @param string|null $outputFormat
*/
public function __construct(
$targetBaseUrl,
@@ -81,7 +81,7 @@ public function getFilters(): ?ProxiedServeEventFilters
}
/**
- * @return array|null
+ * @return array|null
*/
public function getCaptureHeaders(): ?array
{
@@ -89,7 +89,7 @@ public function getCaptureHeaders(): ?array
}
/**
- * @return array|null
+ * @return array|null
*/
public function getExtractBodyCriteria(): ?array
{
@@ -121,7 +121,7 @@ public function getTransformers(): ?array
}
/**
- * @return array|null
+ * @return array|null
*/
public function getTransformerParameters(): ?array
{
@@ -129,7 +129,7 @@ public function getTransformerParameters(): ?array
}
/**
- * @return array
+ * @return array
*/
public function getRequestBodyPattern(): ?array
{
diff --git a/src/WireMock/Recording/RecordSpecBuilder.php b/src/WireMock/Recording/RecordSpecBuilder.php
index b90d497..825ff75 100644
--- a/src/WireMock/Recording/RecordSpecBuilder.php
+++ b/src/WireMock/Recording/RecordSpecBuilder.php
@@ -12,19 +12,19 @@ class RecordSpecBuilder
private $requestPatternBuilder;
/** @var string[] */
private $requestIds;
- /** @var array|null */
+ /** @var array|null */
private $captureHeaders;
- /** @var array|null */
+ /** @var array|null */
private $extractBodyCriteria;
- /** @var bool */
+ /** @var boolean */
private $persist = true;
- /** @var bool */
+ /** @var boolean */
private $repeatsAsScenarios = true;
/** @var string[]|null */
private $transformers;
- /** @var array|null */
+ /** @var array|null */
private $transformerParameters;
- /** @var array|null */
+ /** @var array|null */
private $requestBodyPattern;
/** @var string|null */
private $format = null;
@@ -32,7 +32,7 @@ class RecordSpecBuilder
private $allowNonProxied = null;
/**
- * @param $targetBaseUrl
+ * @param string $targetBaseUrl
* @return RecordSpecBuilder
*/
public function forTarget($targetBaseUrl)
@@ -95,7 +95,7 @@ public function extractTextBodiesOver($bytes)
}
/**
- * @param $persist
+ * @param bool $persist
* @return RecordSpecBuilder
*/
public function makeStubsPersistent($persist)
@@ -125,7 +125,7 @@ public function transformers()
}
/**
- * @param $paramsArray
+ * @param array $paramsArray
* @return RecordSpecBuilder
*/
public function transformerParameters($paramsArray)
diff --git a/src/WireMock/Serde/ArrayMapUtils.php b/src/WireMock/Serde/ArrayMapUtils.php
index 7cda224..fc2477a 100644
--- a/src/WireMock/Serde/ArrayMapUtils.php
+++ b/src/WireMock/Serde/ArrayMapUtils.php
@@ -6,8 +6,8 @@ class ArrayMapUtils
{
/**
* @param callable $f Called with ($key, $value). Should return [newKey, newValue]
- * @param array $a
- * @return array
+ * @param array $a
+ * @return array
*/
public static function array_map_assoc(callable $f, array $a): array
{
diff --git a/src/WireMock/Serde/MethodFactory.php b/src/WireMock/Serde/MethodFactory.php
index 9b4aaf4..4d0d5d9 100644
--- a/src/WireMock/Serde/MethodFactory.php
+++ b/src/WireMock/Serde/MethodFactory.php
@@ -8,9 +8,10 @@
class MethodFactory {
/**
+ * @param string $fqMethodName
* @throws ReflectionException
*/
- public static function createMethod($fqMethodName) {
+ public static function createMethod($fqMethodName): ReflectionMethod {
return PHP_VERSION_ID >= 80400
? ReflectionMethod::createFromMethodName($fqMethodName)
: new ReflectionMethod($fqMethodName);
diff --git a/src/WireMock/Serde/SerdeClassDiscriminationInfo.php b/src/WireMock/Serde/SerdeClassDiscriminationInfo.php
index b2f2fc6..e65e324 100644
--- a/src/WireMock/Serde/SerdeClassDiscriminationInfo.php
+++ b/src/WireMock/Serde/SerdeClassDiscriminationInfo.php
@@ -20,7 +20,7 @@ class SerdeClassDiscriminationInfo
/**
* @param string $discriminatorFactoryName
- * @param array $possibleSerdeTypes
+ * @param array $possibleSerdeTypes
* @throws SerializationException|ReflectionException
*/
public function __construct(string $discriminatorFactoryName, array $possibleSerdeTypes)
diff --git a/src/WireMock/Serde/SerdeProp.php b/src/WireMock/Serde/SerdeProp.php
index 7ffea35..dbc47ea 100644
--- a/src/WireMock/Serde/SerdeProp.php
+++ b/src/WireMock/Serde/SerdeProp.php
@@ -19,11 +19,11 @@ class SerdeProp
public $serdeType;
/** @var PropertyNamingStrategy|null */
public $propertyNamingStrategy;
- /** @var bool */
+ /** @var boolean */
public $unwrapped;
- /** @var bool */
+ /** @var boolean */
public $catchAll;
- /** @var bool */
+ /** @var boolean */
public $includeInNormalizedForm;
/**
diff --git a/src/WireMock/Serde/StaticFactoryMethodValidator.php b/src/WireMock/Serde/StaticFactoryMethodValidator.php
index da05e47..20f8fa8 100644
--- a/src/WireMock/Serde/StaticFactoryMethodValidator.php
+++ b/src/WireMock/Serde/StaticFactoryMethodValidator.php
@@ -7,10 +7,11 @@
class StaticFactoryMethodValidator
{
/**
+ * @param string $fqMethodName
* @throws ReflectionException
* @throws SerializationException
*/
- public static function validate($fqMethodName) {
+ public static function validate($fqMethodName): void {
$refMethod = MethodFactory::createMethod($fqMethodName);
if (!$refMethod->isStatic()) {
throw new SerializationException("$fqMethodName must be a static method but is not");
diff --git a/src/WireMock/Serde/Type/SerdeTypeAssocArray.php b/src/WireMock/Serde/Type/SerdeTypeAssocArray.php
index 70154f7..32c39fb 100644
--- a/src/WireMock/Serde/Type/SerdeTypeAssocArray.php
+++ b/src/WireMock/Serde/Type/SerdeTypeAssocArray.php
@@ -25,7 +25,7 @@ static function setKeyValueTypes(
SerdeTypeAssocArray $arrayType,
SerdeTypePrimitive $keySerdeType,
SerdeType $valueSerdeType
- ) {
+ ): void {
$arrayType->keyType = $keySerdeType;
$arrayType->valueType = $valueSerdeType;
}
diff --git a/src/WireMock/Serde/Type/SerdeTypeClass.php b/src/WireMock/Serde/Type/SerdeTypeClass.php
index c23d029..6784de5 100644
--- a/src/WireMock/Serde/Type/SerdeTypeClass.php
+++ b/src/WireMock/Serde/Type/SerdeTypeClass.php
@@ -15,7 +15,7 @@ class SerdeTypeClass extends SerdeTypeSingle
/** @var SerdeClassDefinition */
private $classDefinition;
- static function setClassDefinition(SerdeTypeClass $serdeType, SerdeClassDefinition $classDefinition)
+ static function setClassDefinition(SerdeTypeClass $serdeType, SerdeClassDefinition $classDefinition): void
{
$serdeType->classDefinition = $classDefinition;
}
@@ -103,7 +103,7 @@ public function denormalize(&$data, array $path): ?object
/**
* @param $data
- * @param array $path
+ * @param array $path
* @return object|null
* @throws ReflectionException|SerializationException
*/
@@ -136,7 +136,7 @@ private function getDiscriminatedType($data): SerdeTypeClass
/**
* @throws ReflectionException
*/
- private function reverseNamedByProps(array &$data)
+ private function reverseNamedByProps(array &$data): void
{
foreach ($this->classDefinition->getAllPropertiesAndArgs() as $prop) {
$namingStrategy = $prop->propertyNamingStrategy;
@@ -157,7 +157,7 @@ private function reverseNamedByProps(array &$data)
}
}
- private function reverseNamedProps(array &$data)
+ private function reverseNamedProps(array &$data): void
{
foreach ($this->classDefinition->getAllPropertiesAndArgs() as $prop) {
$namingStrategy = $prop->propertyNamingStrategy;
@@ -176,7 +176,7 @@ private function reverseNamedProps(array &$data)
/**
* @throws SerializationException
*/
- private function reverseUnwrappedProps(array &$data)
+ private function reverseUnwrappedProps(array &$data): void
{
foreach ($this->classDefinition->getAllPropertiesAndArgs() as $prop) {
if (!$prop->unwrapped) {
@@ -208,7 +208,7 @@ private function reverseUnwrappedProps(array &$data)
/**
* @throws SerializationException
*/
- private function reverseCatchAllProp(array &$data)
+ private function reverseCatchAllProp(array &$data): void
{
$prop = $this->classDefinition->getCatchAllProp();
if ($prop === null) {
@@ -250,7 +250,7 @@ function($param) use (&$data, $path) {
* @throws SerializationException
* @throws ReflectionException
*/
- private function populateObject(array &$data, object $object, array $path)
+ private function populateObject(array &$data, object $object, array $path): void
{
foreach ($data as $propertyName => $propertyData) {
$serdeProp = $this->classDefinition->getPropertyByPhpName($propertyName);
diff --git a/src/WireMock/Serde/Type/SerdeTypeTypedArray.php b/src/WireMock/Serde/Type/SerdeTypeTypedArray.php
index 4bc25d5..22ae54f 100644
--- a/src/WireMock/Serde/Type/SerdeTypeTypedArray.php
+++ b/src/WireMock/Serde/Type/SerdeTypeTypedArray.php
@@ -17,7 +17,7 @@ public function __construct(SerdeType $type)
$this->type = $type;
}
- static function setInnerType(SerdeTypeTypedArray $serdeType, SerdeType $type)
+ static function setInnerType(SerdeTypeTypedArray $serdeType, SerdeType $type): void
{
$serdeType->type = $type;
}
diff --git a/src/WireMock/Serde/Type/SerdeTypeUnion.php b/src/WireMock/Serde/Type/SerdeTypeUnion.php
index 8bc754d..5dee44b 100644
--- a/src/WireMock/Serde/Type/SerdeTypeUnion.php
+++ b/src/WireMock/Serde/Type/SerdeTypeUnion.php
@@ -22,7 +22,11 @@ public function __construct(array $primitiveSerdeTypes, $classOrArraySerdeType)
$this->classOrArraySerdeType = $classOrArraySerdeType;
}
- static function setSubtypes(SerdeTypeUnion $serdeType, array $primitiveSerdeTypes, $classOrArraySerdeType)
+ /**
+ * @param SerdeTypePrimitive[] $primitiveSerdeTypes
+ * @param SerdeTypeArray|SerdeTypeClass|null $classOrArraySerdeType
+ */
+ static function setSubtypes(SerdeTypeUnion $serdeType, array $primitiveSerdeTypes, $classOrArraySerdeType): void
{
$serdeType->primitiveSerdeTypes = $primitiveSerdeTypes;
$serdeType->classOrArraySerdeType = $classOrArraySerdeType;
diff --git a/src/WireMock/SerdeGen/PartialSerdeTypeLookup.php b/src/WireMock/SerdeGen/PartialSerdeTypeLookup.php
index 422c3c2..882d28e 100644
--- a/src/WireMock/SerdeGen/PartialSerdeTypeLookup.php
+++ b/src/WireMock/SerdeGen/PartialSerdeTypeLookup.php
@@ -15,7 +15,10 @@ public function __construct()
parent::__construct([], []);
}
- public function addRootTypes(...$types)
+ /**
+ * @param string ...$types
+ */
+ public function addRootTypes(...$types): void
{
foreach ($types as $type) {
$key = CanonicalNameUtils::stripLeadingBackslashIfNeeded($type);
@@ -37,7 +40,7 @@ public function addSerdeTypeIfNeeded(string $type, SerdeType $serdeType, bool $i
return $this->getSerdeType($type);
}
- private function addSerdeType(string $type, SerdeType $serdeType)
+ private function addSerdeType(string $type, SerdeType $serdeType): void
{
$key = CanonicalNameUtils::stripLeadingBackslashIfNeeded($type);
$this->lookup[$key] = $serdeType;
diff --git a/src/WireMock/SerdeGen/SerdeClassDefinitionFactory.php b/src/WireMock/SerdeGen/SerdeClassDefinitionFactory.php
index 0eac6f4..4b76e3f 100644
--- a/src/WireMock/SerdeGen/SerdeClassDefinitionFactory.php
+++ b/src/WireMock/SerdeGen/SerdeClassDefinitionFactory.php
@@ -2,6 +2,7 @@
namespace WireMock\SerdeGen;
+use http\Exception\RuntimeException;
use phpDocumentor\Reflection\DocBlock;
use phpDocumentor\Reflection\DocBlock\Tags\Param;
use phpDocumentor\Reflection\DocBlock\Tags\Var_;
@@ -125,7 +126,11 @@ private function getProperties(ReflectionClass $refClass, Context $context): arr
continue;
}
$propName = $refProp->getName();
- $docBlock = $this->docBlockFactory->create($refProp, $context);
+ try {
+ $docBlock = $this->docBlockFactory->create($refProp, $context);
+ } catch (\Webmozart\Assert\InvalidArgumentException $e) {
+ throw new SerializationException('Missing docblock in '.$parentClass.'::$'.$refProp->getName(), 0, $e);
+ }
$varTags = $docBlock->getTagsByName('var');
if (count($varTags) !== 1) {
diff --git a/src/WireMock/SerdeGen/SerdeTypeLookupFactory.php b/src/WireMock/SerdeGen/SerdeTypeLookupFactory.php
index 7a7df70..32c7ac7 100644
--- a/src/WireMock/SerdeGen/SerdeTypeLookupFactory.php
+++ b/src/WireMock/SerdeGen/SerdeTypeLookupFactory.php
@@ -12,10 +12,10 @@ class SerdeTypeLookupFactory
/**
* @throws ReflectionException|SerializationException
*/
- public static function createLookup(...$types): SerdeTypeLookup
+ public static function createLookup(string ...$types): SerdeTypeLookup
{
$partialLookup = new PartialSerdeTypeLookup();
- $canonicalTypes = array_map(function($fqn) {
+ $canonicalTypes = array_map(function(string $fqn) {
return CanonicalNameUtils::stripLeadingBackslashIfNeeded($fqn);
}, $types);
$partialLookup->addRootTypes(...$canonicalTypes);
diff --git a/src/WireMock/SerdeGen/SerdeTypeParser.php b/src/WireMock/SerdeGen/SerdeTypeParser.php
index 9ccf1f1..cf10a8f 100644
--- a/src/WireMock/SerdeGen/SerdeTypeParser.php
+++ b/src/WireMock/SerdeGen/SerdeTypeParser.php
@@ -8,14 +8,14 @@
use phpDocumentor\Reflection\Types\Boolean;
use phpDocumentor\Reflection\Types\Compound;
use phpDocumentor\Reflection\Types\Expression;
-use phpDocumentor\Reflection\Types\False_;
+use phpDocumentor\Reflection\PseudoTypes\False_;
use phpDocumentor\Reflection\Types\Float_;
use phpDocumentor\Reflection\Types\Integer;
use phpDocumentor\Reflection\Types\Null_;
use phpDocumentor\Reflection\Types\Nullable;
use phpDocumentor\Reflection\Types\Object_;
use phpDocumentor\Reflection\Types\String_;
-use phpDocumentor\Reflection\Types\True_;
+use phpDocumentor\Reflection\PseudoTypes\True_;
use ReflectionException;
use WireMock\Serde\SerdeClassDefinition;
use WireMock\Serde\SerializationException;
diff --git a/src/WireMock/SerdeGen/Tag/SerdeCatchAllTag.php b/src/WireMock/SerdeGen/Tag/SerdeCatchAllTag.php
index 81755ae..7363e50 100644
--- a/src/WireMock/SerdeGen/Tag/SerdeCatchAllTag.php
+++ b/src/WireMock/SerdeGen/Tag/SerdeCatchAllTag.php
@@ -7,9 +7,9 @@
class SerdeCatchAllTag implements Tag
{
- public static function create(string $body)
+ public static function create(string $body): self
{
- return new static();
+ return new self();
}
public function getName(): string
diff --git a/src/WireMock/SerdeGen/Tag/SerdeDiscriminateTypeTag.php b/src/WireMock/SerdeGen/Tag/SerdeDiscriminateTypeTag.php
index 9630665..d32f37a 100644
--- a/src/WireMock/SerdeGen/Tag/SerdeDiscriminateTypeTag.php
+++ b/src/WireMock/SerdeGen/Tag/SerdeDiscriminateTypeTag.php
@@ -18,9 +18,9 @@ public function __construct(string $discriminatorFactory)
$this->discriminatorFactory = $discriminatorFactory;
}
- public static function create(string $body)
+ public static function create(string $body): self
{
- return new static(trim($body));
+ return new self(trim($body));
}
public function getName(): string
diff --git a/src/WireMock/SerdeGen/Tag/SerdeNameTag.php b/src/WireMock/SerdeGen/Tag/SerdeNameTag.php
index 0e2dee9..0ffff23 100644
--- a/src/WireMock/SerdeGen/Tag/SerdeNameTag.php
+++ b/src/WireMock/SerdeGen/Tag/SerdeNameTag.php
@@ -18,10 +18,10 @@ public function __construct(string $serializedPropertyName)
$this->serializedPropertyName = $serializedPropertyName;
}
- public static function create(string $body)
+ public static function create(string $body): self
{
$propName = trim($body);
- return new static($propName);
+ return new self($propName);
}
public function getName(): string
diff --git a/src/WireMock/SerdeGen/Tag/SerdeNamedByTag.php b/src/WireMock/SerdeGen/Tag/SerdeNamedByTag.php
index 64a5d18..77bf686 100644
--- a/src/WireMock/SerdeGen/Tag/SerdeNamedByTag.php
+++ b/src/WireMock/SerdeGen/Tag/SerdeNamedByTag.php
@@ -18,10 +18,10 @@ public function __construct(string $namingPropertyName)
$this->namingPropertyName = $namingPropertyName;
}
- public static function create(string $body)
+ public static function create(string $body): self
{
$propName = trim($body);
- return new static($propName);
+ return new self($propName);
}
public function getName(): string
diff --git a/src/WireMock/SerdeGen/Tag/SerdePossibleNamesTag.php b/src/WireMock/SerdeGen/Tag/SerdePossibleNamesTag.php
index 5069b62..c2a543c 100644
--- a/src/WireMock/SerdeGen/Tag/SerdePossibleNamesTag.php
+++ b/src/WireMock/SerdeGen/Tag/SerdePossibleNamesTag.php
@@ -18,10 +18,10 @@ public function __construct(string $possibleNamesGenerator)
$this->possibleNamesGenerator = $possibleNamesGenerator;
}
- public static function create(string $body)
+ public static function create(string $body): self
{
$propName = trim($body);
- return new static($propName);
+ return new self($propName);
}
public function getName(): string
diff --git a/src/WireMock/SerdeGen/Tag/SerdePossibleSubtypeTag.php b/src/WireMock/SerdeGen/Tag/SerdePossibleSubtypeTag.php
index f5301ca..3e5ffac 100644
--- a/src/WireMock/SerdeGen/Tag/SerdePossibleSubtypeTag.php
+++ b/src/WireMock/SerdeGen/Tag/SerdePossibleSubtypeTag.php
@@ -25,7 +25,7 @@ public static function create(string $body, ?TypeResolver $typeResolver = null,
$type = $typeResolver->resolve($typeName, $context);
$description = new Description($body);
- return new static($type, $description);
+ return new self($type, $description);
}
public function __toString(): string
diff --git a/src/WireMock/SerdeGen/Tag/SerdeUnwrappedTag.php b/src/WireMock/SerdeGen/Tag/SerdeUnwrappedTag.php
index 5c48854..945996f 100644
--- a/src/WireMock/SerdeGen/Tag/SerdeUnwrappedTag.php
+++ b/src/WireMock/SerdeGen/Tag/SerdeUnwrappedTag.php
@@ -7,9 +7,9 @@
class SerdeUnwrappedTag implements Tag
{
- public static function create(string $body)
+ public static function create(string $body): self
{
- return new static();
+ return new self();
}
public function getName(): string
diff --git a/src/WireMock/SerdeGen/WireMockSerdeGen.php b/src/WireMock/SerdeGen/WireMockSerdeGen.php
index 80b7e8f..61e1d66 100644
--- a/src/WireMock/SerdeGen/WireMockSerdeGen.php
+++ b/src/WireMock/SerdeGen/WireMockSerdeGen.php
@@ -65,7 +65,7 @@ public static function generateSerializedWiremockSerdeLookup(): string
* @throws ReflectionException
* @throws SerializationException
*/
- public static function generateAndSaveWireMockSerdeLookup()
+ public static function generateAndSaveWireMockSerdeLookup(): void
{
$lookupSerialized = self::generateSerializedWiremockSerdeLookup();
diff --git a/src/WireMock/Stubbing/ScenarioMapping.php b/src/WireMock/Stubbing/ScenarioMapping.php
index dffdf50..87025e4 100644
--- a/src/WireMock/Stubbing/ScenarioMapping.php
+++ b/src/WireMock/Stubbing/ScenarioMapping.php
@@ -4,17 +4,17 @@
class ScenarioMapping
{
- /** @var string */
+ /** @var string|null */
private $scenarioName;
- /** @var string */
+ /** @var string|null */
private $requiredScenarioState;
- /** @var string */
+ /** @var string|null */
private $newScenarioState;
/**
- * @param string $scenarioName
- * @param string $requiredScenarioState
- * @param string $newScenarioState
+ * @param string|null $scenarioName
+ * @param string|null $requiredScenarioState
+ * @param string|null $newScenarioState
*/
public function __construct(
$scenarioName = null,
@@ -28,7 +28,7 @@ public function __construct(
}
/**
- * @return string
+ * @return string|null
*/
public function getScenarioName()
{
@@ -36,7 +36,7 @@ public function getScenarioName()
}
/**
- * @return string
+ * @return string|null
*/
public function getRequiredScenarioState()
{
@@ -44,7 +44,7 @@ public function getRequiredScenarioState()
}
/**
- * @return string
+ * @return string|null
*/
public function getNewScenarioState()
{
diff --git a/src/WireMock/Stubbing/StubMapping.php b/src/WireMock/Stubbing/StubMapping.php
index e809ae0..0446e5f 100644
--- a/src/WireMock/Stubbing/StubMapping.php
+++ b/src/WireMock/Stubbing/StubMapping.php
@@ -8,26 +8,26 @@
class StubMapping
{
- /** @var string A string representation of a GUID */
+ /** @var ?string A string representation of a GUID */
private $id;
- /** @var string */
+ /** @var ?string */
private $name;
/** @var RequestPattern */
private $request;
/** @var ResponseDefinition */
private $response;
- /** @var int */
+ /** @var ?int */
private $priority;
- /** @var ?array */
+ /** @var array|null */
private $metadata;
- /** @var boolean */
+ /** @var ?boolean */
private $persistent;
- /** @var string */
+ /** @var string|null */
private $scenarioName;
- /** @var string */
+ /** @var string|null */
private $requiredScenarioState;
- /** @var string */
+ /** @var string|null */
private $newScenarioState;
/** @var PostServeAction[]|null */
private $postServeActions;
@@ -35,13 +35,13 @@ class StubMapping
/**
* @param RequestPattern $request
* @param ResponseDefinition $response
- * @param string $id
- * @param string $name
- * @param int $priority
+ * @param ?string $id
+ * @param ?string $name
+ * @param ?int $priority
* @param ScenarioMapping|null $scenarioMapping
- * @param array $metadata
- * @param boolean $persistent
- * @param array|null $postServeActions
+ * @param array|null $metadata
+ * @param ?boolean $persistent
+ * @param array|null $postServeActions
*/
public function __construct(
RequestPattern $request,
@@ -72,7 +72,7 @@ public function __construct(
}
/**
- * @return string
+ * @return string|null
*/
public function getId()
{
@@ -80,9 +80,9 @@ public function getId()
}
/**
- * @param string $id
+ * @param string|null $id
*/
- public function setId($id)
+ public function setId($id): void
{
$this->id = $id;
}
@@ -112,7 +112,7 @@ public function getResponse()
}
/**
- * @return int
+ * @return int|null
*/
public function getPriority()
{
@@ -120,7 +120,7 @@ public function getPriority()
}
/**
- * @return array
+ * @return array|null
*/
public function getMetadata()
{
@@ -136,7 +136,7 @@ public function isPersistent()
}
/**
- * @return string
+ * @return string|null
*/
public function getScenarioName()
{
@@ -144,7 +144,7 @@ public function getScenarioName()
}
/**
- * @return string
+ * @return string|null
*/
public function getRequiredScenarioState()
{
@@ -152,7 +152,7 @@ public function getRequiredScenarioState()
}
/**
- * @return string
+ * @return string|null
*/
public function getNewScenarioState()
{
diff --git a/src/WireMock/Verification/CountMatchingStrategy.php b/src/WireMock/Verification/CountMatchingStrategy.php
index de5713e..dc0a2d9 100644
--- a/src/WireMock/Verification/CountMatchingStrategy.php
+++ b/src/WireMock/Verification/CountMatchingStrategy.php
@@ -4,13 +4,16 @@
class CountMatchingStrategy
{
+ /** @var callable(int): bool */
private $closure;
+ /** @var string */
private $operator;
+ /** @var int */
private $operand;
/**
* CountMatchingStrategy constructor.
- * @param callable $closure Closure that takes an int and returns a boolean
+ * @param callable(int): bool $closure Closure that takes an int and returns a boolean
* @param string $operator
* @param int $operand
*/
@@ -23,7 +26,7 @@ private function __construct($closure, $operator, $operand)
/**
* @param int $count
- * @return boolean
+ * @return bool
*/
public function matches($count)
{
@@ -31,28 +34,38 @@ public function matches($count)
return $closure($count);
}
- public function describe()
+ public function describe(): string
{
return $this->operator . ' ' . $this->operand;
}
- public static function lessThan($expected) {
+ /** @param int $expected */
+ public static function lessThan($expected): self
+ {
return new self(function($actual) use ($expected) { return $actual < $expected; }, '<', $expected);
}
- public static function lessThanOrExactly($expected) {
+ /** @param int $expected */
+ public static function lessThanOrExactly($expected): self
+ {
return new self(function($actual) use ($expected) { return $actual <= $expected; }, '<=', $expected);
}
- public static function exactly($expected) {
+ /** @param int $expected */
+ public static function exactly($expected): self
+ {
return new self(function($actual) use ($expected) { return $actual == $expected; }, '==', $expected);
}
- public static function moreThanOrExactly($expected) {
+ /** @param int $expected */
+ public static function moreThanOrExactly($expected): self
+ {
return new self(function($actual) use ($expected) { return $actual >= $expected; }, '>=', $expected);
}
- public static function moreThan($expected) {
+ /** @param int $expected */
+ public static function moreThan($expected): self
+ {
return new self(function($actual) use ($expected) { return $actual > $expected; }, '>', $expected);
}
}
\ No newline at end of file
diff --git a/test/WireMock/Serde/TestClasses/ConstructorParams.php b/test/WireMock/Serde/TestClasses/ConstructorParams.php
index c76349f..45c1b24 100644
--- a/test/WireMock/Serde/TestClasses/ConstructorParams.php
+++ b/test/WireMock/Serde/TestClasses/ConstructorParams.php
@@ -6,7 +6,7 @@ class ConstructorParams
{
/** @var int */
private $fieldWithConstructorParam;
- /** @var bool */
+ /** @var boolean */
private $fieldWithOptionalConstructorParam;
/**
diff --git a/test/WireMock/Serde/TestClasses/DiscriminatedTypeParent.php b/test/WireMock/Serde/TestClasses/DiscriminatedTypeParent.php
index 758c5e9..fa76de4 100644
--- a/test/WireMock/Serde/TestClasses/DiscriminatedTypeParent.php
+++ b/test/WireMock/Serde/TestClasses/DiscriminatedTypeParent.php
@@ -20,7 +20,8 @@ public function __construct(string $type)
$this->type = $type;
}
- private static function getDiscriminatorMapping()
+ /** @noinspection PhpUnusedPrivateMethodInspection */
+ private static function getDiscriminatorMapping() // @phpstan-ignore method.unused
{
return new ClassDiscriminatorMapping('type', [
'parent' => DiscriminatedTypeParent::class,
diff --git a/test/WireMock/Serde/TestClasses/FieldOnlyPrimitives.php b/test/WireMock/Serde/TestClasses/FieldOnlyPrimitives.php
index 311eea7..1ca7a60 100644
--- a/test/WireMock/Serde/TestClasses/FieldOnlyPrimitives.php
+++ b/test/WireMock/Serde/TestClasses/FieldOnlyPrimitives.php
@@ -8,7 +8,7 @@ class FieldOnlyPrimitives
private $int;
/** @var float */
private $float;
- /** @var bool */
+ /** @var boolean */
private $bool;
/** @var string */
private $string;
diff --git a/test/WireMock/Serde/TestClasses/UnionTypeFields.php b/test/WireMock/Serde/TestClasses/UnionTypeFields.php
index 75b6156..b72fd3e 100644
--- a/test/WireMock/Serde/TestClasses/UnionTypeFields.php
+++ b/test/WireMock/Serde/TestClasses/UnionTypeFields.php
@@ -14,7 +14,7 @@ class UnionTypeFields
private $arrayOfUnion;
/**
- * @param bool|int|string $primitivesUnion
+ * @param boolean|int|string $primitivesUnion
* @param int|int[] $arrayUnion
* @param float|DefaultedField $classUnion
* @param (string|int)[] $arrayOfUnion
diff --git a/test/WireMock/SerdeGen/TestClasses/KitchenSink.php b/test/WireMock/SerdeGen/TestClasses/KitchenSink.php
index 3effd0c..e4f7e8b 100644
--- a/test/WireMock/SerdeGen/TestClasses/KitchenSink.php
+++ b/test/WireMock/SerdeGen/TestClasses/KitchenSink.php
@@ -18,7 +18,7 @@ private static function discriminate() {}
private $reqArg;
/**
- * @var bool
+ * @var boolean
* @serde-name renamed
*/
private $originalName;