Code Duplication    Length = 4-7 lines in 2 locations

src/library/ThreemaGateway/Handler/Action/Callback.php 2 locations

@@ 135-141 (lines=7) @@
132
            return false;
133
        }
134
135
        if (!$this->getCryptTool()->stringCompare(
136
            $options->threema_gateway_receivecallback,
137
            $this->filtered['accesstoken']
138
        )) {
139
            $errorString = [null, 'Unverified request: access token invalid', 'Unverified request'];
140
            return false;
141
        }
142
143
        // HMAC validation (verifies integrity of request)
144
        if (!$this->getE2EHelper()->checkMac(
@@ 180-183 (lines=4) @@
177
    public function validateFormalities(&$errorString)
178
    {
179
        // simple, formal validation of Gateway ID
180
        if (!$this->getCryptTool()->stringCompare($this->filtered['to'], $this->settings->getId())) {
181
            $errorString = [null, 'Invalid request: formal verification failed', 'Invalid request'];
182
            return false;
183
        }
184
185
        /** @var XenForo_Options $options */
186
        $options   = XenForo_Application::getOptions();