Merge pull request #3 from Cadoles/php-cs-fixer
Passe générale php-cs-fixer
This commit is contained in:
commit
30850d7a01
|
@ -2,3 +2,4 @@
|
||||||
composer.lock
|
composer.lock
|
||||||
composer.phar
|
composer.phar
|
||||||
phpunit.xml
|
phpunit.xml
|
||||||
|
.php_cs.cache
|
|
@ -96,8 +96,12 @@ class Configuration
|
||||||
->info('proxy configuration')
|
->info('proxy configuration')
|
||||||
->addDefaultsIfNotSet()
|
->addDefaultsIfNotSet()
|
||||||
->beforeNormalization()
|
->beforeNormalization()
|
||||||
->ifTrue(function ($v) { return !is_array($v); })
|
->ifTrue(function ($v) {
|
||||||
->then(function ($v) { return array('host' => null === $v ? false : $v); })
|
return !is_array($v);
|
||||||
|
})
|
||||||
|
->then(function ($v) {
|
||||||
|
return array('host' => null === $v ? false : $v);
|
||||||
|
})
|
||||||
->end()
|
->end()
|
||||||
->children()
|
->children()
|
||||||
->scalarNode('host')->defaultFalse()->end()
|
->scalarNode('host')->defaultFalse()->end()
|
||||||
|
|
|
@ -24,5 +24,5 @@ interface MessageBinderInterface
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
function processMessage(Method $messageDefinition, $message, TypeRepository $typeRepository);
|
public function processMessage(Method $messageDefinition, $message, TypeRepository $typeRepository);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,8 @@ class ServiceBinder
|
||||||
* @param MessageBinderInterface $requestMessageBinder
|
* @param MessageBinderInterface $requestMessageBinder
|
||||||
* @param MessageBinderInterface $responseMessageBinder
|
* @param MessageBinderInterface $responseMessageBinder
|
||||||
*/
|
*/
|
||||||
public function __construct(Definition $definition, MessageBinderInterface $requestHeaderMessageBinder, MessageBinderInterface $requestMessageBinder, MessageBinderInterface $responseMessageBinder) {
|
public function __construct(Definition $definition, MessageBinderInterface $requestHeaderMessageBinder, MessageBinderInterface $requestMessageBinder, MessageBinderInterface $responseMessageBinder)
|
||||||
|
{
|
||||||
$this->definition = $definition;
|
$this->definition = $definition;
|
||||||
|
|
||||||
$this->requestHeaderMessageBinder = $requestHeaderMessageBinder;
|
$this->requestHeaderMessageBinder = $requestHeaderMessageBinder;
|
||||||
|
|
|
@ -22,5 +22,5 @@ interface ConfigurationInterface
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function getAliasName();
|
public function getAliasName();
|
||||||
}
|
}
|
|
@ -12,8 +12,8 @@ namespace BeSimple\SoapBundle\ServiceDefinition\Annotation;
|
||||||
|
|
||||||
interface TypedElementInterface
|
interface TypedElementInterface
|
||||||
{
|
{
|
||||||
function getPhpType();
|
public function getPhpType();
|
||||||
function getXmlType();
|
public function getXmlType();
|
||||||
function setPhpType($phpType);
|
public function setPhpType($phpType);
|
||||||
function setXmlType($xmlType);
|
public function setXmlType($xmlType);
|
||||||
}
|
}
|
|
@ -251,7 +251,6 @@ class Curl
|
||||||
$errorCodeMapping = $this->getErrorCodeMapping();
|
$errorCodeMapping = $this->getErrorCodeMapping();
|
||||||
$errorNumber = curl_errno($this->ch);
|
$errorNumber = curl_errno($this->ch);
|
||||||
if (isset($errorCodeMapping[$errorNumber])) {
|
if (isset($errorCodeMapping[$errorNumber])) {
|
||||||
|
|
||||||
return $errorCodeMapping[$errorNumber];
|
return $errorCodeMapping[$errorNumber];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,8 @@ abstract class AbstractWebServerTest extends \PHPUnit_Framework_TestCase
|
||||||
/**
|
/**
|
||||||
* @var ProcessBuilder
|
* @var ProcessBuilder
|
||||||
*/
|
*/
|
||||||
static protected $webserver;
|
protected static $webserver;
|
||||||
static protected $websererPortLength;
|
protected static $websererPortLength;
|
||||||
|
|
||||||
public static function setUpBeforeClass()
|
public static function setUpBeforeClass()
|
||||||
{
|
{
|
||||||
|
|
|
@ -36,7 +36,6 @@ try {
|
||||||
$attachment->binaryData = $b64;
|
$attachment->binaryData = $b64;
|
||||||
|
|
||||||
var_dump($sc->attachment($attachment));
|
var_dump($sc->attachment($attachment));
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
var_dump($e);
|
var_dump($e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,6 @@ $options = array(
|
||||||
$sc = new BeSimpleSoapClient(__DIR__.'/Fixtures/SwA.wsdl', $options);
|
$sc = new BeSimpleSoapClient(__DIR__.'/Fixtures/SwA.wsdl', $options);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$upload = new uploadFile();
|
$upload = new uploadFile();
|
||||||
$upload->name = 'upload.txt';
|
$upload->name = 'upload.txt';
|
||||||
$upload->data = 'This is a test. :)';
|
$upload->data = 'This is a test. :)';
|
||||||
|
|
|
@ -69,7 +69,6 @@ try {
|
||||||
$ab->type = 'scifi';
|
$ab->type = 'scifi';
|
||||||
|
|
||||||
var_dump($sc->addBook($ab));
|
var_dump($sc->addBook($ab));
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
var_dump($e);
|
var_dump($e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,6 @@ try {
|
||||||
$ab->type = 'scifi';
|
$ab->type = 'scifi';
|
||||||
|
|
||||||
var_dump($sc->addBook($ab));
|
var_dump($sc->addBook($ab));
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
var_dump($e);
|
var_dump($e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,9 +25,9 @@ use org\bovigo\vfs\vfsStreamWrapper;
|
||||||
*/
|
*/
|
||||||
class WsdlDownloaderTest extends AbstractWebserverTest
|
class WsdlDownloaderTest extends AbstractWebserverTest
|
||||||
{
|
{
|
||||||
static protected $filesystem;
|
protected static $filesystem;
|
||||||
|
|
||||||
static protected $fixturesPath;
|
protected static $fixturesPath;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dataProvider provideDownload
|
* @dataProvider provideDownload
|
||||||
|
|
|
@ -157,7 +157,6 @@ class WsAddressingFilter implements SoapRequestFilter, SoapResponseFilter
|
||||||
public function getReferenceParameter($ns, $parameter)
|
public function getReferenceParameter($ns, $parameter)
|
||||||
{
|
{
|
||||||
if (isset($this->referenceParametersRecieved[$ns][$parameter])) {
|
if (isset($this->referenceParametersRecieved[$ns][$parameter])) {
|
||||||
|
|
||||||
return $this->referenceParametersRecieved[$ns][$parameter];
|
return $this->referenceParametersRecieved[$ns][$parameter];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,6 @@ class WsSecurityFilter extends WsSecurityFilterClientServer implements SoapReque
|
||||||
if (null !== $this->password
|
if (null !== $this->password
|
||||||
&& (null === $this->userSecurityKey
|
&& (null === $this->userSecurityKey
|
||||||
|| (null !== $this->userSecurityKey && !$this->userSecurityKey->hasPrivateKey()))) {
|
|| (null !== $this->userSecurityKey && !$this->userSecurityKey->hasPrivateKey()))) {
|
||||||
|
|
||||||
if (self::PASSWORD_TYPE_DIGEST === $this->passwordType) {
|
if (self::PASSWORD_TYPE_DIGEST === $this->passwordType) {
|
||||||
$nonce = mt_rand();
|
$nonce = mt_rand();
|
||||||
$password = base64_encode(sha1($nonce . $createdTimestamp . $this->password, true));
|
$password = base64_encode(sha1($nonce . $createdTimestamp . $this->password, true));
|
||||||
|
|
|
@ -56,7 +56,7 @@ class WsdlDownloader
|
||||||
/**
|
/**
|
||||||
* Resolve WSDl/XSD includes.
|
* Resolve WSDl/XSD includes.
|
||||||
*
|
*
|
||||||
* @var boolean
|
* @var bool
|
||||||
*/
|
*/
|
||||||
protected $resolveRemoteIncludes = true;
|
protected $resolveRemoteIncludes = true;
|
||||||
|
|
||||||
|
@ -64,13 +64,13 @@ class WsdlDownloader
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param \BeSimple\SoapClient\Curl $curl Curl instance
|
* @param \BeSimple\SoapClient\Curl $curl Curl instance
|
||||||
* @param boolean $resolveRemoteIncludes WSDL/XSD include enabled?
|
* @param bool $resolveRemoteIncludes WSDL/XSD include enabled?
|
||||||
* @param boolean $cacheWsdl Cache constant
|
* @param bool $cacheWsdl Cache constant
|
||||||
*/
|
*/
|
||||||
public function __construct(Curl $curl, $resolveRemoteIncludes = true, $cacheWsdl = Cache::TYPE_DISK)
|
public function __construct(Curl $curl, $resolveRemoteIncludes = true, $cacheWsdl = Cache::TYPE_DISK)
|
||||||
{
|
{
|
||||||
$this->curl = $curl;
|
$this->curl = $curl;
|
||||||
$this->resolveRemoteIncludes = (Boolean) $resolveRemoteIncludes;
|
$this->resolveRemoteIncludes = (bool) $resolveRemoteIncludes;
|
||||||
|
|
||||||
// get current WSDL caching config
|
// get current WSDL caching config
|
||||||
$this->cacheEnabled = $cacheWsdl === Cache::TYPE_NONE ? Cache::DISABLED : Cache::ENABLED == Cache::isEnabled();
|
$this->cacheEnabled = $cacheWsdl === Cache::TYPE_NONE ? Cache::DISABLED : Cache::ENABLED == Cache::isEnabled();
|
||||||
|
@ -130,7 +130,7 @@ class WsdlDownloader
|
||||||
*
|
*
|
||||||
* @param string $file File URL/path
|
* @param string $file File URL/path
|
||||||
*
|
*
|
||||||
* @return boolean
|
* @return bool
|
||||||
*/
|
*/
|
||||||
private function isRemoteFile($file)
|
private function isRemoteFile($file)
|
||||||
{
|
{
|
||||||
|
@ -149,9 +149,7 @@ class WsdlDownloader
|
||||||
*
|
*
|
||||||
* @param string $xml XML file
|
* @param string $xml XML file
|
||||||
* @param string $cacheFilePath Cache file name
|
* @param string $cacheFilePath Cache file name
|
||||||
* @param boolean $parentFilePath Parent file name
|
* @param bool $parentFilePath Parent file name
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
*/
|
||||||
private function resolveRemoteIncludes($xml, $cacheFilePath, $parentFilePath = null)
|
private function resolveRemoteIncludes($xml, $cacheFilePath, $parentFilePath = null)
|
||||||
{
|
{
|
||||||
|
@ -214,7 +212,7 @@ class WsdlDownloader
|
||||||
$urlParts = parse_url($base);
|
$urlParts = parse_url($base);
|
||||||
|
|
||||||
// combine base path with relative path
|
// combine base path with relative path
|
||||||
if (isset($urlParts['path']) && '/' === $relative{0}) {
|
if (isset($urlParts['path']) && '/' === $relative[0]) {
|
||||||
// $relative is absolute path from domain (starts with /)
|
// $relative is absolute path from domain (starts with /)
|
||||||
$path = $relative;
|
$path = $relative;
|
||||||
} elseif (isset($urlParts['path']) && strrpos($urlParts['path'], '/') === (strlen($urlParts['path']))) {
|
} elseif (isset($urlParts['path']) && strrpos($urlParts['path'], '/') === (strlen($urlParts['path']))) {
|
||||||
|
@ -247,7 +245,7 @@ class WsdlDownloader
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$keyToDelete--;
|
--$keyToDelete;
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($parts[$key]);
|
unset($parts[$key]);
|
||||||
|
|
|
@ -65,6 +65,5 @@ class XmlMimeFilter implements SoapRequestFilter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ abstract class AbstractSoapBuilder
|
||||||
/**
|
/**
|
||||||
* @return AbstractSoapBuilder
|
* @return AbstractSoapBuilder
|
||||||
*/
|
*/
|
||||||
static public function createWithDefaults()
|
public static function createWithDefaults()
|
||||||
{
|
{
|
||||||
$builder = new static();
|
$builder = new static();
|
||||||
|
|
||||||
|
|
|
@ -25,24 +25,24 @@ class Cache
|
||||||
const TYPE_MEMORY = WSDL_CACHE_MEMORY;
|
const TYPE_MEMORY = WSDL_CACHE_MEMORY;
|
||||||
const TYPE_DISK_MEMORY = WSDL_CACHE_BOTH;
|
const TYPE_DISK_MEMORY = WSDL_CACHE_BOTH;
|
||||||
|
|
||||||
static protected $types = array(
|
protected static $types = array(
|
||||||
self::TYPE_NONE,
|
self::TYPE_NONE,
|
||||||
self::TYPE_DISK,
|
self::TYPE_DISK,
|
||||||
self::TYPE_MEMORY,
|
self::TYPE_MEMORY,
|
||||||
self::TYPE_DISK_MEMORY,
|
self::TYPE_DISK_MEMORY,
|
||||||
);
|
);
|
||||||
|
|
||||||
static public function getTypes()
|
public static function getTypes()
|
||||||
{
|
{
|
||||||
return self::$types;
|
return self::$types;
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function isEnabled()
|
public static function isEnabled()
|
||||||
{
|
{
|
||||||
return self::iniGet('soap.wsdl_cache_enabled');
|
return self::iniGet('soap.wsdl_cache_enabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function setEnabled($enabled)
|
public static function setEnabled($enabled)
|
||||||
{
|
{
|
||||||
if (!in_array($enabled, array(self::ENABLED, self::DISABLED), true)) {
|
if (!in_array($enabled, array(self::ENABLED, self::DISABLED), true)) {
|
||||||
throw new \InvalidArgumentException();
|
throw new \InvalidArgumentException();
|
||||||
|
@ -51,12 +51,12 @@ class Cache
|
||||||
self::iniSet('soap.wsdl_cache_enabled', $enabled);
|
self::iniSet('soap.wsdl_cache_enabled', $enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function getType()
|
public static function getType()
|
||||||
{
|
{
|
||||||
return self::iniGet('soap.wsdl_cache');
|
return self::iniGet('soap.wsdl_cache');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function setType($type)
|
public static function setType($type)
|
||||||
{
|
{
|
||||||
if (!in_array($type, self::getTypes(), true)) {
|
if (!in_array($type, self::getTypes(), true)) {
|
||||||
throw new \InvalidArgumentException('The cache type has to be either Cache::TYPE_NONE, Cache::TYPE_DISK, Cache::TYPE_MEMORY or Cache::TYPE_DISK_MEMORY');
|
throw new \InvalidArgumentException('The cache type has to be either Cache::TYPE_NONE, Cache::TYPE_DISK, Cache::TYPE_MEMORY or Cache::TYPE_DISK_MEMORY');
|
||||||
|
@ -65,12 +65,12 @@ class Cache
|
||||||
self::iniSet('soap.wsdl_cache', $type);
|
self::iniSet('soap.wsdl_cache', $type);
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function getDirectory()
|
public static function getDirectory()
|
||||||
{
|
{
|
||||||
return self::iniGet('soap.wsdl_cache_dir');
|
return self::iniGet('soap.wsdl_cache_dir');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function setDirectory($directory)
|
public static function setDirectory($directory)
|
||||||
{
|
{
|
||||||
if (!is_dir($directory)) {
|
if (!is_dir($directory)) {
|
||||||
mkdir($directory, 0777, true);
|
mkdir($directory, 0777, true);
|
||||||
|
@ -79,32 +79,32 @@ class Cache
|
||||||
self::iniSet('soap.wsdl_cache_dir', $directory);
|
self::iniSet('soap.wsdl_cache_dir', $directory);
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function getLifetime()
|
public static function getLifetime()
|
||||||
{
|
{
|
||||||
return self::iniGet('soap.wsdl_cache_ttl');
|
return self::iniGet('soap.wsdl_cache_ttl');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function setLifetime($lifetime)
|
public static function setLifetime($lifetime)
|
||||||
{
|
{
|
||||||
self::iniSet('soap.wsdl_cache_ttl', $lifetime);
|
self::iniSet('soap.wsdl_cache_ttl', $lifetime);
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function getLimit()
|
public static function getLimit()
|
||||||
{
|
{
|
||||||
return self::iniGet('soap.wsdl_cache_limit');
|
return self::iniGet('soap.wsdl_cache_limit');
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function setLimit($limit)
|
public static function setLimit($limit)
|
||||||
{
|
{
|
||||||
self::iniSet('soap.wsdl_cache_limit', $limit);
|
self::iniSet('soap.wsdl_cache_limit', $limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
static protected function iniGet($key)
|
protected static function iniGet($key)
|
||||||
{
|
{
|
||||||
return ini_get($key);
|
return ini_get($key);
|
||||||
}
|
}
|
||||||
|
|
||||||
static protected function iniSet($key, $value)
|
protected static function iniSet($key, $value)
|
||||||
{
|
{
|
||||||
ini_set($key, $value);
|
ini_set($key, $value);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,4 +44,3 @@ class DateTimeTypeConverter implements TypeConverterInterface
|
||||||
return sprintf('<%1$s>%2$s</%1$s>', $this->getTypeName(), $data->format('Y-m-d\TH:i:sP'));
|
return sprintf('<%1$s>%2$s</%1$s>', $this->getTypeName(), $data->format('Y-m-d\TH:i:sP'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,4 +44,3 @@ class DateTypeConverter implements TypeConverterInterface
|
||||||
return sprintf('<%1$s>%2$s</%1$s>', $this->getTypeName(), $data->format('Y-m-d'));
|
return sprintf('<%1$s>%2$s</%1$s>', $this->getTypeName(), $data->format('Y-m-d'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,10 +65,8 @@ class MtomTypeConverter implements TypeConverterInterface, SoapKernelAwareInterf
|
||||||
$contentId = urldecode(substr($ref, 4));
|
$contentId = urldecode(substr($ref, 4));
|
||||||
|
|
||||||
if (null !== ($part = $this->soapKernel->getAttachment($contentId))) {
|
if (null !== ($part = $this->soapKernel->getAttachment($contentId))) {
|
||||||
|
|
||||||
return $part->getContent();
|
return $part->getContent();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,5 +28,5 @@ interface SoapKernelAwareInterface
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function setKernel(SoapKernel $soapKernel);
|
public function setKernel(SoapKernel $soapKernel);
|
||||||
}
|
}
|
|
@ -61,10 +61,8 @@ class SwaTypeConverter implements TypeConverterInterface, SoapKernelAwareInterfa
|
||||||
$contentId = urldecode(substr($ref, 4));
|
$contentId = urldecode(substr($ref, 4));
|
||||||
|
|
||||||
if (null !== ($part = $this->soapKernel->getAttachment($contentId))) {
|
if (null !== ($part = $this->soapKernel->getAttachment($contentId))) {
|
||||||
|
|
||||||
return $part->getContent();
|
return $part->getContent();
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,14 +24,14 @@ interface TypeConverterInterface
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function getTypeNamespace();
|
public function getTypeNamespace();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get type name.
|
* Get type name.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function getTypeName();
|
public function getTypeName();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert given XML string to PHP type.
|
* Convert given XML string to PHP type.
|
||||||
|
@ -40,7 +40,7 @@ interface TypeConverterInterface
|
||||||
*
|
*
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
function convertXmlToPhp($data);
|
public function convertXmlToPhp($data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert PHP type to XML string.
|
* Convert PHP type to XML string.
|
||||||
|
@ -49,5 +49,5 @@ interface TypeConverterInterface
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function convertPhpToXml($data);
|
public function convertPhpToXml($data);
|
||||||
}
|
}
|
|
@ -172,7 +172,8 @@ class Helper
|
||||||
return sprintf(
|
return sprintf(
|
||||||
'%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
|
'%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
|
||||||
// 32 bits for "time_low"
|
// 32 bits for "time_low"
|
||||||
mt_rand(0, 0xffff), mt_rand(0, 0xffff),
|
mt_rand(0, 0xffff),
|
||||||
|
mt_rand(0, 0xffff),
|
||||||
// 16 bits for "time_mid"
|
// 16 bits for "time_mid"
|
||||||
mt_rand(0, 0xffff),
|
mt_rand(0, 0xffff),
|
||||||
// 16 bits for "time_hi_and_version",
|
// 16 bits for "time_hi_and_version",
|
||||||
|
@ -183,7 +184,9 @@ class Helper
|
||||||
// two most significant bits holds zero and one for variant DCE1.1
|
// two most significant bits holds zero and one for variant DCE1.1
|
||||||
mt_rand(0, 0x3fff) | 0x8000,
|
mt_rand(0, 0x3fff) | 0x8000,
|
||||||
// 48 bits for "node"
|
// 48 bits for "node"
|
||||||
mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff)
|
mt_rand(0, 0xffff),
|
||||||
|
mt_rand(0, 0xffff),
|
||||||
|
mt_rand(0, 0xffff)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ abstract class SoapMessage
|
||||||
*
|
*
|
||||||
* @var array(string=>string)
|
* @var array(string=>string)
|
||||||
*/
|
*/
|
||||||
static protected $versionToContentTypeMap = array(
|
protected static $versionToContentTypeMap = array(
|
||||||
SOAP_1_1 => 'text/xml; charset=utf-8',
|
SOAP_1_1 => 'text/xml; charset=utf-8',
|
||||||
SOAP_1_2 => 'application/soap+xml; charset=utf-8'
|
SOAP_1_2 => 'application/soap+xml; charset=utf-8'
|
||||||
);
|
);
|
||||||
|
|
|
@ -22,5 +22,4 @@ use BeSimple\SoapCommon\SoapMessage;
|
||||||
*/
|
*/
|
||||||
class SoapRequest extends SoapMessage
|
class SoapRequest extends SoapMessage
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
|
@ -22,5 +22,4 @@ use BeSimple\SoapCommon\SoapMessage;
|
||||||
*/
|
*/
|
||||||
class SoapResponse extends SoapMessage
|
class SoapResponse extends SoapMessage
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
|
@ -51,4 +51,3 @@ class DateTimeTypeConverterTest extends \PHPUnit_Framework_TestCase
|
||||||
$this->assertNull($date);
|
$this->assertNull($date);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,4 +49,3 @@ class DateTypeConverterTest extends \PHPUnit_Framework_TestCase
|
||||||
$this->assertNull($date);
|
$this->assertNull($date);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -338,7 +338,6 @@ abstract class WsSecurityFilterClientServer
|
||||||
return XmlSecurityKey::factory($algorithm, $key, false, XmlSecurityKey::TYPE_PRIVATE);
|
return XmlSecurityKey::factory($algorithm, $key, false, XmlSecurityKey::TYPE_PRIVATE);
|
||||||
} elseif (Helper::NS_WSS === $referencedNode->namespaceURI
|
} elseif (Helper::NS_WSS === $referencedNode->namespaceURI
|
||||||
&& 'BinarySecurityToken' == $referencedNode->localName) {
|
&& 'BinarySecurityToken' == $referencedNode->localName) {
|
||||||
|
|
||||||
$key = XmlSecurityPem::formatKeyInPemFormat($referencedNode->textContent);
|
$key = XmlSecurityPem::formatKeyInPemFormat($referencedNode->textContent);
|
||||||
|
|
||||||
return XmlSecurityKey::factory(XmlSecurityKey::RSA_SHA1, $key, false, XmlSecurityKey::TYPE_PUBLIC);
|
return XmlSecurityKey::factory(XmlSecurityKey::RSA_SHA1, $key, false, XmlSecurityKey::TYPE_PUBLIC);
|
||||||
|
|
|
@ -33,7 +33,7 @@ class SoapServerBuilder extends AbstractSoapBuilder
|
||||||
*
|
*
|
||||||
* @return \BeSimple\SoapServer\SoapServerBuilder
|
* @return \BeSimple\SoapServer\SoapServerBuilder
|
||||||
*/
|
*/
|
||||||
static public function createWithDefaults()
|
public static function createWithDefaults()
|
||||||
{
|
{
|
||||||
return parent::createWithDefaults()
|
return parent::createWithDefaults()
|
||||||
->withErrorReporting(false);
|
->withErrorReporting(false);
|
||||||
|
|
|
@ -65,6 +65,5 @@ class XmlMimeFilter implements SoapResponseFilter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue