Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 53 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
| IntegrationStockOutputDTO | |
0.00% |
0 / 53 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 25 |
|
0.00% |
0 / 1 |
2 | |||
| toArray | |
0.00% |
0 / 27 |
|
0.00% |
0 / 1 |
2 | |||
| fromRequest | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace Domain\Integration\DTOs; |
| 4 | |
| 5 | use Domain\Shared\Interfaces\DataTransferObjectInterface; |
| 6 | use Illuminate\Foundation\Http\FormRequest; |
| 7 | |
| 8 | class IntegrationStockOutputDTO implements DataTransferObjectInterface |
| 9 | { |
| 10 | public string $CODEMP; |
| 11 | public string $CODFIL; |
| 12 | public string $NUMPFA; |
| 13 | public string $NUMANE; |
| 14 | public ?string $CODCLI; |
| 15 | public ?string $NOMCLI; |
| 16 | public ?string $CGCCPF; |
| 17 | public ?string $CIDCLI; |
| 18 | public ?string $BAICLI; |
| 19 | public ?string $SIGUFS; |
| 20 | public ?string $CEPCLI; |
| 21 | public ?string $CODCPG; |
| 22 | public ?string $DESCPG; |
| 23 | public ?string $CODFPG; |
| 24 | public ?string $DESFPG; |
| 25 | public ?string $CODTRA; |
| 26 | public ?string $NOMTRA; |
| 27 | public ?string $PESBRU; |
| 28 | public ?string $PESLIQ; |
| 29 | public ?string $VOLPFA; |
| 30 | public ?string $SITPFA; |
| 31 | public ?string $SEPLIB; |
| 32 | public ?string $PRVFAT; |
| 33 | public ?string $CIFFOB; |
| 34 | public ?string $VLRPFA; |
| 35 | |
| 36 | public function __construct(array $args) |
| 37 | { |
| 38 | $this->CODEMP = $args['E135ANE_CODEMP']; |
| 39 | $this->CODFIL = $args['E135ANE_CODFIL']; |
| 40 | $this->NUMPFA = $args['E135PFA_NUMPFA']; |
| 41 | $this->NUMANE = $args['E135ANE_NUMANE']; |
| 42 | $this->CODCLI = $args['E135PFA_CODCLI'] ?? null; |
| 43 | $this->NOMCLI = $args['E085CLI_NOMCLI'] ?? null; |
| 44 | $this->CGCCPF = $args['E085CLI_CGCCPF'] ?? null; |
| 45 | $this->CIDCLI = $args['E085CLI_CIDCLI'] ?? null; |
| 46 | $this->BAICLI = $args['E085CLI_BAICLI'] ?? null; |
| 47 | $this->SIGUFS = $args['E085CLI_SIGUFS'] ?? null; |
| 48 | $this->CEPCLI = $args['E085CLI_CEPCLI'] ?? null; |
| 49 | $this->CODCPG = $args['E028CPG_CODCPG'] ?? null; |
| 50 | $this->DESCPG = $args['E028CPG_DESCPG'] ?? null; |
| 51 | $this->CODFPG = $args['E066FPG_CODFPG'] ?? null; |
| 52 | $this->DESFPG = $args['E066FPG_DESFPG'] ?? null; |
| 53 | $this->CODTRA = $args['E135PFA_CODTRA'] ?? null; |
| 54 | $this->NOMTRA = $args['E073TRA_NOMTRA'] ?? null; |
| 55 | $this->PESBRU = $args['E135PFA_PESBRU'] ?? null; |
| 56 | $this->PESLIQ = $args['E135PFA_PESLIQ'] ?? null; |
| 57 | $this->VOLPFA = $args['E135PFA_VOLPFA'] ?? null; |
| 58 | $this->SITPFA = $args['E135PFA_SITPFA'] ?? null; |
| 59 | $this->CIFFOB = $args['E135PFA_CIFFOB'] ?? null; |
| 60 | $this->VLRPFA = $args['E135PFA_VLRPFA'] ?? null; |
| 61 | $this->SEPLIB = $args['E135PFA_SEPLIB'] ?? null; |
| 62 | $this->PRVFAT = $args['E135PFA_PRVFAT'] ?? null; |
| 63 | } |
| 64 | |
| 65 | public function toArray(): array |
| 66 | { |
| 67 | return [ |
| 68 | 'CODEMP' => $this->CODEMP, |
| 69 | 'CODFIL' => $this->CODFIL, |
| 70 | 'NUMPFA' => $this->NUMPFA, |
| 71 | 'NUMANE' => $this->NUMANE, |
| 72 | 'CODCLI' => $this->CODCLI, |
| 73 | 'NOMCLI' => $this->NOMCLI, |
| 74 | 'CGCCPF' => $this->CGCCPF, |
| 75 | 'CIDCLI' => $this->CIDCLI, |
| 76 | 'BAICLI' => $this->BAICLI, |
| 77 | 'SIGUFS' => $this->SIGUFS, |
| 78 | 'CEPCLI' => $this->CEPCLI, |
| 79 | 'CODCPG' => $this->CODCPG, |
| 80 | 'DESCPG' => $this->DESCPG, |
| 81 | 'CODFPG' => $this->CODFPG, |
| 82 | 'DESFPG' => $this->DESFPG, |
| 83 | 'CODTRA' => $this->CODTRA, |
| 84 | 'NOMTRA' => $this->NOMTRA, |
| 85 | 'PESBRU' => $this->PESBRU, |
| 86 | 'PESLIQ' => $this->PESLIQ, |
| 87 | 'VOLPFA' => $this->VOLPFA, |
| 88 | 'SITPFA' => $this->SITPFA, |
| 89 | 'SEPLIB' => $this->SEPLIB, |
| 90 | 'PRVFAT' => $this->PRVFAT, |
| 91 | 'CIFFOB' => $this->CIFFOB, |
| 92 | 'VLRPFA' => $this->VLRPFA, |
| 93 | ]; |
| 94 | } |
| 95 | |
| 96 | public static function fromRequest(FormRequest $request): IntegrationStockOutputDTO |
| 97 | { |
| 98 | return new self($request->validated()); |
| 99 | } |
| 100 | } |