Issues (50)

src/Http/Resources/InvoiceResource.php (21 issues)

1
<?php
2
3
declare(strict_types=1);
4
5
namespace Squareetlabs\VeriFactu\Http\Resources;
6
7
use Illuminate\Http\Resources\Json\JsonResource;
8
9
class InvoiceResource extends JsonResource
10
{
11
    public function toArray($request): array
12
    {
13
        return [
14
            'id' => $this->id,
0 ignored issues
show
Bug Best Practice introduced by
The property id does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
15
            'uuid' => $this->uuid,
0 ignored issues
show
Bug Best Practice introduced by
The property uuid does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
16
            'number' => $this->number,
0 ignored issues
show
Bug Best Practice introduced by
The property number does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
17
            'date' => $this->date?->format('Y-m-d'),
0 ignored issues
show
Bug Best Practice introduced by
The property date does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
18
            'customer_name' => $this->customer_name,
0 ignored issues
show
Bug Best Practice introduced by
The property customer_name does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
19
            'customer_tax_id' => $this->customer_tax_id,
0 ignored issues
show
Bug Best Practice introduced by
The property customer_tax_id does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
20
            'customer_country' => $this->customer_country,
0 ignored issues
show
Bug Best Practice introduced by
The property customer_country does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
21
            'issuer_name' => $this->issuer_name,
0 ignored issues
show
Bug Best Practice introduced by
The property issuer_name does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
22
            'issuer_tax_id' => $this->issuer_tax_id,
0 ignored issues
show
Bug Best Practice introduced by
The property issuer_tax_id does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
23
            'issuer_country' => $this->issuer_country,
0 ignored issues
show
Bug Best Practice introduced by
The property issuer_country does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
24
            'amount' => $this->amount,
0 ignored issues
show
Bug Best Practice introduced by
The property amount does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
25
            'tax' => $this->tax,
0 ignored issues
show
Bug Best Practice introduced by
The property tax does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
26
            'total' => $this->total,
0 ignored issues
show
Bug Best Practice introduced by
The property total does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
27
            'type' => $this->type,
0 ignored issues
show
Bug Best Practice introduced by
The property type does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
28
            'external_reference' => $this->external_reference,
0 ignored issues
show
Bug Best Practice introduced by
The property external_reference does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
29
            'description' => $this->description,
0 ignored issues
show
Bug Best Practice introduced by
The property description does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
30
            'status' => $this->status,
0 ignored issues
show
Bug Best Practice introduced by
The property status does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
31
            'issued_at' => $this->issued_at?->toIso8601String(),
0 ignored issues
show
Bug Best Practice introduced by
The property issued_at does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
32
            'cancelled_at' => $this->cancelled_at?->toIso8601String(),
0 ignored issues
show
Bug Best Practice introduced by
The property cancelled_at does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
33
            'created_at' => $this->created_at?->toIso8601String(),
0 ignored issues
show
Bug Best Practice introduced by
The property created_at does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
34
            'updated_at' => $this->updated_at?->toIso8601String(),
0 ignored issues
show
Bug Best Practice introduced by
The property updated_at does not exist on Squareetlabs\VeriFactu\H...sources\InvoiceResource. Since you implemented __get, consider adding a @property annotation.
Loading history...
35
            'breakdowns' => BreakdownResource::collection($this->whenLoaded('breakdowns')),
36
            'recipients' => RecipientResource::collection($this->whenLoaded('recipients')),
37
        ];
38
    }
39
}