From 9510fd22198ac67b3d6cf99c7f291316b107609d Mon Sep 17 00:00:00 2001 From: Vitaliy Kosachev Date: Mon, 25 Jan 2016 13:29:55 +0200 Subject: [PATCH] php 7.0 support --- .gitignore | 1 + Converter/TypeRepository.php | 2 +- Converter/XopIncludeTypeConverter.php | 4 ++-- ServiceDefinition/Dumper/WsdlTypeStrategy.php | 4 ++-- Util/{String.php => Strings.php} | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) rename Util/{String.php => Strings.php} (98%) diff --git a/.gitignore b/.gitignore index c49a5d8..2214ac5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ vendor/ composer.lock phpunit.xml +.idea/* diff --git a/Converter/TypeRepository.php b/Converter/TypeRepository.php index 462dd75..5dc903a 100644 --- a/Converter/TypeRepository.php +++ b/Converter/TypeRepository.php @@ -13,7 +13,7 @@ use BeSimple\SoapBundle\ServiceDefinition\ServiceDefinition; use BeSimple\SoapBundle\Util\Assert; use BeSimple\SoapBundle\Util\QName; -use BeSimple\SoapBundle\Util\String; +use BeSimple\SoapBundle\Util\Strings; /** * @author Christian Kerl diff --git a/Converter/XopIncludeTypeConverter.php b/Converter/XopIncludeTypeConverter.php index fc5a9da..b754007 100644 --- a/Converter/XopIncludeTypeConverter.php +++ b/Converter/XopIncludeTypeConverter.php @@ -12,7 +12,7 @@ use BeSimple\SoapBundle\Soap\SoapRequest; use BeSimple\SoapBundle\Soap\SoapResponse; -use BeSimple\SoapBundle\Util\String; +use BeSimple\SoapBundle\Util\Strings; /** * @author Christian Kerl @@ -39,7 +39,7 @@ public function convertXmlToPhp(SoapRequest $request, $data) $ref = $include->getAttribute('href'); - if (String::startsWith($ref, 'cid:')) { + if (Strings::startsWith($ref, 'cid:')) { $cid = urldecode(substr($ref, 4)); return $request->getSoapAttachments()->get($cid)->getContent(); diff --git a/ServiceDefinition/Dumper/WsdlTypeStrategy.php b/ServiceDefinition/Dumper/WsdlTypeStrategy.php index 96207ea..4862155 100644 --- a/ServiceDefinition/Dumper/WsdlTypeStrategy.php +++ b/ServiceDefinition/Dumper/WsdlTypeStrategy.php @@ -13,7 +13,7 @@ use BeSimple\SoapBundle\ServiceDefinition\ServiceDefinition; use BeSimple\SoapBundle\ServiceDefinition\Loader\AnnotationComplexTypeLoader; use BeSimple\SoapBundle\ServiceDefinition\Strategy\ComplexType; -use BeSimple\SoapBundle\Util\String; +use BeSimple\SoapBundle\Util\Strings; use Zend\Soap\Exception; use Zend\Soap\Wsdl as BaseWsdl; @@ -68,7 +68,7 @@ public function addComplexType($type) throw new \LogicException(sprintf('Cannot add complex type "%s", no context is set for this composite strategy.', $type)); } - $strategy = String::endsWith($type, '[]') ? $this->getArrayStrategy() : $this->getTypeStrategy(); + $strategy = Strings::endsWith($type, '[]') ? $this->getArrayStrategy() : $this->getTypeStrategy(); return $strategy->addComplexType($type); } diff --git a/Util/String.php b/Util/Strings.php similarity index 98% rename from Util/String.php rename to Util/Strings.php index b95d53e..02e4955 100644 --- a/Util/String.php +++ b/Util/Strings.php @@ -15,7 +15,7 @@ * * @author Christian Kerl */ -class String +class Strings { /** * Checks if a string starts with a given string.