mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Updates for static analysis
This commit is contained in:
parent
4bfe59d2f9
commit
54420dfe99
@ -69,6 +69,7 @@ class ProRata
|
||||
return [];
|
||||
}
|
||||
|
||||
/** @var \App\Models\RecurringInvoice $recurring_invoice **/
|
||||
$recurring_invoice = RecurringInvoice::find($invoice->recurring_id)->first();
|
||||
|
||||
if (! $recurring_invoice) {
|
||||
|
@ -14,7 +14,6 @@ namespace App\Http\Controllers;
|
||||
use App\Models\Account;
|
||||
use App\Utils\CurlUtils;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Http\Response;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use stdClass;
|
||||
|
@ -43,6 +43,7 @@ use Laracasts\Presenter\PresentableTrait;
|
||||
* @property string|null $number
|
||||
* @property float $discount
|
||||
* @property bool $is_amount_discount
|
||||
* @property bool $auto_bill_enabled
|
||||
* @property string|null $po_number
|
||||
* @property string|null $date
|
||||
* @property string|null $last_sent_date
|
||||
|
@ -278,7 +278,7 @@ class RecurringInvoice extends BaseModel
|
||||
return $value;
|
||||
}
|
||||
|
||||
public function vendor()
|
||||
public function vendor(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Vendor::class);
|
||||
}
|
||||
@ -293,27 +293,27 @@ class RecurringInvoice extends BaseModel
|
||||
return $this->hasManyThrough(Backup::class, Activity::class);
|
||||
}
|
||||
|
||||
public function company()
|
||||
public function company(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Company::class);
|
||||
}
|
||||
|
||||
public function client()
|
||||
public function client(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Client::class)->withTrashed();
|
||||
}
|
||||
|
||||
public function project()
|
||||
public function project(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
{
|
||||
return $this->belongsTo(Project::class)->withTrashed();
|
||||
}
|
||||
|
||||
public function user()
|
||||
public function user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class)->withTrashed();
|
||||
}
|
||||
|
||||
public function assigned_user()
|
||||
public function assigned_user(): \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
{
|
||||
return $this->belongsTo(User::class, 'assigned_user_id', 'id')->withTrashed();
|
||||
}
|
||||
|
@ -164,7 +164,7 @@ class Vendor extends BaseModel
|
||||
return self::class;
|
||||
}
|
||||
|
||||
public function primary_contact()
|
||||
public function primary_contact(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
{
|
||||
return $this->hasMany(VendorContact::class)->where('is_primary', true);
|
||||
}
|
||||
@ -179,12 +179,12 @@ class Vendor extends BaseModel
|
||||
return $this->belongsTo(User::class, 'assigned_user_id', 'id')->withTrashed();
|
||||
}
|
||||
|
||||
public function contacts()
|
||||
public function contacts(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
{
|
||||
return $this->hasMany(VendorContact::class)->orderBy('is_primary', 'desc');
|
||||
}
|
||||
|
||||
public function activities()
|
||||
public function activities(): \Illuminate\Database\Eloquent\Relations\HasMany
|
||||
{
|
||||
return $this->hasMany(Activity::class);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user