Code Duplication    Length = 10-10 lines in 2 locations

src/AppBundle/Controller/VariableController.php 1 location

@@ 97-106 (lines=10) @@
94
        );
95
    }
96
97
    public function sendResponse($success, array $resp)
98
    {
99
        $response = new Response();
100
        $response->setContent(json_encode(array(
101
            'result' => $success ? 'ok' : 'fail',
102
            'response'=> $resp,
103
        )));
104
        $response->headers->set('Content-Type', 'application/json');
105
        return $response;
106
    }
107
}
108

src/AppBundle/Controller/NooliteController.php 1 location

@@ 173-182 (lines=10) @@
170
     * @param array $resp
171
     * @return Response
172
     */
173
    public function sendResponse($success, array $resp)
174
    {
175
        $response = new Response();
176
        $response->setContent(json_encode(array(
177
            'result' => $success ? 'ok' : 'fail',
178
            'response'=> $resp,
179
        )));
180
        $response->headers->set('Content-Type', 'application/json');
181
        return $response;
182
    }
183
}
184