Code Duplication    Length = 10-10 lines in 2 locations

src/controllers/PurseController.php 2 locations

@@ 56-65 (lines=10) @@
53
        ];
54
    }
55
56
    public function actionGenerateInvoice($id, $month = null)
57
    {
58
        $content_type = 'application/pdf';
59
        $data = Purse::perform('generate-monthly-invoice', compact('id', 'month'));
60
        $response = Yii::$app->getResponse();
61
        $response->format = $response::FORMAT_RAW;
62
        $response->getHeaders()->add('content-type', $content_type);
63
64
        return $data;
65
    }
66
67
    public function actionGenerateMonthlyDocument($id, $type, $month = null)
68
    {
@@ 67-76 (lines=10) @@
64
        return $data;
65
    }
66
67
    public function actionGenerateMonthlyDocument($id, $type, $month = null)
68
    {
69
        $content_type = 'application/pdf';
70
        $data = Purse::perform('generate-monthly-document', compact('id', 'type', 'month'));
71
        $response = Yii::$app->getResponse();
72
        $response->format = $response::FORMAT_RAW;
73
        $response->getHeaders()->add('content-type', $content_type);
74
75
        return $data;
76
    }
77
}
78