Passed
Push — master ( 2944ee...dfe2d2 )
by Asmir
02:04
created

FaultHandler   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 7
c 1
b 0
f 0
dl 0
loc 17
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSubscribingMethods() 0 8 1
A deserializeFaultDetail() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GoetasWebservices\SoapServices\Metadata\Arguments\Headers\Handler;
6
7
use JMS\Serializer\DeserializationContext;
8
use JMS\Serializer\GraphNavigator;
9
use JMS\Serializer\Handler\SubscribingHandlerInterface;
10
use JMS\Serializer\XmlDeserializationVisitor;
11
12
class FaultHandler implements SubscribingHandlerInterface
13
{
14
    public static function getSubscribingMethods(): array
15
    {
16
        return [
17
            [
18
                'direction' => GraphNavigator::DIRECTION_DESERIALIZATION,
19
                'format' => 'xml',
20
                'type' => 'GoetasWebservices\SoapServices\Metadata\Arguments\Headers\Handler\RawFaultDetail',
21
                'method' => 'deserializeFaultDetail',
22
            ],
23
        ];
24
    }
25
26
    public function deserializeFaultDetail(XmlDeserializationVisitor $visitor, \SimpleXMLElement $data, array $type, DeserializationContext $context): \SimpleXMLElement
0 ignored issues
show
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

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

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 $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

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

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

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

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...
27
    {
28
        return $data->children();
29
    }
30
}
31