Passed
Push — ref ( 45b89b )
by Asmir
02:50
created

FaultHandler::deserializeFaultDetail()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 4
1
<?php
2
3
namespace GoetasWebservices\SoapServices\Metadata\Arguments\Headers\Handler;
4
5
use JMS\Serializer\DeserializationContext;
6
use JMS\Serializer\GraphNavigator;
7
use JMS\Serializer\Handler\SubscribingHandlerInterface;
8
use JMS\Serializer\XmlDeserializationVisitor;
9
10
class FaultHandler implements SubscribingHandlerInterface
11
{
12
    public static function getSubscribingMethods()
13
    {
14
        return array(
15
            array(
16
                'direction' => GraphNavigator::DIRECTION_DESERIALIZATION,
17
                'format' => 'xml',
18
                'type' => 'GoetasWebservices\SoapServices\Metadata\Arguments\Headers\Handler\RawFaultDetail',
19
                'method' => 'deserializeFaultDetail'
20
            ),
21
        );
22
    }
23
24
    public function deserializeFaultDetail(XmlDeserializationVisitor $visitor, \SimpleXMLElement $data, array $type, DeserializationContext $context)
0 ignored issues
show
Unused Code introduced by
The parameter $type is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

24
    public function deserializeFaultDetail(XmlDeserializationVisitor $visitor, \SimpleXMLElement $data, /** @scrutinizer ignore-unused */ array $type, DeserializationContext $context)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $visitor is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

24
    public function deserializeFaultDetail(/** @scrutinizer ignore-unused */ XmlDeserializationVisitor $visitor, \SimpleXMLElement $data, array $type, DeserializationContext $context)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $context is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

24
    public function deserializeFaultDetail(XmlDeserializationVisitor $visitor, \SimpleXMLElement $data, array $type, /** @scrutinizer ignore-unused */ DeserializationContext $context)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
25
    {
26
        return $data->children();
27
    }
28
}
29
30
31