Remove duplicate 'type_id' from PaymentTransformer.php (#3466)

This commit is contained in:
Benjamin Beganović 2020-03-10 12:50:06 +01:00 committed by GitHub
parent efa6350008
commit 35b2e9b5e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,12 +11,10 @@
namespace App\Transformers; namespace App\Transformers;
use App\Models\Account;
use App\Models\Client; use App\Models\Client;
use App\Models\Invoice; use App\Models\Invoice;
use App\Models\Payment; use App\Models\Payment;
use App\Models\Paymentable; use App\Models\Paymentable;
use App\Transformers\PaymentableTransformer;
use App\Utils\Traits\MakesHash; use App\Utils\Traits\MakesHash;
class PaymentTransformer extends EntityTransformer class PaymentTransformer extends EntityTransformer
@ -35,6 +33,8 @@ class PaymentTransformer extends EntityTransformer
public function __construct($serializer = null) public function __construct($serializer = null)
{ {
parent::__construct();
$this->serializer = $serializer; $this->serializer = $serializer;
} }
@ -88,7 +88,6 @@ class PaymentTransformer extends EntityTransformer
'client_contact_id' => (string) $this->encodePrimaryKey($payment->client_contact_id), 'client_contact_id' => (string) $this->encodePrimaryKey($payment->client_contact_id),
'company_gateway_id' => (string) $this->encodePrimaryKey($payment->company_gateway_id), 'company_gateway_id' => (string) $this->encodePrimaryKey($payment->company_gateway_id),
'status_id'=> (string) $payment->status_id, 'status_id'=> (string) $payment->status_id,
'type_id'=> (string) $payment->type_id,
'project_id' => (string) $this->encodePrimaryKey($payment->project_id), 'project_id' => (string) $this->encodePrimaryKey($payment->project_id),
'vendor_id' => (string) $this->encodePrimaryKey($payment->vendor_id), 'vendor_id' => (string) $this->encodePrimaryKey($payment->vendor_id),
'currency_id' => (string) $payment->currency_id ?: '', 'currency_id' => (string) $payment->currency_id ?: '',