Code Duplication    Length = 9-10 lines in 2 locations

src/SnifferReport/Response/SnifferErrorResponse.php 1 location

@@ 18-26 (lines=9) @@
15
     * @param string $message
16
     * @param int $code
17
     */
18
    public function __construct($message, $code = 500)
19
    {
20
        $data = [
21
            'status' => 'error',
22
            'code' => $code,
23
            'message' => $message,
24
        ];
25
        parent::__construct(json_encode($data), $code, [], true);
26
    }
27
}
28

src/SnifferReport/Response/SnifferSuccessResponse.php 1 location

@@ 18-27 (lines=10) @@
15
     * @param Sniff $sniff
16
     * @param int $code
17
     */
18
    public function __construct(Sniff $sniff, $code = 200)
19
    {
20
        $data = [
21
            'status' => 'success',
22
            'code' => $code,
23
            'sniff' => $sniff,
24
        ];
25
        parent::__construct(json_encode($data), $code, [], true);
26
    }
27
}
28