Code Duplication    Length = 33-35 lines in 3 locations

src/Mailgun/Resource/Api/Domain/CreateCredentialResponse.php 1 location

@@ 17-49 (lines=33) @@
14
/**
15
 * @author Tobias Nyholm <[email protected]>
16
 */
17
final class CreateCredentialResponse implements ApiResponse
18
{
19
    /**
20
     * @var string
21
     */
22
    private $message;
23
24
    /**
25
     * @param string $message
26
     */
27
    private function __construct($message)
28
    {
29
        $this->message = $message;
30
    }
31
32
    /**
33
     * @param array $data
34
     *
35
     * @return self
36
     */
37
    public static function create(array $data)
38
    {
39
        return new self(isset($data['message']) ? $data['message'] : null);
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getMessage()
46
    {
47
        return $this->message;
48
    }
49
}
50

src/Mailgun/Resource/Api/Domain/UpdateCredentialResponse.php 1 location

@@ 17-49 (lines=33) @@
14
/**
15
 * @author Tobias Nyholm <[email protected]>
16
 */
17
final class UpdateCredentialResponse implements ApiResponse
18
{
19
    /**
20
     * @var string
21
     */
22
    private $message;
23
24
    /**
25
     * @param string $message
26
     */
27
    private function __construct($message)
28
    {
29
        $this->message = $message;
30
    }
31
32
    /**
33
     * @param array $data
34
     *
35
     * @return self
36
     */
37
    public static function create(array $data)
38
    {
39
        return new self(isset($data['message']) ? $data['message'] : null);
40
    }
41
42
    /**
43
     * @return string
44
     */
45
    public function getMessage()
46
    {
47
        return $this->message;
48
    }
49
}
50

src/Mailgun/Resource/Api/Routes/Response/UpdateResponse.php 1 location

@@ 17-51 (lines=35) @@
14
/**
15
 * @author David Garcia <[email protected]>
16
 */
17
final class UpdateResponse implements ApiResponse
18
{
19
    /**
20
     * @var string
21
     */
22
    private $message;
23
24
    /**
25
     * @param array $data
26
     *
27
     * @return self
28
     */
29
    public static function create(array $data)
30
    {
31
        return new self(
32
            isset($data['message']) ? $data['message'] : null
33
        );
34
    }
35
36
    /**
37
     * @param string $message
38
     */
39
    private function __construct($message)
40
    {
41
        $this->message = $message;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getMessage()
48
    {
49
        return $this->message;
50
    }
51
}
52