Cleaned unused method, property, variable or parameter
This commit is contained in:
parent
b45224587a
commit
8788d7595d
@ -48,8 +48,6 @@ class TypeRepository
|
||||
|
||||
public function fixTypeInformation(ServiceDefinition $definition)
|
||||
{
|
||||
$typeMap = $this->defaultTypeMap;
|
||||
|
||||
foreach($definition->getAllTypes() as $type) {
|
||||
$phpType = $type->getPhpType();
|
||||
$xmlType = $type->getXmlType();
|
||||
|
@ -84,7 +84,7 @@ class BeSimpleSoapExtension extends Extension
|
||||
|
||||
foreach ($config as $client => $options) {
|
||||
$definition = new DefinitionDecorator('besimple.soap.client.builder');
|
||||
$context = $container->setDefinition(sprintf('besimple.soap.client.builder.%s', $client), $definition);
|
||||
$container->setDefinition(sprintf('besimple.soap.client.builder.%s', $client), $definition);
|
||||
|
||||
$definition->replaceArgument(0, $options['wsdl']);
|
||||
|
||||
@ -118,7 +118,7 @@ class BeSimpleSoapExtension extends Extension
|
||||
private function createClientClassmap($client, array $classmap, ContainerBuilder $container)
|
||||
{
|
||||
$definition = new DefinitionDecorator('besimple.soap.classmap');
|
||||
$context = $container->setDefinition(sprintf('besimple.soap.classmap.%s', $client), $definition);
|
||||
$container->setDefinition(sprintf('besimple.soap.classmap.%s', $client), $definition);
|
||||
|
||||
$definition->setMethodCalls(array(
|
||||
array('set', array($classmap)),
|
||||
@ -130,7 +130,7 @@ class BeSimpleSoapExtension extends Extension
|
||||
private function createClient($client, ContainerBuilder $container)
|
||||
{
|
||||
$definition = new DefinitionDecorator('besimple.soap.client');
|
||||
$context = $container->setDefinition(sprintf('besimple.soap.client.%s', $client), $definition);
|
||||
$container->setDefinition(sprintf('besimple.soap.client.%s', $client), $definition);
|
||||
|
||||
$definition->setFactoryService(sprintf('besimple.soap.client.builder.%s', $client));
|
||||
}
|
||||
@ -142,7 +142,7 @@ class BeSimpleSoapExtension extends Extension
|
||||
|
||||
$contextId = 'besimple.soap.context.'.$config['name'];
|
||||
$definition = new DefinitionDecorator('besimple.soap.context.'.$bindingSuffix);
|
||||
$context = $container->setDefinition($contextId, $definition);
|
||||
$container->setDefinition($contextId, $definition);
|
||||
|
||||
if (isset($config['cache_type'])) {
|
||||
$config['cache_type'] = $this->getCacheType($config['cache_type']);
|
||||
|
@ -54,7 +54,6 @@ class RpcLiteralRequestMessageBinder implements MessageBinderInterface
|
||||
if ($type instanceof ArrayOfType) {
|
||||
$isArray = true;
|
||||
$array = array();
|
||||
$arrayType = $type;
|
||||
|
||||
$type = $this->typeRepository->getType($type->get('item')->getType());
|
||||
}
|
||||
|
@ -42,7 +42,6 @@ class RpcLiteralResponseMessageBinder implements MessageBinderInterface
|
||||
$type = $this->typeRepository->getType($phpType);
|
||||
if ($type instanceof ArrayOfType) {
|
||||
$isArray = true;
|
||||
$arrayType = $type;
|
||||
|
||||
$type = $this->typeRepository->getType($type->get('item')->getType());
|
||||
}
|
||||
|
@ -21,8 +21,6 @@ use BeSimple\SoapCommon\Definition\Type\TypeRepository;
|
||||
*/
|
||||
class Definition extends BaseDefinition
|
||||
{
|
||||
private $complexTypes;
|
||||
|
||||
public function __construct(TypeRepository $typeRepository)
|
||||
{
|
||||
$this->typeRepository = $typeRepository;
|
||||
|
@ -141,30 +141,6 @@ class AnnotationClassLoader extends Loader
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \ReflectionMethod $method
|
||||
* @param \BeSimple\SoapBundle\ServiceDefinition\Annotation\Param $annotation
|
||||
*
|
||||
* @return \BeSimple\SoapBundle\ServiceDefinition\Type
|
||||
*/
|
||||
private function getArgumentType(\ReflectionMethod $method, Annotation\Param $annotation)
|
||||
{
|
||||
$phpType = $annotation->getPhpType();
|
||||
$xmlType = $annotation->getXmlType();
|
||||
|
||||
if (null === $phpType) {
|
||||
foreach ($method->getParameters() as $param) {
|
||||
if ($param->name === $annotation->getName()) {
|
||||
$phpType = $param->getClass()->name;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new Definition\Type($phpType, $xmlType);
|
||||
}
|
||||
|
||||
private function loadType($phpType)
|
||||
{
|
||||
if (false !== $arrayOf = $this->typeRepository->getArrayOf($phpType)) {
|
||||
|
@ -61,7 +61,7 @@ class AnnotationFileLoader extends FileLoader
|
||||
$path = $this->locator->locate($file);
|
||||
|
||||
if ($class = $this->findClass($path)) {
|
||||
return $definition = $this->loader->load($class, $type);
|
||||
return $this->loader->load($class, $type);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
@ -26,8 +26,6 @@ use Symfony\Component\Config\Loader\LoaderInterface;
|
||||
*/
|
||||
class WebServiceContext
|
||||
{
|
||||
private $converterRepository;
|
||||
|
||||
private $options;
|
||||
|
||||
private $serviceDefinition;
|
||||
|
@ -90,7 +90,7 @@ class MimeFilter implements SoapRequestFilter, SoapResponseFilter
|
||||
|
||||
// TODO
|
||||
$headers = $multipart->getHeadersForHttp();
|
||||
list($name, $contentType) = explode(': ', $headers[0]);
|
||||
list(, $contentType) = explode(': ', $headers[0]);
|
||||
|
||||
$request->setContentType($contentType);
|
||||
}
|
||||
@ -135,4 +135,4 @@ class MimeFilter implements SoapRequestFilter, SoapResponseFilter
|
||||
$response->setAttachments($attachmentsRecieved);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -210,7 +210,7 @@ class WsSecurityFilter extends WsSecurityFilterClientServer implements SoapReque
|
||||
$referenceList = XmlSecurityEnc::createReferenceList($encryptedKey);
|
||||
// token reference to encrypted key
|
||||
$keyInfo = $this->createKeyInfo($filterHelper, self::TOKEN_REFERENCE_SECURITY_TOKEN, $guid);
|
||||
$nodes = $this->createNodeListForEncryption($dom, $security);
|
||||
$nodes = $this->createNodeListForEncryption($dom);
|
||||
foreach ($nodes as $node) {
|
||||
$type = XmlSecurityEnc::ELEMENT;
|
||||
if ($node->localName == 'Body') {
|
||||
|
@ -242,11 +242,10 @@ abstract class WsSecurityFilterClientServer
|
||||
* Create a list of \DOMNodes that should be encrypted.
|
||||
*
|
||||
* @param \DOMDocument $dom DOMDocument to query
|
||||
* @param \DOMElement $security Security element
|
||||
*
|
||||
* @return \DOMNodeList
|
||||
*/
|
||||
protected function createNodeListForEncryption(\DOMDocument $dom, \DOMElement $security)
|
||||
protected function createNodeListForEncryption(\DOMDocument $dom)
|
||||
{
|
||||
$xpath = new \DOMXPath($dom);
|
||||
$xpath->registerNamespace('SOAP-ENV', $dom->documentElement->namespaceURI);
|
||||
|
@ -174,7 +174,7 @@ class WsdlHandler
|
||||
return true;
|
||||
// type/* match
|
||||
} else {
|
||||
list($ctype, $csubtype) = explode('/', $currentMimeType);
|
||||
list($ctype) = explode('/', $currentMimeType);
|
||||
foreach ($mimeTypes as $mimeType) {
|
||||
list($type, $subtype) = explode('/', $mimeType);
|
||||
if ($subtype == '*' && $type == $ctype) {
|
||||
@ -202,4 +202,4 @@ class WsdlHandler
|
||||
$this->domXpath->registerNamespace('soap', $this->wsdlSoapNamespace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -130,9 +130,9 @@ class MimeFilter implements SoapRequestFilter, SoapResponseFilter
|
||||
|
||||
// TODO
|
||||
$headers = $multipart->getHeadersForHttp();
|
||||
list($name, $contentType) = explode(': ', $headers[0]);
|
||||
list(, $contentType) = explode(': ', $headers[0]);
|
||||
|
||||
$response->setContentType($contentType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -226,7 +226,7 @@ class WsSecurityFilter extends WsSecurityFilterClientServer implements SoapReque
|
||||
$referenceList = XmlSecurityEnc::createReferenceList($encryptedKey);
|
||||
// token reference to encrypted key
|
||||
$keyInfo = $this->createKeyInfo($filterHelper, self::TOKEN_REFERENCE_SECURITY_TOKEN, $guid);
|
||||
$nodes = $this->createNodeListForEncryption($dom, $security);
|
||||
$nodes = $this->createNodeListForEncryption($dom);
|
||||
foreach ($nodes as $node) {
|
||||
$type = XmlSecurityEnc::ELEMENT;
|
||||
if ($node->localName == 'Body') {
|
||||
|
Loading…
Reference in New Issue
Block a user