Completed
Push — soap-12 ( c22311...ee369f )
by Asmir
26:29
created

Fault   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 0
dl 0
loc 51
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A setException() 0 4 1
A getActor() 0 4 1
A getCode() 0 5 1
A getDescription() 0 4 1
A setActor() 0 4 1
1
<?php
2
3
namespace GoetasWebservices\SoapServices\SoapClient\SoapEnvelope\Parts;
4
5
/**
6
 * Class representing DoSomethingInput
7
 */
8
class Fault
9
{
10
    /**
11
     * @var string
12
     */
13
    private $actor;
14
    /**
15
     * @var \Exception
16
     */
17
    private $exception;
18
19
    public function setException(\Exception $exception)
20
    {
21
        $this->exception = $exception;
22
    }
23
24
    /**
25
     * @return string
26
     */
27
    public function getActor()
28
    {
29
        return $this->actor;
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getCode()
36
    {
37
        $ref = new \ReflectionObject($this->exception);
38
        return 'SOAP-ENV:' . str_replace('Exception', '', $ref->getShortName()); //$this->exception->getCode();
0 ignored issues
show
Unused Code Comprehensibility introduced by
75% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
39
    }
40
41
    /**
42
     * @return string
43
     */
44
    public function getDescription()
45
    {
46
        return $this->exception->getMessage();
47
    }
48
49
    /**
50
     * @param string $actor
51
     * @return Fault
52
     */
53
    public function setActor($actor)
54
    {
55
        $this->actor = $actor;
56
    }
57
58
}
59
60