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 */
public $options;
/** @var Invoice[] */
public $invoices;
/** @var Payment[] */
public $payments;
public $settings_object;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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