Code Duplication    Length = 8-9 lines in 3 locations

Controller/PurchaseController.php 3 locations

@@ 136-143 (lines=8) @@
133
     *
134
     * @Method("GET")
135
     */
136
    public function cancelAction()
137
    {
138
        $templatesService = $this->get('newscoop.templates.service');
139
140
        return new Response($templatesService->fetchTemplate(
141
            '_paywall/cancel.tpl'
142
        ), 200, array('Content-Type' => 'text/html'));
143
    }
144
145
    /**
146
     * @Route("/paywall/thank-you/", name="paywall_plugin_purchase_thank_you", options={"expose"=true})
@@ 150-157 (lines=8) @@
147
     *
148
     * @Method("GET")
149
     */
150
    public function thankYouAction()
151
    {
152
        $templatesService = $this->get('newscoop.templates.service');
153
154
        return new Response($templatesService->fetchTemplate(
155
            '_paywall/thankyou.tpl'
156
        ), 200, array('Content-Type' => 'text/html'));
157
    }
158
159
    private function loadErrorTemplate($message = '')
160
    {
@@ 159-167 (lines=9) @@
156
        ), 200, array('Content-Type' => 'text/html'));
157
    }
158
159
    private function loadErrorTemplate($message = '')
160
    {
161
        $templatesService = $this->get('newscoop.templates.service');
162
163
        return new Response($templatesService->fetchTemplate(
164
            '_paywall/error.tpl',
165
            array('msg' => $message)
166
        ), 200, array('Content-Type' => 'text/html'));
167
    }
168
169
    private function redirectToThankYou()
170
    {