@@ -26,9 +26,9 @@ abstract class AbstractSoapClientBase implements SoapClientInterface
2626 * @param array $wsdlOptions
2727 * @param bool $resetSoapClient allows to disable the SoapClient redefinition
2828 */
29- public function __construct (array $ wsdlOptions = array () , $ resetSoapClient = true )
29+ public function __construct (array $ wsdlOptions = [] , $ resetSoapClient = true )
3030 {
31- $ this ->setLastError (array () );
31+ $ this ->setLastError ([] );
3232 /**
3333 * Init soap Client
3434 * Set default values
@@ -65,7 +65,7 @@ public static function setSoapClient(\SoapClient $soapClient)
6565 */
6666 public function initSoapClient (array $ options )
6767 {
68- $ wsdlOptions = array () ;
68+ $ wsdlOptions = [] ;
6969 $ defaultWsdlOptions = static ::getDefaultWsdlOptions ();
7070 foreach ($ defaultWsdlOptions as $ optionName => $ optionValue ) {
7171 if (array_key_exists ($ optionName , $ options ) && !empty ($ options [$ optionName ])) {
@@ -131,7 +131,7 @@ public function getSoapClientClassName($soapClientClassName = null)
131131 */
132132 public static function getDefaultWsdlOptions ()
133133 {
134- return array (
134+ return [
135135 self ::WSDL_CLASSMAP => null ,
136136 self ::WSDL_CACHE_WSDL => WSDL_CACHE_NONE ,
137137 self ::WSDL_COMPRESSION => null ,
@@ -156,7 +156,7 @@ public static function getDefaultWsdlOptions()
156156 self ::WSDL_PASSPHRASE => null ,
157157 self ::WSDL_AUTHENTICATION => null ,
158158 self ::WSDL_SSL_METHOD => null ,
159- ) ;
159+ ] ;
160160 }
161161 /**
162162 * Allows to set the SoapClient location to call
@@ -270,7 +270,7 @@ public static function getFormatedXml($string, $asDomDocument = false)
270270 public static function convertStringHeadersToArray ($ headers )
271271 {
272272 $ lines = explode ("\r\n" , $ headers );
273- $ headers = array () ;
273+ $ headers = [] ;
274274 foreach ($ lines as $ line ) {
275275 if (strpos ($ line , ': ' )) {
276276 $ headerParts = explode (': ' , $ line );
@@ -294,7 +294,7 @@ public static function convertStringHeadersToArray($headers)
294294 public function setSoapHeader ($ nameSpace , $ name , $ data , $ mustUnderstand = false , $ actor = null )
295295 {
296296 if (static ::getSoapClient ()) {
297- $ defaultHeaders = (isset (static ::getSoapClient ()->__default_headers ) && is_array (static ::getSoapClient ()->__default_headers )) ? static ::getSoapClient ()->__default_headers : array () ;
297+ $ defaultHeaders = (isset (static ::getSoapClient ()->__default_headers ) && is_array (static ::getSoapClient ()->__default_headers )) ? static ::getSoapClient ()->__default_headers : [] ;
298298 foreach ($ defaultHeaders as $ index => $ soapHeader ) {
299299 if ($ soapHeader ->name === $ name ) {
300300 unset($ defaultHeaders [$ index ]);
@@ -326,13 +326,13 @@ public function setHttpHeader($headerName, $headerValue)
326326 if (static ::getSoapClient () && !empty ($ headerName )) {
327327 $ streamContext = $ this ->getStreamContext ();
328328 if ($ streamContext === null ) {
329- $ options = array () ;
330- $ options ['http ' ] = array () ;
329+ $ options = [] ;
330+ $ options ['http ' ] = [] ;
331331 $ options ['http ' ]['header ' ] = '' ;
332332 } else {
333333 $ options = stream_context_get_options ($ streamContext );
334334 if (!array_key_exists ('http ' , $ options ) || !is_array ($ options ['http ' ])) {
335- $ options ['http ' ] = array () ;
335+ $ options ['http ' ] = [] ;
336336 $ options ['http ' ]['header ' ] = '' ;
337337 } elseif (!array_key_exists ('header ' , $ options ['http ' ])) {
338338 $ options ['http ' ]['header ' ] = '' ;
@@ -343,7 +343,7 @@ public function setHttpHeader($headerName, $headerValue)
343343 /**
344344 * Ensure there is only one header entry for this header name
345345 */
346- $ newLines = array () ;
346+ $ newLines = [] ;
347347 foreach ($ lines as $ line ) {
348348 if (!empty ($ line ) && strpos ($ line , $ headerName ) === false ) {
349349 array_push ($ newLines , $ line );
@@ -386,7 +386,7 @@ public function getStreamContext()
386386 */
387387 public function getStreamContextOptions ()
388388 {
389- $ options = array () ;
389+ $ options = [] ;
390390 $ context = $ this ->getStreamContext ();
391391 if ($ context !== null ) {
392392 $ options = stream_context_get_options ($ context );
0 commit comments