1
|
|
|
<?php |
2
|
|
|
/* |
3
|
|
|
* Copyright (C) 2022 Joe Nilson <[email protected]> |
4
|
|
|
* |
5
|
|
|
* This program is free software: you can redistribute it and/or modify |
6
|
|
|
* it under the terms of the GNU Lesser General Public License as |
7
|
|
|
* published by the Free Software Foundation, either version 3 of the |
8
|
|
|
* License, or (at your option) any later version. |
9
|
|
|
* |
10
|
|
|
* This program is distributed in the hope that it will be useful, |
11
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
12
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13
|
|
|
* GNU Lesser General Public License for more details. |
14
|
|
|
* You should have received a copy of the GNU Lesser General Public License |
15
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
16
|
|
|
*/ |
17
|
|
|
|
18
|
|
|
namespace FacturaScripts\Plugins\fsRepublicaDominicana\Lib\Export; |
19
|
|
|
|
20
|
|
|
use Symfony\Component\HttpFoundation\Response; |
|
|
|
|
21
|
|
|
use FacturaScripts\Dinamic\Lib\Export\ExportBase; |
|
|
|
|
22
|
|
|
|
23
|
|
|
class DgiiExport extends ExportBase |
24
|
|
|
{ |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* @inheritDoc |
28
|
|
|
*/ |
29
|
|
|
public function addBusinessDocPage($model): bool |
30
|
|
|
{ |
31
|
|
|
return false; |
32
|
|
|
} |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @inheritDoc |
36
|
|
|
*/ |
37
|
|
|
public function addListModelPage($model, $where, $order, $offset, $columns, $title = ''): bool |
38
|
|
|
{ |
39
|
|
|
return true; |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @inheritDoc |
44
|
|
|
*/ |
45
|
|
|
public function addModelPage($model, $columns, $title = ''): bool |
46
|
|
|
{ |
47
|
|
|
return true; |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @inheritDoc |
52
|
|
|
*/ |
53
|
|
|
public function addTablePage($headers, $rows, $options = [], $title = ''): bool |
54
|
|
|
{ |
55
|
|
|
return true; |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @inheritDoc |
60
|
|
|
*/ |
61
|
|
|
public function getDoc() |
62
|
|
|
{ |
63
|
|
|
return ''; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @inheritDoc |
68
|
|
|
*/ |
69
|
|
|
public function newDoc(string $title, int $idformat, string $langcode) |
70
|
|
|
{ |
71
|
|
|
// TODO: Implement newDoc() method. |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @inheritDoc |
76
|
|
|
*/ |
77
|
|
|
public function setOrientation(string $orientation) |
78
|
|
|
{ |
79
|
|
|
// TODO: Implement setOrientation() method. |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @inheritDoc |
84
|
|
|
*/ |
85
|
|
|
public function show(Response &$response) |
86
|
|
|
{ |
87
|
|
|
$response->headers->set('Content-Type', 'text/text; charset=utf-8'); |
88
|
|
|
$response->headers->set('Content-Disposition', 'attachment;filename=' . $this->getFileName() . '.txt'); |
89
|
|
|
$response->setContent($this->getDoc()); |
90
|
|
|
} |
91
|
|
|
} |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths