Psalm cleanup

This commit is contained in:
David Bomba 2022-08-16 09:39:12 +10:00
parent f014ced0d5
commit f45d7f2897
8 changed files with 14 additions and 10 deletions

View File

@ -50,10 +50,8 @@ class Design extends BaseDesign
/** Construct options */ /** Construct options */
public $options; public $options;
/** @var Invoice[] */
public $invoices; public $invoices;
/** @var Payment[] */
public $payments; public $payments;
public $settings_object; public $settings_object;

View File

@ -80,7 +80,6 @@ class ConvertQuote
/** /**
* Only create the invitations that are defined on the quote. * Only create the invitations that are defined on the quote.
* *
* @return Invoice $invoice
*/ */
private function createConversionInvitations($invoice, $quote) private function createConversionInvitations($invoice, $quote)
{ {

View File

@ -129,7 +129,8 @@ class QuoteService
/** /**
* Sometimes we need to refresh the * Sometimes we need to refresh the
* PDF when it is updated etc. * PDF when it is updated etc.
* @return InvoiceService *
* @return QuoteService
*/ */
public function touchPdf($force = false) public function touchPdf($force = false)
{ {

View File

@ -840,7 +840,6 @@ class SubscriptionService
* Get the single charge products for the * Get the single charge products for the
* subscription * subscription
* *
* @return ?Product Collection
*/ */
public function products() public function products()
{ {
@ -859,7 +858,6 @@ class SubscriptionService
* Get the recurring products for the * Get the recurring products for the
* subscription * subscription
* *
* @return ?Product Collection
*/ */
public function recurring_products() public function recurring_products()
{ {

View File

@ -42,8 +42,8 @@ class CompanyUserTransformer extends EntityTransformer
return [ return [
'permissions' => $company_user->permissions ?: '', 'permissions' => $company_user->permissions ?: '',
'notifications' => (object) $company_user->notifications ?: $blank_obj, 'notifications' => $company_user->notifications ? (object) $company_user->notifications : $blank_obj,
'settings' => (object) $company_user->settings ?: $blank_obj, 'settings' => $company_user->settings ? (object) $company_user->settings : $blank_obj,
'is_owner' => (bool) $company_user->is_owner, 'is_owner' => (bool) $company_user->is_owner,
'is_admin' => (bool) $company_user->is_admin, 'is_admin' => (bool) $company_user->is_admin,
'is_locked' => (bool) $company_user->is_locked, 'is_locked' => (bool) $company_user->is_locked,

View File

@ -80,7 +80,6 @@ class CreditTransformer extends EntityTransformer
'amount' => (float) $credit->amount, 'amount' => (float) $credit->amount,
'balance' => (float) $credit->balance, 'balance' => (float) $credit->balance,
'client_id' => (string) $this->encodePrimaryKey($credit->client_id), 'client_id' => (string) $this->encodePrimaryKey($credit->client_id),
'vendor_id' => (string) $this->encodePrimaryKey($credit->vendor_id),
'status_id' => (string) ($credit->status_id ?: 1), 'status_id' => (string) ($credit->status_id ?: 1),
'design_id' => (string) $this->encodePrimaryKey($credit->design_id), 'design_id' => (string) $this->encodePrimaryKey($credit->design_id),
'created_at' => (int) $credit->created_at, 'created_at' => (int) $credit->created_at,

View File

@ -137,7 +137,6 @@ class RecurringInvoiceTransformer extends EntityTransformer
'due_date_days' => (string) $invoice->due_date_days ?: '', 'due_date_days' => (string) $invoice->due_date_days ?: '',
'paid_to_date' => (float) $invoice->paid_to_date, 'paid_to_date' => (float) $invoice->paid_to_date,
'subscription_id' => (string) $this->encodePrimaryKey($invoice->subscription_id), 'subscription_id' => (string) $this->encodePrimaryKey($invoice->subscription_id),
'recurring_dates' => (array) [],
]; ];
if (request()->has('show_dates') && request()->query('show_dates') == 'true') { if (request()->has('show_dates') && request()->query('show_dates') == 'true') {

View File

@ -57,6 +57,16 @@
<directory name="app" /> <directory name="app" />
</errorLevel> </errorLevel>
</UndefinedMagicPropertyFetch> </UndefinedMagicPropertyFetch>
<TooManyArguments>
<errorLevel type="suppress">
<directory name="app" />
</errorLevel>
</TooManyArguments>
<RedundantCast>
<errorLevel type="suppress">
<directory name="app" />
</errorLevel>
</RedundantCast>
<InvalidNullableReturnType> <InvalidNullableReturnType>
<errorLevel type="suppress"> <errorLevel type="suppress">
<directory name="app" /> <directory name="app" />