Static analysis cleanup

This commit is contained in:
David Bomba 2023-04-27 07:29:40 +10:00
parent bffa1cf894
commit ff93f10f16
4 changed files with 4 additions and 5 deletions

View File

@ -31,13 +31,15 @@ use Illuminate\Support\Str;
* @property string $number * @property string $number
* @property int $company_id * @property int $company_id
* @property \App\Models\Company $company * @property \App\Models\Company $company
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel company() * @method static \Illuminate\Database\Eloquent\Builder|BaseModel|Illuminate\Database\Eloquent\Relations\BelongsTo|\Awobaz\Compoships\Database\Eloquent\Relations\BelongsTo|\App\Models\Company company()
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel exclude($columns) * @method static \Illuminate\Database\Eloquent\Builder|BaseModel exclude($columns)
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|BaseModel newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel newQuery() * @method static \Illuminate\Database\Eloquent\Builder|BaseModel newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel 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 exclude(array $excludeable)
* @method static \Illuminate\Database\Eloquent\Builder|BaseModel withTrashed() * @method static \Illuminate\Database\Eloquent\Builder|BaseModel withTrashed()
* @method \App\Models\Company company()
* @method int companyId()
* @mixin \Eloquent * @mixin \Eloquent
*/ */
class BaseModel extends Model class BaseModel extends Model

View File

@ -29,7 +29,6 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @property bool $is_system * @property bool $is_system
* @property-read \App\Models\Account $account * @property-read \App\Models\Account $account
* @property-read \App\Models\Company $company * @property-read \App\Models\Company $company
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Company> $company
* @property-read \App\Models\CompanyUser|null $company_user * @property-read \App\Models\CompanyUser|null $company_user
* @property-read \App\Models\CompanyUser|null $cu * @property-read \App\Models\CompanyUser|null $cu
* @property-read mixed $hashed_id * @property-read mixed $hashed_id

View File

@ -96,8 +96,6 @@ use Laracasts\Presenter\PresentableTrait;
* @property-read mixed $hashed_id * @property-read mixed $hashed_id
* @property-read mixed $status * @property-read mixed $status
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Backup> $history * @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Backup> $history
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Client> $client
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Company> $company
* @property-read int|null $history_count * @property-read int|null $history_count
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoiceInvitation> $invitations * @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\RecurringInvoiceInvitation> $invitations
* @property-read int|null $invitations_count * @property-read int|null $invitations_count

View File

@ -312,7 +312,7 @@ class User extends Authenticatable implements MustVerifyEmail
} elseif ($truth->getCompany()) { } elseif ($truth->getCompany()) {
return $truth->getCompany(); return $truth->getCompany();
} elseif (request()->header('X-API-TOKEN')) { } elseif (request()->header('X-API-TOKEN')) {
$company_token = CompanyToken::with(['company'])->where('token', request()->header('X-API-TOKEN'))->first(); $company_token = CompanyToken::with('company')->where('token', request()->header('X-API-TOKEN'))->first();
return $company_token->company; return $company_token->company;
} }