mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 10:54:34 -04:00
Fixes for static analysis
This commit is contained in:
parent
320f0242d0
commit
e1587d7920
@ -154,7 +154,7 @@ class CheckData extends Command
|
|||||||
->subject('Check-Data: '.strtoupper($this->isValid ? Account::RESULT_SUCCESS : Account::RESULT_FAILURE)." [{$database}]");
|
->subject('Check-Data: '.strtoupper($this->isValid ? Account::RESULT_SUCCESS : Account::RESULT_FAILURE)." [{$database}]");
|
||||||
});
|
});
|
||||||
} elseif (! $this->isValid) {
|
} elseif (! $this->isValid) {
|
||||||
new Exception("Check data failed!!\n".$this->log);
|
new \Exception("Check data failed!!".$this->log);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,8 +47,11 @@ use Illuminate\Database\Eloquent\ModelNotFoundException as ModelNotFoundExceptio
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel count()
|
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel count()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel create()
|
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel create()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel insert()
|
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel insert()
|
||||||
|
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel service()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel whereHas()
|
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel whereHas()
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel withTrashed()
|
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel withTrashed()
|
||||||
|
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\InvoiceInvitation | \App\Models\CreditInvitation | \App\Models\QuoteInvitation | \App\Models\RecurringInvoiceInvitation> $invitations
|
||||||
|
* @property-read int|null $invitations_count
|
||||||
*
|
*
|
||||||
* @method \App\Models\Company company()
|
* @method \App\Models\Company company()
|
||||||
* @method int companyId()
|
* @method int companyId()
|
||||||
|
@ -175,26 +175,7 @@ use Laracasts\Presenter\PresentableTrait;
|
|||||||
* @method static \Illuminate\Database\Eloquent\Builder|Client whereTaxData($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|Client whereTaxData($value)
|
||||||
* @property int $is_tax_exempt
|
* @property int $is_tax_exempt
|
||||||
* @method static \Illuminate\Database\Eloquent\Builder|Client whereIsTaxExempt($value)
|
* @method static \Illuminate\Database\Eloquent\Builder|Client whereIsTaxExempt($value)
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Activity> $activities
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $company_ledger
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $contacts
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Credit> $credits
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Document> $documents
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Expense> $expenses
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\GroupSetting> $group_settings
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientGatewayToken> $gateway_tokens
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Invoice> $invoices
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $ledger
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Payment> $payments
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $primary_contact
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Project> $projects
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Quote> $quotes
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringExpense> $recurring_expenses
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoice> $recurring_invoices
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\SystemLog> $system_logs
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Task> $tasks
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\CompanyLedger> $company_ledger
|
|
||||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ClientContact> $contacts
|
|
||||||
* @property int $has_valid_vat_number
|
* @property int $has_valid_vat_number
|
||||||
* @mixin \Eloquent
|
* @mixin \Eloquent
|
||||||
*/
|
*/
|
||||||
|
@ -212,29 +212,29 @@ class Company extends BaseModel
|
|||||||
use AppSetup;
|
use AppSetup;
|
||||||
use \Awobaz\Compoships\Compoships;
|
use \Awobaz\Compoships\Compoships;
|
||||||
|
|
||||||
const ENTITY_RECURRING_INVOICE = 'recurring_invoice';
|
// const ENTITY_RECURRING_INVOICE = 'recurring_invoice';
|
||||||
|
|
||||||
const ENTITY_CREDIT = 'credit';
|
// const ENTITY_CREDIT = 'credit';
|
||||||
|
|
||||||
const ENTITY_QUOTE = 'quote';
|
// const ENTITY_QUOTE = 'quote';
|
||||||
|
|
||||||
const ENTITY_TASK = 'task';
|
// const ENTITY_TASK = 'task';
|
||||||
|
|
||||||
const ENTITY_EXPENSE = 'expense';
|
// const ENTITY_EXPENSE = 'expense';
|
||||||
|
|
||||||
const ENTITY_PROJECT = 'project';
|
// const ENTITY_PROJECT = 'project';
|
||||||
|
|
||||||
const ENTITY_VENDOR = 'vendor';
|
// const ENTITY_VENDOR = 'vendor';
|
||||||
|
|
||||||
const ENTITY_TICKET = 'ticket';
|
// const ENTITY_TICKET = 'ticket';
|
||||||
|
|
||||||
const ENTITY_PROPOSAL = 'proposal';
|
// const ENTITY_PROPOSAL = 'proposal';
|
||||||
|
|
||||||
const ENTITY_RECURRING_EXPENSE = 'recurring_expense';
|
// const ENTITY_RECURRING_EXPENSE = 'recurring_expense';
|
||||||
|
|
||||||
const ENTITY_RECURRING_TASK = 'task';
|
// const ENTITY_RECURRING_TASK = 'task';
|
||||||
|
|
||||||
const ENTITY_RECURRING_QUOTE = 'recurring_quote';
|
// const ENTITY_RECURRING_QUOTE = 'recurring_quote';
|
||||||
|
|
||||||
protected $presenter = CompanyPresenter::class;
|
protected $presenter = CompanyPresenter::class;
|
||||||
|
|
||||||
@ -367,31 +367,26 @@ class Company extends BaseModel
|
|||||||
|
|
||||||
protected $with = [];
|
protected $with = [];
|
||||||
|
|
||||||
public static $modules = [
|
// public static $modules = [
|
||||||
self::ENTITY_RECURRING_INVOICE => 1,
|
// self::ENTITY_RECURRING_INVOICE => 1,
|
||||||
self::ENTITY_CREDIT => 2,
|
// self::ENTITY_CREDIT => 2,
|
||||||
self::ENTITY_QUOTE => 4,
|
// self::ENTITY_QUOTE => 4,
|
||||||
self::ENTITY_TASK => 8,
|
// self::ENTITY_TASK => 8,
|
||||||
self::ENTITY_EXPENSE => 16,
|
// self::ENTITY_EXPENSE => 16,
|
||||||
self::ENTITY_PROJECT => 32,
|
// self::ENTITY_PROJECT => 32,
|
||||||
self::ENTITY_VENDOR => 64,
|
// self::ENTITY_VENDOR => 64,
|
||||||
self::ENTITY_TICKET => 128,
|
// self::ENTITY_TICKET => 128,
|
||||||
self::ENTITY_PROPOSAL => 256,
|
// self::ENTITY_PROPOSAL => 256,
|
||||||
self::ENTITY_RECURRING_EXPENSE => 512,
|
// self::ENTITY_RECURRING_EXPENSE => 512,
|
||||||
self::ENTITY_RECURRING_TASK => 1024,
|
// self::ENTITY_RECURRING_TASK => 1024,
|
||||||
self::ENTITY_RECURRING_QUOTE => 2048,
|
// self::ENTITY_RECURRING_QUOTE => 2048,
|
||||||
];
|
// ];
|
||||||
|
|
||||||
public function shouldCalculateTax()
|
public function shouldCalculateTax()
|
||||||
{
|
{
|
||||||
return $this->calculate_taxes && in_array($this->getSetting('country_id'), $this->tax_coverage_countries);
|
return $this->calculate_taxes && in_array($this->getSetting('country_id'), $this->tax_coverage_countries);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function refreshTaxData()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public function documents()
|
public function documents()
|
||||||
{
|
{
|
||||||
return $this->morphMany(Document::class, 'documentable');
|
return $this->morphMany(Document::class, 'documentable');
|
||||||
|
@ -3,10 +3,10 @@ includes:
|
|||||||
|
|
||||||
parameters:
|
parameters:
|
||||||
treatPhpDocTypesAsCertain: false
|
treatPhpDocTypesAsCertain: false
|
||||||
parallel:
|
parallel:
|
||||||
jobSize: 20
|
jobSize: 20
|
||||||
maximumNumberOfProcesses: 2
|
maximumNumberOfProcesses: 2
|
||||||
processTimeout: 300.0
|
processTimeout: 300.0
|
||||||
ignoreErrors:
|
ignoreErrors:
|
||||||
- '#Call to an undefined method .*badMethod\(\)#'
|
- '#Call to an undefined method .*badMethod\(\)#'
|
||||||
- '#Call to an undefined method Illuminate\Database\Eloquent\Builder::exclude#'
|
- '#Call to an undefined method Illuminate\Database\Eloquent\Builder::exclude#'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user