refactor: cosmetic changes (#6123)

This commit is contained in:
Alexis Saettler
2022-05-04 23:15:44 +02:00
committed by GitHub
parent 61ef0c017a
commit 1a00864eff
118 changed files with 192 additions and 176 deletions
+5 -1
View File
@@ -38,8 +38,12 @@ class PingVersionServer extends Command
*/
public function handle()
{
if (! config('monica.check_version')) {
return;
}
if (! $this->confirmToProceed('Checking version deactivated', function () {
return ! config('monica.check_version') && $this->getLaravel()->environment() == 'production';
return $this->getLaravel()->environment() == 'production';
})) {
return false;
}
+2 -2
View File
@@ -618,7 +618,7 @@ class SetupTest extends Command
public function populateConversations()
{
if (rand(1, 1) == 1) {
if (rand(1, 3) == 1) {
for ($j = 0; $j < rand(1, 20); $j++) {
$contactFieldType = ContactFieldType::where('account_id', $this->account->id)->orderBy(DB::raw('RAND()'))->firstOrFail();
@@ -645,7 +645,7 @@ class SetupTest extends Command
public function populateLifeEvents()
{
if (rand(1, 1) == 1) {
if (rand(1, 3) == 1) {
for ($j = 0; $j < rand(1, 20); $j++) {
$lifeEventType = LifeEventType::where('account_id', $this->account->id)->orderBy(DB::raw('RAND()'))->firstOrFail();
+1 -1
View File
@@ -13,7 +13,7 @@ class Handler extends ExceptionHandler
/**
* A list of the exception types that should not be reported.
*
* @var array
* @var array<int, class-string<Throwable>>
*/
protected $dontReport = [
OAuthServerException::class,
+2 -2
View File
@@ -11,14 +11,14 @@ class AuditLogHelper
/**
* Prepare a collection of audit logs that is displayed on the Settings page.
*
* @param \Illuminate\Contracts\Pagination\LengthAwarePaginator|Collection<\App\Models\Instance\AuditLog,mixed> $logs
* @param \Illuminate\Contracts\Pagination\LengthAwarePaginator|Collection<array-key, \App\Models\Instance\AuditLog> $logs
* @return Collection
*/
public static function getCollectionOfAudits($logs): Collection
{
$logsCollection = collect();
foreach ($logs as $key => $log) {
foreach ($logs as $log) {
$object = null;
$link = null;
+1 -1
View File
@@ -16,7 +16,7 @@ class GenderHelper
*/
public static function getGendersInput()
{
$genders = auth()->user()->account->genders->map(function ($gender) {
$genders = auth()->user()->account->genders->map(function (Gender $gender): array {
return [
'id' => $gender->id,
'name' => $gender->name,
+1 -1
View File
@@ -94,7 +94,7 @@ class LocaleHelper
*/
public static function getLocaleList()
{
return collect(config('lang-detector.languages'))->map(function ($lang) {
return collect(config('lang-detector.languages'))->map(function (string $lang): array {
return [
'lang' => $lang,
'name' => self::getLocaleName($lang),
@@ -59,7 +59,7 @@ class ActivitiesController extends Controller
->filter(function ($c) use ($contact) {
return $contact->id !== $c->id;
})
->map(function ($c) {
->map(function (Contact $c): array {
return [
'id' => $c->id,
'name' => $c->name,
+1 -1
View File
@@ -96,7 +96,7 @@ class ContactsController extends Controller
return in_array($tag->name, $tagsInput);
});
$url = $tags->map(function ($tag) {
$url = $tags->map(function ($tag): string {
return 'tags[]='.urlencode($tag->name);
})->join('&');
@@ -176,7 +176,7 @@ class CalDAVBackend extends AbstractBackend implements SyncSupport
return $backend->prepareData($date);
})
->filter(function ($event) {
return ! is_null($event);
return $event !== null;
})
->toArray();
}
@@ -38,7 +38,7 @@ class AddressBookHome extends BaseAddressBookHome
{
$addressBooks = $this->carddavBackend->getAddressBooksForUser($this->principalUri);
return collect($addressBooks)->map(function ($addressBook) {
return collect($addressBooks)->map(function (array $addressBook): AddressBook {
return new AddressBook($this->carddavBackend, $addressBook);
})->toArray();
}
@@ -92,7 +92,10 @@ trait SyncDAVBackend
public function getLastModified($collectionId)
{
return $this->getObjects($collectionId)
->max('updated_at');
->map(function ($object) {
return $object->updated_at;
})
->max();
}
/**
+1 -1
View File
@@ -109,7 +109,7 @@ class DashboardController extends Controller
$calls = auth()->user()->account->calls()
->get()
->reject(function ($call) {
return is_null($call->contact);
return $call->contact === null;
})
->take(15);
@@ -76,8 +76,10 @@ class ExportController extends Controller
if ($exports->count() >= config('monica.export_size')) {
$job = $exports->first();
try {
StorageHelper::disk($job->location)
->delete($job->filename);
if ($job->filename !== null) {
StorageHelper::disk($job->location)
->delete($job->filename);
}
} finally {
$job->delete();
}
+1 -1
View File
@@ -94,7 +94,7 @@ class Kernel extends HttpKernel
*
* This forces the listed middleware to always be in the given order.
*
* @var array
* @var array<string>
*/
protected $middlewarePriority = [
\Illuminate\Session\Middleware\StartSession::class,
+1 -1
View File
@@ -16,7 +16,7 @@ class User extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -16,7 +16,7 @@ class Activity extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -15,7 +15,7 @@ class ActivityType extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
@@ -14,7 +14,7 @@ class ActivityTypeCategory extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -16,7 +16,7 @@ class Address extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -15,7 +15,7 @@ class AuditLog extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -16,7 +16,7 @@ class Call extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -14,7 +14,7 @@ class Company extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -15,7 +15,7 @@ class Contact extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -15,7 +15,7 @@ class ContactSearch extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -16,7 +16,7 @@ class ContactShort extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
@@ -15,7 +15,7 @@ class ContactWithContactFields extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
@@ -16,7 +16,7 @@ class ContactField extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
@@ -14,7 +14,7 @@ class ContactFieldLabel extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
@@ -17,7 +17,7 @@ class Conversation extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -15,7 +15,7 @@ class Message extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -11,7 +11,7 @@ class Country extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -15,7 +15,7 @@ class Debt extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -15,7 +15,7 @@ class Document extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -13,7 +13,7 @@ class Emotion extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -14,7 +14,7 @@ class Gender extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -16,7 +16,7 @@ class Gift extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -14,7 +14,7 @@ class Entry extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -16,7 +16,7 @@ class LifeEvent extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
@@ -14,7 +14,7 @@ class LifeEventCategory extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
@@ -15,7 +15,7 @@ class LifeEventType extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -15,7 +15,7 @@ class Note extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -16,7 +16,7 @@ class Occupation extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -15,7 +15,7 @@ class Pet extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -13,7 +13,7 @@ class PetCategory extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -15,7 +15,7 @@ class Photo extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -15,7 +15,7 @@ class Place extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
@@ -16,7 +16,7 @@ class Relationship extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
@@ -14,7 +14,7 @@ class RelationshipShort extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
@@ -14,7 +14,7 @@ class RelationshipType extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
@@ -14,7 +14,7 @@ class RelationshipTypeGroup extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -15,7 +15,7 @@ class Reminder extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
@@ -15,7 +15,7 @@ class ReminderOutbox extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
@@ -14,7 +14,7 @@ class Compliance extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
@@ -14,7 +14,7 @@ class ContactFieldType extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
@@ -13,7 +13,7 @@ class Currency extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
@@ -14,7 +14,7 @@ class WebauthnKey extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -14,7 +14,7 @@ class Tag extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+1 -1
View File
@@ -15,7 +15,7 @@ class Task extends JsonResource
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
* @return array|\Illuminate\Contracts\Support\Arrayable|\JsonSerializable
*/
public function toArray($request)
{
+2 -3
View File
@@ -3,7 +3,6 @@
namespace App\Jobs;
use Throwable;
use App\Services\BaseService;
use Illuminate\Bus\Queueable;
use App\Services\QueuableService;
use Illuminate\Queue\SerializesModels;
@@ -39,10 +38,10 @@ class ServiceQueue implements ShouldQueue
/**
* Create a new job instance.
*
* @param BaseService $service
* @param QueuableService $service
* @param array|null $data
*/
public function __construct(BaseService $service, array $data = null)
public function __construct(QueuableService $service, array $data = null)
{
if (! $service instanceof QueuableService) {
throw new \Exception('Service is not queuable');
+9 -2
View File
@@ -56,10 +56,17 @@ class Account extends Model
{
use Subscription, HasUuid;
/**
* The attributes that aren't mass assignable.
*
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'number_of_invitations_sent',
@@ -71,7 +78,7 @@ class Account extends Model
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'has_access_to_paid_version_for_free' => 'boolean',
+2 -2
View File
@@ -31,14 +31,14 @@ class Activity extends Model implements IsJournalableInterface
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that should be mutated to dates.
*
* @var array
* @var array<string>
*/
protected $dates = ['happened_at'];
+1 -1
View File
@@ -12,7 +12,7 @@ class ActivityStatistic extends Model
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'account_id',
+1 -1
View File
@@ -16,7 +16,7 @@ class ActivityType extends Model
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'name',
+1 -1
View File
@@ -18,7 +18,7 @@ class ActivityTypeCategory extends Model
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'name',
+3 -3
View File
@@ -19,7 +19,7 @@ class AddressBook extends Model
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'account_id',
@@ -31,14 +31,14 @@ class AddressBook extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
];
@@ -21,7 +21,7 @@ class AddressBookSubscription extends Model
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'account_id',
@@ -43,14 +43,14 @@ class AddressBookSubscription extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that should be mutated to dates.
*
* @var array
* @var array<string>
*/
protected $dates = [
'last_synchronized_at',
@@ -59,7 +59,7 @@ class AddressBookSubscription extends Model
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'readonly' => 'boolean',
+2 -2
View File
@@ -14,7 +14,7 @@ class Company extends Model
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'weather_json',
@@ -27,7 +27,7 @@ class Company extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
+3 -3
View File
@@ -35,7 +35,7 @@ class ExportJob extends Model
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'uuid',
@@ -52,14 +52,14 @@ class ExportJob extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that should be mutated to dates.
*
* @var array
* @var array<string>
*/
protected $dates = [
'started_at',
+2 -2
View File
@@ -55,14 +55,14 @@ class ImportJob extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that should be mutated to dates.
*
* @var array
* @var array<string>
*/
protected $dates = ['started_at', 'ended_at'];
+1 -1
View File
@@ -23,7 +23,7 @@ class ImportJobReport extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
+1 -1
View File
@@ -19,7 +19,7 @@ class Invitation extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
+1 -1
View File
@@ -26,7 +26,7 @@ class Photo extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
+1 -1
View File
@@ -26,7 +26,7 @@ class Place extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
+3 -3
View File
@@ -16,7 +16,7 @@ class Weather extends Model
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'account_id',
@@ -27,7 +27,7 @@ class Weather extends Model
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'weather_json' => 'array',
@@ -36,7 +36,7 @@ class Weather extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
+1 -1
View File
@@ -21,7 +21,7 @@ class Address extends Model implements LabelInterface
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
+3 -3
View File
@@ -19,21 +19,21 @@ class Call extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that should be mutated to dates.
*
* @var array
* @var array<string>
*/
protected $dates = ['called_at'];
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'contact_called' => 'boolean',
+2 -2
View File
@@ -130,7 +130,7 @@ class Contact extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
@@ -148,7 +148,7 @@ class Contact extends Model
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'is_partial' => 'boolean',
+1 -1
View File
@@ -16,7 +16,7 @@ class ContactField extends Model implements LabelInterface
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
+1 -1
View File
@@ -15,7 +15,7 @@ class ContactFieldLabel extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
+2 -2
View File
@@ -15,7 +15,7 @@ class ContactFieldType extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
@@ -24,7 +24,7 @@ class ContactFieldType extends Model
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'delible' => 'boolean',
+2 -2
View File
@@ -15,14 +15,14 @@ class Conversation extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that should be mutated to dates.
*
* @var array
* @var array<string>
*/
protected $dates = ['happened_at'];
+1 -1
View File
@@ -26,7 +26,7 @@ class Debt extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
+2 -2
View File
@@ -25,14 +25,14 @@ class Document extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'number_of_downloads' => 'integer',
+2 -2
View File
@@ -15,14 +15,14 @@ class Gender extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'name',
+3 -3
View File
@@ -31,14 +31,14 @@ class Gift extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that should be mutated to dates.
*
* @var array
* @var array<string>
*/
protected $dates = [
'date',
@@ -47,7 +47,7 @@ class Gift extends Model
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
];
+4 -4
View File
@@ -16,14 +16,14 @@ class LifeEvent extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'name',
@@ -40,14 +40,14 @@ class LifeEvent extends Model
/**
* The attributes that should be mutated to dates.
*
* @var array
* @var array<string>
*/
protected $dates = ['happened_at'];
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'happened_at_month_unknown' => 'boolean',
+2 -2
View File
@@ -17,7 +17,7 @@ class LifeEventCategory extends Model
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'name',
@@ -29,7 +29,7 @@ class LifeEventCategory extends Model
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'core_monica_data' => 'boolean',
+2 -2
View File
@@ -17,7 +17,7 @@ class LifeEventType extends Model
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'name',
@@ -30,7 +30,7 @@ class LifeEventType extends Model
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'core_monica_data' => 'boolean',
+3 -3
View File
@@ -14,21 +14,21 @@ class Message extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that should be mutated to dates.
*
* @var array
* @var array<string>
*/
protected $dates = ['written_at'];
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'written_by_me' => 'boolean',
+3 -3
View File
@@ -24,14 +24,14 @@ class Note extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'is_favorited' => 'boolean',
@@ -44,7 +44,7 @@ class Note extends Model
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'account_id',
+3 -3
View File
@@ -14,7 +14,7 @@ class Occupation extends Model
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'account_id',
@@ -41,7 +41,7 @@ class Occupation extends Model
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'start_date' => 'datetime:Y-m-d',
@@ -51,7 +51,7 @@ class Occupation extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
+1 -1
View File
@@ -14,7 +14,7 @@ class Pet extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
+1 -1
View File
@@ -9,7 +9,7 @@ class PetCategory extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
+2 -2
View File
@@ -26,14 +26,14 @@ class Reminder extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'is_birthday' => 'boolean',
+2 -2
View File
@@ -26,14 +26,14 @@ class ReminderOutbox extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that should be mutated to dates.
*
* @var array
* @var array<string>
*/
protected $dates = [
'planned_date',
+2 -2
View File
@@ -11,7 +11,7 @@ class ReminderRule extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
@@ -20,7 +20,7 @@ class ReminderRule extends Model
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'active' => 'boolean',
+2 -2
View File
@@ -11,14 +11,14 @@ class Tag extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'name',
+3 -3
View File
@@ -25,14 +25,14 @@ class Task extends Model
/**
* The attributes that aren't mass assignable.
*
* @var array
* @var array<string>|bool
*/
protected $guarded = ['id'];
/**
* The attributes that should be mutated to dates.
*
* @var array
* @var array<string>
*/
protected $dates = [
'completed_at',
@@ -42,7 +42,7 @@ class Task extends Model
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'completed' => 'boolean',
+4 -4
View File
@@ -16,7 +16,7 @@ class AuditLog extends Model
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'account_id',
@@ -32,7 +32,7 @@ class AuditLog extends Model
/**
* The attributes that should be mutated to dates.
*
* @var array
* @var array<string>
*/
protected $dates = [
'audited_at',
@@ -41,7 +41,7 @@ class AuditLog extends Model
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'should_appear_on_dashboard' => 'boolean',
@@ -81,7 +81,7 @@ class AuditLog extends Model
* Get the JSON object.
*
* @param mixed $value
* @return array
* @return mixed
*/
public function getObjectAttribute($value)
{
+2 -2
View File
@@ -9,7 +9,7 @@ class Cron extends Model
/**
* The attributes that are mass assignable.
*
* @var array
* @var array<string>
*/
protected $fillable = [
'command',
@@ -19,7 +19,7 @@ class Cron extends Model
/**
* The attributes that should be cast to native types.
*
* @var array
* @var array<string, string>
*/
protected $casts = [
'last_run' => 'datetime',

Some files were not shown because too many files have changed in this diff Show More