Cleaned unused method, property, variable or parameter

This commit is contained in:
Francis Besset 2013-12-02 16:02:29 +01:00
parent b45224587a
commit 8788d7595d
14 changed files with 14 additions and 47 deletions

View File

@ -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();

View File

@ -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']);

View File

@ -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());
}

View File

@ -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());
}

View File

@ -21,8 +21,6 @@ use BeSimple\SoapCommon\Definition\Type\TypeRepository;
*/
class Definition extends BaseDefinition
{
private $complexTypes;
public function __construct(TypeRepository $typeRepository)
{
$this->typeRepository = $typeRepository;

View File

@ -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)) {

View File

@ -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;

View File

@ -26,8 +26,6 @@ use Symfony\Component\Config\Loader\LoaderInterface;
*/
class WebServiceContext
{
private $converterRepository;
private $options;
private $serviceDefinition;

View File

@ -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);
}

View File

@ -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') {

View File

@ -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);

View File

@ -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) {

View File

@ -130,7 +130,7 @@ class MimeFilter implements SoapRequestFilter, SoapResponseFilter
// TODO
$headers = $multipart->getHeadersForHttp();
list($name, $contentType) = explode(': ', $headers[0]);
list(, $contentType) = explode(': ', $headers[0]);
$response->setContentType($contentType);
}

View File

@ -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') {