mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 06:24:35 -04:00
Psalm cleanup
This commit is contained in:
parent
f014ced0d5
commit
f45d7f2897
@ -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;
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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()
|
||||||
{
|
{
|
||||||
|
@ -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,
|
||||||
|
@ -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,
|
||||||
|
@ -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') {
|
||||||
|
10
psalm.xml
10
psalm.xml
@ -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" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user