Code Duplication    Length = 8-9 lines in 3 locations

Controller/PurchaseController.php 3 locations

@@ 149-156 (lines=8) @@
146
     *
147
     * @Method("GET")
148
     */
149
    public function cancelAction()
150
    {
151
        $templatesService = $this->get('newscoop.templates.service');
152
153
        return new Response($templatesService->fetchTemplate(
154
            '_paywall/cancel.tpl'
155
        ), 200, array('Content-Type' => 'text/html'));
156
    }
157
158
    /**
159
     * @Route("/paywall/thank-you/", name="paywall_plugin_purchase_thank_you", options={"expose"=true})
@@ 163-170 (lines=8) @@
160
     *
161
     * @Method("GET")
162
     */
163
    public function thankYouAction()
164
    {
165
        $templatesService = $this->get('newscoop.templates.service');
166
167
        return new Response($templatesService->fetchTemplate(
168
            '_paywall/thankyou.tpl'
169
        ), 200, array('Content-Type' => 'text/html'));
170
    }
171
172
    private function loadErrorTemplate($message = '')
173
    {
@@ 172-180 (lines=9) @@
169
        ), 200, array('Content-Type' => 'text/html'));
170
    }
171
172
    private function loadErrorTemplate($message = '')
173
    {
174
        $templatesService = $this->get('newscoop.templates.service');
175
176
        return new Response($templatesService->fetchTemplate(
177
            '_paywall/error.tpl',
178
            array('msg' => $message)
179
        ), 200, array('Content-Type' => 'text/html'));
180
    }
181
182
    private function redirectToThankYou()
183
    {