diff --git a/resources/functionMap.php b/resources/functionMap.php index cd0cff00cd..6da777b623 100644 --- a/resources/functionMap.php +++ b/resources/functionMap.php @@ -10301,7 +10301,7 @@ 'SoapClient::__setSoapHeaders' => ['bool', 'soapheaders='=>''], 'SoapClient::__soapCall' => ['mixed', 'function_name'=>'string', 'arguments'=>'array', 'options='=>'array', 'input_headers='=>'SoapHeader|array', '&w_output_headers='=>'array'], 'SoapClient::SoapClient' => ['object', 'wsdl'=>'mixed', 'options='=>'array|null'], -'SoapFault::__construct' => ['void', 'faultcode'=>'string', 'string'=>'string', 'faultactor='=>'string', 'detail='=>'string', 'faultname='=>'string', 'headerfault='=>'string'], +'SoapFault::__construct' => ['void', 'faultcode'=>'string', 'string'=>'string', 'faultactor='=>'string', 'detail='=>'mixed', 'faultname='=>'string', 'headerfault='=>'mixed'], 'SoapFault::__toString' => ['string'], 'SoapFault::SoapFault' => ['object', 'faultcode'=>'string', 'string'=>'string', 'faultactor='=>'string', 'detail='=>'string', 'faultname='=>'string', 'headerfault='=>'string'], 'SoapHeader::__construct' => ['void', 'namespace'=>'string', 'name'=>'string', 'data='=>'mixed', 'mustunderstand='=>'bool', 'actor='=>'string'], diff --git a/tests/PHPStan/Rules/Classes/data/instantiation-soap.php b/tests/PHPStan/Rules/Classes/data/instantiation-soap.php index 2025fd82ea..1ba5a85d98 100644 --- a/tests/PHPStan/Rules/Classes/data/instantiation-soap.php +++ b/tests/PHPStan/Rules/Classes/data/instantiation-soap.php @@ -4,5 +4,21 @@ function () { throw new \SoapFault('Server', 123); +}; + +function () { throw new \SoapFault('Server', 'Some error message'); }; + +function () { + throw new \SoapFault('Server', 'Some error message', 'actor', [], 'name', []); +}; + +function () { + throw new \SoapFault('Server', 'Some error message', 'actor', 'test', 'name', 'test'); +}; + + +function () { + throw new \SoapFault('Server', 'Some error message', 'actor', 1, 'name', 2); +};