mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Static analysis cleanup
This commit is contained in:
parent
90fdfedacb
commit
4574c48985
@ -37,7 +37,7 @@ class BankTransactionFilters extends QueryFilters
|
||||
/**
|
||||
* Filter based on search text.
|
||||
*
|
||||
* @param string query filter
|
||||
* @param string $filter
|
||||
* @return Builder
|
||||
* @deprecated
|
||||
*/
|
||||
@ -118,7 +118,7 @@ class BankTransactionFilters extends QueryFilters
|
||||
/**
|
||||
* Sorts the list based on $sort.
|
||||
*
|
||||
* @param string sort formatted as column|asc
|
||||
* @param string $sort formatted as column|asc
|
||||
* @return Builder
|
||||
*/
|
||||
public function sort(string $sort = ''): Builder
|
||||
|
@ -36,7 +36,7 @@ class BankTransactionRuleFilters extends QueryFilters
|
||||
/**
|
||||
* Filter based on search text.
|
||||
*
|
||||
* @param string query filter
|
||||
* @param string $filter
|
||||
* @return Builder
|
||||
* @deprecated
|
||||
*/
|
||||
@ -54,7 +54,7 @@ class BankTransactionRuleFilters extends QueryFilters
|
||||
/**
|
||||
* Sorts the list based on $sort.
|
||||
*
|
||||
* @param string sort formatted as column|asc
|
||||
* @param string $sort formatted as column|asc
|
||||
* @return Builder
|
||||
*/
|
||||
public function sort(string $sort = ''): Builder
|
||||
|
@ -21,7 +21,7 @@ class PaymentTermFilters extends QueryFilters
|
||||
/**
|
||||
* Filter based on search text.
|
||||
*
|
||||
* @param string query filter
|
||||
* @param string $filter
|
||||
* @return Builder
|
||||
* @deprecated
|
||||
*/
|
||||
@ -39,7 +39,7 @@ class PaymentTermFilters extends QueryFilters
|
||||
/**
|
||||
* Sorts the list based on $sort.
|
||||
*
|
||||
* @param string sort formatted as column|asc
|
||||
* @param string $sort formatted as column|asc
|
||||
* @return Builder
|
||||
*/
|
||||
public function sort(string $sort = ''): Builder
|
||||
|
@ -22,7 +22,7 @@ class QuoteFilters extends QueryFilters
|
||||
/**
|
||||
* Filter based on search text.
|
||||
*
|
||||
* @param string query filter
|
||||
* @param string $filter
|
||||
* @return Builder
|
||||
* @deprecated
|
||||
*/
|
||||
@ -124,7 +124,7 @@ class QuoteFilters extends QueryFilters
|
||||
/**
|
||||
* Sorts the list based on $sort.
|
||||
*
|
||||
* @param string sort formatted as column|asc
|
||||
* @param string $sort formatted as column|asc
|
||||
* @return Builder
|
||||
*/
|
||||
public function sort(string $sort = ''): Builder
|
||||
|
@ -21,7 +21,7 @@ class RecurringExpenseFilters extends QueryFilters
|
||||
/**
|
||||
* Filter based on search text.
|
||||
*
|
||||
* @param string query filter
|
||||
* @param string $filter
|
||||
* @return Builder
|
||||
* @deprecated
|
||||
*/
|
||||
@ -52,7 +52,7 @@ class RecurringExpenseFilters extends QueryFilters
|
||||
/**
|
||||
* Sorts the list based on $sort.
|
||||
*
|
||||
* @param string sort formatted as column|asc
|
||||
* @param string $sort formatted as column|asc
|
||||
* @return Builder
|
||||
*/
|
||||
public function sort(string $sort = ''): Builder
|
||||
|
@ -21,7 +21,7 @@ class SubscriptionFilters extends QueryFilters
|
||||
/**
|
||||
* Filter based on search text.
|
||||
*
|
||||
* @param string query filter
|
||||
* @param string $filter
|
||||
* @return Builder
|
||||
* @deprecated
|
||||
*/
|
||||
@ -39,7 +39,7 @@ class SubscriptionFilters extends QueryFilters
|
||||
/**
|
||||
* Sorts the list based on $sort.
|
||||
*
|
||||
* @param string sort formatted as column|asc
|
||||
* @param string $sort formatted as column|asc
|
||||
* @return Builder
|
||||
*/
|
||||
public function sort(string $sort = ''): Builder
|
||||
|
@ -48,7 +48,7 @@ class SystemLogFilters extends QueryFilters
|
||||
/**
|
||||
* Filter based on search text.
|
||||
*
|
||||
* @param string query filter
|
||||
* @param string $filter
|
||||
* @return Builder
|
||||
* @deprecated
|
||||
*/
|
||||
@ -64,7 +64,7 @@ class SystemLogFilters extends QueryFilters
|
||||
/**
|
||||
* Sorts the list based on $sort.
|
||||
*
|
||||
* @param string sort formatted as column|asc
|
||||
* @param string $sort formatted as column|asc
|
||||
* @return Builder
|
||||
*/
|
||||
public function sort(string $sort = ''): Builder
|
||||
|
@ -24,7 +24,7 @@ class TaskFilters extends QueryFilters
|
||||
/**
|
||||
* Filter based on search text.
|
||||
*
|
||||
* @param string query filter
|
||||
* @param string $filter
|
||||
* @return Builder
|
||||
* @deprecated
|
||||
*/
|
||||
@ -99,7 +99,7 @@ class TaskFilters extends QueryFilters
|
||||
/**
|
||||
* Sorts the list based on $sort.
|
||||
*
|
||||
* @param string sort formatted as column|asc
|
||||
* @param string $sort formatted as column|asc
|
||||
* @return Builder
|
||||
*/
|
||||
public function sort(string $sort = ''): Builder
|
||||
|
@ -21,7 +21,7 @@ class TaskStatusFilters extends QueryFilters
|
||||
/**
|
||||
* Filter based on search text.
|
||||
*
|
||||
* @param string query filter
|
||||
* @param string $filter
|
||||
* @return Builder
|
||||
* @deprecated
|
||||
*/
|
||||
@ -39,7 +39,7 @@ class TaskStatusFilters extends QueryFilters
|
||||
/**
|
||||
* Sorts the list based on $sort.
|
||||
*
|
||||
* @param string sort formatted as column|asc
|
||||
* @param string $sort formatted as column|asc
|
||||
* @return Builder
|
||||
*/
|
||||
public function sort(string $sort = ''): Builder
|
||||
|
@ -21,7 +21,7 @@ class TaxRateFilters extends QueryFilters
|
||||
/**
|
||||
* Filter based on search text.
|
||||
*
|
||||
* @param string query filter
|
||||
* @param string $filter
|
||||
* @return Builder
|
||||
* @deprecated
|
||||
*/
|
||||
@ -39,7 +39,7 @@ class TaxRateFilters extends QueryFilters
|
||||
/**
|
||||
* Sorts the list based on $sort.
|
||||
*
|
||||
* @param string sort formatted as column|asc
|
||||
* @param string $sort formatted as column|asc
|
||||
* @return Builder
|
||||
*/
|
||||
public function sort(string $sort = ''): Builder
|
||||
|
@ -21,7 +21,7 @@ class TokenFilters extends QueryFilters
|
||||
/**
|
||||
* Filter based on search text.
|
||||
*
|
||||
* @param string query filter
|
||||
* @param string $filter
|
||||
* @return Builder
|
||||
* @deprecated
|
||||
*/
|
||||
@ -45,7 +45,7 @@ class TokenFilters extends QueryFilters
|
||||
/**
|
||||
* Sorts the list based on $sort.
|
||||
*
|
||||
* @param string sort formatted as column|asc
|
||||
* @param string $sort formatted as column|asc
|
||||
* @return Builder
|
||||
*/
|
||||
public function sort(string $sort = ''): Builder
|
||||
|
@ -21,7 +21,7 @@ class UserFilters extends QueryFilters
|
||||
/**
|
||||
* Filter based on search text.
|
||||
*
|
||||
* @param string query filter
|
||||
* @param string $filter
|
||||
* @return Builder
|
||||
* @deprecated
|
||||
*/
|
||||
@ -43,7 +43,7 @@ class UserFilters extends QueryFilters
|
||||
/**
|
||||
* Sorts the list based on $sort.
|
||||
*
|
||||
* @param string sort formatted as column|asc
|
||||
* @param string $sort formatted as column|asc
|
||||
* @return Builder
|
||||
*/
|
||||
public function sort(string $sort = ''): Builder
|
||||
|
@ -21,7 +21,7 @@ class VendorFilters extends QueryFilters
|
||||
/**
|
||||
* Filter based on search text.
|
||||
*
|
||||
* @param string query filter
|
||||
* @param string $filter
|
||||
* @return Builder
|
||||
* @deprecated
|
||||
*/
|
||||
@ -58,7 +58,7 @@ class VendorFilters extends QueryFilters
|
||||
/**
|
||||
* Sorts the list based on $sort.
|
||||
*
|
||||
* @param string sort formatted as column|asc
|
||||
* @param string $sort formatted as column|asc
|
||||
* @return Builder
|
||||
*/
|
||||
public function sort(string $sort = ''): Builder
|
||||
|
@ -21,7 +21,7 @@ class WebhookFilters extends QueryFilters
|
||||
/**
|
||||
* Filter based on search text.
|
||||
*
|
||||
* @param string query filter
|
||||
* @param string $filter
|
||||
* @return Builder
|
||||
* @deprecated
|
||||
*/
|
||||
@ -39,7 +39,7 @@ class WebhookFilters extends QueryFilters
|
||||
/**
|
||||
* Sorts the list based on $sort.
|
||||
*
|
||||
* @param string sort formatted as column|asc
|
||||
* @param string $sort formatted as column|asc
|
||||
* @return Builder
|
||||
*/
|
||||
public function sort(string $sort = ''): Builder
|
||||
|
@ -19,7 +19,7 @@ use Illuminate\View\View;
|
||||
*
|
||||
* @param $page
|
||||
* @param bool $boolean
|
||||
* @return bool
|
||||
* @return bool | string
|
||||
*/
|
||||
function isActive($page, bool $boolean = false)
|
||||
{
|
||||
@ -40,8 +40,6 @@ function isActive($page, bool $boolean = false)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -53,9 +53,8 @@ class EpcQrGenerator
|
||||
$qr = $writer->writeString($this->encodeMessage(), 'utf-8');
|
||||
} catch(\Throwable $e) {
|
||||
return '';
|
||||
} catch(\Exception $e) {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
return "<svg viewBox='0 0 200 200' width='200' height='200' x='0' y='0' xmlns='http://www.w3.org/2000/svg'>
|
||||
<rect x='0' y='0' width='100%'' height='100%' />{$qr}</svg>";
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ namespace App\Models;
|
||||
|
||||
use App\Utils\Number;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
|
||||
/**
|
||||
* App\Models\Activity
|
||||
@ -302,161 +303,120 @@ class Activity extends StaticModel
|
||||
'backup',
|
||||
];
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function getHashedIdAttribute()
|
||||
{
|
||||
return $this->encodePrimaryKey($this->id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function getEntityType()
|
||||
{
|
||||
return self::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function backup()
|
||||
{
|
||||
return $this->hasOne(Backup::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function history()
|
||||
{
|
||||
return $this->hasOne(Backup::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function user()
|
||||
public function user() :BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function contact()
|
||||
{
|
||||
return $this->belongsTo(ClientContact::class, 'client_contact_id', 'id')->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function client()
|
||||
{
|
||||
return $this->belongsTo(Client::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function invoice()
|
||||
{
|
||||
return $this->belongsTo(Invoice::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function vendor()
|
||||
{
|
||||
return $this->belongsTo(Vendor::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function recurring_invoice()
|
||||
{
|
||||
return $this->belongsTo(RecurringInvoice::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function credit()
|
||||
{
|
||||
return $this->belongsTo(Credit::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function quote()
|
||||
{
|
||||
return $this->belongsTo(Quote::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function subscription()
|
||||
{
|
||||
return $this->belongsTo(Subscription::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function payment()
|
||||
{
|
||||
return $this->belongsTo(Payment::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function expense()
|
||||
{
|
||||
return $this->belongsTo(Expense::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function recurring_expense()
|
||||
{
|
||||
return $this->belongsTo(RecurringExpense::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function purchase_order()
|
||||
{
|
||||
return $this->belongsTo(PurchaseOrder::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function vendor_contact()
|
||||
{
|
||||
return $this->belongsTo(VendorContact::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function task()
|
||||
{
|
||||
return $this->belongsTo(Task::class)->withTrashed();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
|
||||
public function company()
|
||||
{
|
||||
return $this->belongsTo(Company::class);
|
||||
|
@ -50,12 +50,6 @@ class BankAccount extends BaseModel
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'bank_id',
|
||||
'app_version',
|
||||
|
@ -39,7 +39,7 @@ use Illuminate\Database\Eloquent\ModelNotFoundException as ModelNotFoundExceptio
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel with($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel newModelQuery($query)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel newQuery($query)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel query($query)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel exclude(array $excludeable)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel withTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel scopeExclude($query)
|
||||
@ -59,6 +59,7 @@ use Illuminate\Database\Eloquent\ModelNotFoundException as ModelNotFoundExceptio
|
||||
*
|
||||
* @method \App\Models\Company company()
|
||||
* @method int companyId()
|
||||
* @method createInvitations()
|
||||
* @method Builder|static exclude($columns)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder exclude(array $columns)
|
||||
* @mixin \Eloquent
|
||||
|
@ -377,7 +377,7 @@ class Client extends BaseModel implements HasLocalePreference
|
||||
return $this->hasMany(SystemLog::class)->take(50)->orderBy('id', 'desc');
|
||||
}
|
||||
|
||||
public function timezone() :TimeZone
|
||||
public function timezone() :Timezone
|
||||
{
|
||||
return Timezone::find($this->getSetting('timezone_id'));
|
||||
}
|
||||
|
@ -37,29 +37,6 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* @property-read \App\Models\GatewayType|null $gateway_type
|
||||
* @property-read mixed $hashed_id
|
||||
* @property-read \App\Models\User $user
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel company()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel exclude($columns)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel scope()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken whereClientId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken whereCompanyGatewayId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken whereCompanyId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken whereGatewayCustomerReference($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken whereGatewayTypeId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken whereIsDefault($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken whereIsDeleted($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken whereMeta($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken whereRoutingNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken whereToken($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken withTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ClientGatewayToken withoutTrashed()
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class ClientGatewayToken extends BaseModel
|
||||
|
@ -393,17 +393,17 @@ class Company extends BaseModel
|
||||
return $this->morphMany(Document::class, 'documentable');
|
||||
}
|
||||
|
||||
public function schedulers()
|
||||
public function schedulers() :HasMany
|
||||
{
|
||||
return $this->hasMany(Scheduler::class);
|
||||
}
|
||||
|
||||
public function task_schedulers() //alias for schedulers
|
||||
public function task_schedulers() :HasMany
|
||||
{
|
||||
return $this->hasMany(Scheduler::class);
|
||||
}
|
||||
|
||||
public function all_documents()
|
||||
public function all_documents() :HasMany
|
||||
{
|
||||
return $this->hasMany(Document::class);
|
||||
}
|
||||
@ -413,22 +413,22 @@ class Company extends BaseModel
|
||||
return self::class;
|
||||
}
|
||||
|
||||
public function ledger()
|
||||
public function ledger() :HasMany
|
||||
{
|
||||
return $this->hasMany(CompanyLedger::class);
|
||||
}
|
||||
|
||||
public function bank_integrations()
|
||||
public function bank_integrations() :HasMany
|
||||
{
|
||||
return $this->hasMany(BankIntegration::class);
|
||||
}
|
||||
|
||||
public function bank_transactions()
|
||||
public function bank_transactions() :HasMany
|
||||
{
|
||||
return $this->hasMany(BankTransaction::class);
|
||||
}
|
||||
|
||||
public function bank_transaction_rules()
|
||||
public function bank_transaction_rules() :HasMany
|
||||
{
|
||||
return $this->hasMany(BankTransactionRule::class);
|
||||
}
|
||||
@ -443,7 +443,7 @@ class Company extends BaseModel
|
||||
return $this->belongsTo(Account::class);
|
||||
}
|
||||
|
||||
public function client_contacts()
|
||||
public function client_contacts() :HasMany
|
||||
{
|
||||
return $this->hasMany(ClientContact::class)->withTrashed();
|
||||
}
|
||||
@ -453,27 +453,27 @@ class Company extends BaseModel
|
||||
return $this->hasManyThrough(User::class, CompanyUser::class, 'company_id', 'id', 'id', 'user_id')->withTrashed();
|
||||
}
|
||||
|
||||
public function expense_categories()
|
||||
public function expense_categories() :HasMany
|
||||
{
|
||||
return $this->hasMany(ExpenseCategory::class)->withTrashed();
|
||||
}
|
||||
|
||||
public function subscriptions()
|
||||
public function subscriptions() :HasMany
|
||||
{
|
||||
return $this->hasMany(Subscription::class)->withTrashed();
|
||||
}
|
||||
|
||||
public function purchase_orders()
|
||||
public function purchase_orders() :HasMany
|
||||
{
|
||||
return $this->hasMany(PurchaseOrder::class)->withTrashed();
|
||||
}
|
||||
|
||||
public function task_statuses()
|
||||
public function task_statuses() :HasMany
|
||||
{
|
||||
return $this->hasMany(TaskStatus::class)->withTrashed();
|
||||
}
|
||||
|
||||
public function clients()
|
||||
public function clients() :HasMany
|
||||
{
|
||||
return $this->hasMany(Client::class)->withTrashed();
|
||||
}
|
||||
@ -481,12 +481,12 @@ class Company extends BaseModel
|
||||
/**
|
||||
* @return HasMany
|
||||
*/
|
||||
public function tasks()
|
||||
public function tasks() :HasMany
|
||||
{
|
||||
return $this->hasMany(Task::class)->withTrashed();
|
||||
}
|
||||
|
||||
public function webhooks()
|
||||
public function webhooks() :HasMany
|
||||
{
|
||||
return $this->hasMany(Webhook::class);
|
||||
}
|
||||
@ -494,7 +494,7 @@ class Company extends BaseModel
|
||||
/**
|
||||
* @return HasMany
|
||||
*/
|
||||
public function projects()
|
||||
public function projects() :HasMany
|
||||
{
|
||||
return $this->hasMany(Project::class)->withTrashed();
|
||||
}
|
||||
@ -502,17 +502,17 @@ class Company extends BaseModel
|
||||
/**
|
||||
* @return HasMany
|
||||
*/
|
||||
public function vendors()
|
||||
public function vendors() :HasMany
|
||||
{
|
||||
return $this->hasMany(Vendor::class)->withTrashed();
|
||||
}
|
||||
|
||||
public function all_activities()
|
||||
public function all_activities() :HasMany
|
||||
{
|
||||
return $this->hasMany(Activity::class);
|
||||
}
|
||||
|
||||
public function activities()
|
||||
public function activities() :HasMany
|
||||
{
|
||||
return $this->hasMany(Activity::class)->orderBy('id', 'DESC')->take(50);
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* @property int|null $update_details
|
||||
* @property int $is_deleted
|
||||
* @property string $config
|
||||
* @property object $fees_and_limits
|
||||
* @property mixed $fees_and_limits
|
||||
* @property string|null $custom_value1
|
||||
* @property string|null $custom_value2
|
||||
* @property string|null $custom_value3
|
||||
@ -232,7 +232,8 @@ class CompanyGateway extends BaseModel
|
||||
/* This is the public entry point into the payment superclass */
|
||||
public function driver(Client $client = null)
|
||||
{
|
||||
$class = static::driver_class();
|
||||
// $class = static::driver_class();
|
||||
$class = self::driver_class();
|
||||
|
||||
if (!$class) {
|
||||
return false;
|
||||
@ -343,10 +344,10 @@ class CompanyGateway extends BaseModel
|
||||
return ! empty($this->getConfigField('enable_pay_pal'));
|
||||
}
|
||||
|
||||
public function feesEnabled()
|
||||
{
|
||||
return floatval($this->fee_amount) || floatval($this->fee_percent);
|
||||
}
|
||||
// public function feesEnabled()
|
||||
// {
|
||||
// return floatval($this->fee_amount) || floatval($this->fee_percent);
|
||||
// }
|
||||
|
||||
/**
|
||||
* Returns the current test mode of the gateway.
|
||||
|
@ -180,7 +180,6 @@ class Gateway extends StaticModel
|
||||
GatewayType::SEPA => ['refund' => false, 'token_billing' => true, 'webhooks' => [' ']],
|
||||
GatewayType::INSTANT_BANK_PAY => ['refund' => false, 'token_billing' => true, 'webhooks' => [' ']],
|
||||
];
|
||||
break;
|
||||
case 58:
|
||||
return [
|
||||
GatewayType::HOSTED_PAGE => ['refund' => false, 'token_billing' => false, 'webhooks' => [' ']], // Razorpay
|
||||
|
@ -160,7 +160,6 @@ class GatewayType extends StaticModel
|
||||
return ctrans('texts.paypal_paylater');
|
||||
default:
|
||||
return ' ';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -57,9 +57,6 @@ class PaymentTerm extends BaseModel
|
||||
*/
|
||||
public $timestamps = true;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = ['num_days'];
|
||||
|
||||
public function getNumDays()
|
||||
|
@ -25,8 +25,6 @@ class CompanyPresenter extends EntityPresenter
|
||||
*/
|
||||
public function name()
|
||||
{
|
||||
$settings = $this->entity->settings;
|
||||
|
||||
return $this->settings->name ?: ctrans('texts.untitled_account');
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ class InvoicePresenter extends EntityPresenter
|
||||
$properties->itemized_receipt[] = $this->itemRbits($item);
|
||||
}
|
||||
|
||||
$data = new stdClass();
|
||||
$data = new \stdClass();
|
||||
$data->receive_time = time();
|
||||
$data->type = 'transaction_details';
|
||||
$data->source = 'user';
|
||||
@ -64,7 +64,7 @@ class InvoicePresenter extends EntityPresenter
|
||||
|
||||
public function itemRbits($item)
|
||||
{
|
||||
$data = new stdClass();
|
||||
$data = new \stdClass();
|
||||
$data->description = $item->notes;
|
||||
$data->item_price = floatval($item->cost);
|
||||
$data->quantity = floatval($item->quantity);
|
||||
|
@ -106,12 +106,6 @@ class Project extends BaseModel
|
||||
use PresentableTrait;
|
||||
use Filterable;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'client_id',
|
||||
|
@ -16,9 +16,9 @@ use App\Models\Subscription;
|
||||
class SubscriptionObserver
|
||||
{
|
||||
/**
|
||||
* Handle the billing_subscription "created" event.
|
||||
* Handle the subscription "created" event.
|
||||
*
|
||||
* @param Subscription $billing_subscription
|
||||
* @param Subscription $subscription
|
||||
* @return void
|
||||
*/
|
||||
public function created(Subscription $subscription)
|
||||
@ -27,9 +27,9 @@ class SubscriptionObserver
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the billing_subscription "updated" event.
|
||||
* Handle the subscription "updated" event.
|
||||
*
|
||||
* @param Subscription $billing_subscription
|
||||
* @param Subscription $subscription
|
||||
* @return void
|
||||
*/
|
||||
public function updated(Subscription $subscription)
|
||||
@ -38,9 +38,9 @@ class SubscriptionObserver
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the billing_subscription "deleted" event.
|
||||
* Handle the subscription "deleted" event.
|
||||
*
|
||||
* @param Subscription $billing_subscription
|
||||
* @param Subscription $subscription
|
||||
* @return void
|
||||
*/
|
||||
public function deleted(Subscription $subscription)
|
||||
@ -49,9 +49,9 @@ class SubscriptionObserver
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the billing_subscription "restored" event.
|
||||
* Handle the subscription "restored" event.
|
||||
*
|
||||
* @param Subscription $billing_subscription
|
||||
* @param Subscription $subscription
|
||||
* @return void
|
||||
*/
|
||||
public function restored(Subscription $subscription)
|
||||
@ -60,9 +60,9 @@ class SubscriptionObserver
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle the billing_subscription "force deleted" event.
|
||||
* Handle the subscription "force deleted" event.
|
||||
*
|
||||
* @param Subscription $billing_subscription
|
||||
* @param Subscription $subscription
|
||||
* @return void
|
||||
*/
|
||||
public function forceDeleted(Subscription $subscription)
|
||||
|
Loading…
x
Reference in New Issue
Block a user