Code Duplication    Length = 8-11 lines in 3 locations

src/Validation/UidSignatureValidator.php 3 locations

@@ 52-59 (lines=8) @@
49
     *
50
     * @return bool
51
     */
52
    public function canValidate(ResponseInterface $response)
53
    {
54
        $data = $response->getData();
55
56
        return ($data->has('UID') &&
57
            $data->has('UIDSignature') &&
58
            $data->has('signatureTimestamp'));
59
    }
60
61
    /**
62
     * Throws exceptions if any errors are found.
@@ 68-77 (lines=10) @@
65
     *
66
     * @return bool
67
     */
68
    public function validate(ResponseInterface $response)
69
    {
70
        $data = $response->getData();
71
72
        return $this->validateUid(
73
            $data->get('UID'),
74
            $data->get('signatureTimestamp'),
75
            $data->get('UIDSignature')
76
        );
77
    }
78
79
    /**
80
     * @param ResponseInterface $response
@@ 87-97 (lines=11) @@
84
     *
85
     * @return void
86
     */
87
    public function assert(ResponseInterface $response)
88
    {
89
        $data = $response->getData();
90
91
        $this->assertUid(
92
            $data->get('UID'),
93
            $data->get('signatureTimestamp'),
94
            $data->get('UIDSignature'),
95
            $response
96
        );
97
    }
98
99
    /**
100
     * Validate the provided Uid signature is valid.