diff --git a/app/Console/Commands/PingVersionServer.php b/app/Console/Commands/PingVersionServer.php index be1cbac50..cc770755c 100644 --- a/app/Console/Commands/PingVersionServer.php +++ b/app/Console/Commands/PingVersionServer.php @@ -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; } diff --git a/app/Console/Commands/SetupTest.php b/app/Console/Commands/SetupTest.php index dacb75849..8216e2d49 100644 --- a/app/Console/Commands/SetupTest.php +++ b/app/Console/Commands/SetupTest.php @@ -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(); diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 1d4dbb605..432ebdc02 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -13,7 +13,7 @@ class Handler extends ExceptionHandler /** * A list of the exception types that should not be reported. * - * @var array + * @var array> */ protected $dontReport = [ OAuthServerException::class, diff --git a/app/Helpers/AuditLogHelper.php b/app/Helpers/AuditLogHelper.php index 308846728..6dd6d922a 100644 --- a/app/Helpers/AuditLogHelper.php +++ b/app/Helpers/AuditLogHelper.php @@ -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 $logs * @return Collection */ public static function getCollectionOfAudits($logs): Collection { $logsCollection = collect(); - foreach ($logs as $key => $log) { + foreach ($logs as $log) { $object = null; $link = null; diff --git a/app/Helpers/GenderHelper.php b/app/Helpers/GenderHelper.php index 1d933ed47..44067f05f 100644 --- a/app/Helpers/GenderHelper.php +++ b/app/Helpers/GenderHelper.php @@ -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, diff --git a/app/Helpers/LocaleHelper.php b/app/Helpers/LocaleHelper.php index f28d9495f..6039e2ebf 100644 --- a/app/Helpers/LocaleHelper.php +++ b/app/Helpers/LocaleHelper.php @@ -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), diff --git a/app/Http/Controllers/Contacts/ActivitiesController.php b/app/Http/Controllers/Contacts/ActivitiesController.php index be5255c67..dbbcc6f4c 100644 --- a/app/Http/Controllers/Contacts/ActivitiesController.php +++ b/app/Http/Controllers/Contacts/ActivitiesController.php @@ -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, diff --git a/app/Http/Controllers/ContactsController.php b/app/Http/Controllers/ContactsController.php index 941584fc0..f5e830fa9 100644 --- a/app/Http/Controllers/ContactsController.php +++ b/app/Http/Controllers/ContactsController.php @@ -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('&'); diff --git a/app/Http/Controllers/DAV/Backend/CalDAV/CalDAVBackend.php b/app/Http/Controllers/DAV/Backend/CalDAV/CalDAVBackend.php index 6c80ab2f1..b5d8e4d02 100644 --- a/app/Http/Controllers/DAV/Backend/CalDAV/CalDAVBackend.php +++ b/app/Http/Controllers/DAV/Backend/CalDAV/CalDAVBackend.php @@ -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(); } diff --git a/app/Http/Controllers/DAV/Backend/CardDAV/AddressBookHome.php b/app/Http/Controllers/DAV/Backend/CardDAV/AddressBookHome.php index bb0ed96a9..1215b34df 100644 --- a/app/Http/Controllers/DAV/Backend/CardDAV/AddressBookHome.php +++ b/app/Http/Controllers/DAV/Backend/CardDAV/AddressBookHome.php @@ -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(); } diff --git a/app/Http/Controllers/DAV/Backend/SyncDAVBackend.php b/app/Http/Controllers/DAV/Backend/SyncDAVBackend.php index 2916d0ae8..dfd53f7ff 100644 --- a/app/Http/Controllers/DAV/Backend/SyncDAVBackend.php +++ b/app/Http/Controllers/DAV/Backend/SyncDAVBackend.php @@ -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(); } /** diff --git a/app/Http/Controllers/DashboardController.php b/app/Http/Controllers/DashboardController.php index ffa206ba1..596fef822 100644 --- a/app/Http/Controllers/DashboardController.php +++ b/app/Http/Controllers/DashboardController.php @@ -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); diff --git a/app/Http/Controllers/Settings/ExportController.php b/app/Http/Controllers/Settings/ExportController.php index 251c3d89b..3f8bbcca0 100644 --- a/app/Http/Controllers/Settings/ExportController.php +++ b/app/Http/Controllers/Settings/ExportController.php @@ -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(); } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 1ceb8acfd..944161bfd 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -94,7 +94,7 @@ class Kernel extends HttpKernel * * This forces the listed middleware to always be in the given order. * - * @var array + * @var array */ protected $middlewarePriority = [ \Illuminate\Session\Middleware\StartSession::class, diff --git a/app/Http/Resources/Account/User/User.php b/app/Http/Resources/Account/User/User.php index 7f95667af..6efb717ce 100644 --- a/app/Http/Resources/Account/User/User.php +++ b/app/Http/Resources/Account/User/User.php @@ -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) { diff --git a/app/Http/Resources/Activity/Activity.php b/app/Http/Resources/Activity/Activity.php index 5dc90a3dc..32133216f 100644 --- a/app/Http/Resources/Activity/Activity.php +++ b/app/Http/Resources/Activity/Activity.php @@ -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) { diff --git a/app/Http/Resources/Activity/ActivityType.php b/app/Http/Resources/Activity/ActivityType.php index 0849043c0..cc5004d9a 100644 --- a/app/Http/Resources/Activity/ActivityType.php +++ b/app/Http/Resources/Activity/ActivityType.php @@ -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) { diff --git a/app/Http/Resources/Activity/ActivityTypeCategory.php b/app/Http/Resources/Activity/ActivityTypeCategory.php index 8ec912d8a..5415d5cca 100644 --- a/app/Http/Resources/Activity/ActivityTypeCategory.php +++ b/app/Http/Resources/Activity/ActivityTypeCategory.php @@ -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) { diff --git a/app/Http/Resources/Address/Address.php b/app/Http/Resources/Address/Address.php index 156c94d5c..aa6e142f4 100644 --- a/app/Http/Resources/Address/Address.php +++ b/app/Http/Resources/Address/Address.php @@ -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) { diff --git a/app/Http/Resources/AuditLog/AuditLog.php b/app/Http/Resources/AuditLog/AuditLog.php index 026477b58..665d9d8d6 100644 --- a/app/Http/Resources/AuditLog/AuditLog.php +++ b/app/Http/Resources/AuditLog/AuditLog.php @@ -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) { diff --git a/app/Http/Resources/Call/Call.php b/app/Http/Resources/Call/Call.php index 8467d6454..dee1b8da7 100644 --- a/app/Http/Resources/Call/Call.php +++ b/app/Http/Resources/Call/Call.php @@ -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) { diff --git a/app/Http/Resources/Company/Company.php b/app/Http/Resources/Company/Company.php index 6fb97bd13..e8718e20b 100644 --- a/app/Http/Resources/Company/Company.php +++ b/app/Http/Resources/Company/Company.php @@ -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) { diff --git a/app/Http/Resources/Contact/Contact.php b/app/Http/Resources/Contact/Contact.php index 448102441..4681f72bd 100644 --- a/app/Http/Resources/Contact/Contact.php +++ b/app/Http/Resources/Contact/Contact.php @@ -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) { diff --git a/app/Http/Resources/Contact/ContactSearch.php b/app/Http/Resources/Contact/ContactSearch.php index 787c711d8..0b647e1be 100644 --- a/app/Http/Resources/Contact/ContactSearch.php +++ b/app/Http/Resources/Contact/ContactSearch.php @@ -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) { diff --git a/app/Http/Resources/Contact/ContactShort.php b/app/Http/Resources/Contact/ContactShort.php index 31a32117b..b12151dec 100644 --- a/app/Http/Resources/Contact/ContactShort.php +++ b/app/Http/Resources/Contact/ContactShort.php @@ -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) { diff --git a/app/Http/Resources/Contact/ContactWithContactFields.php b/app/Http/Resources/Contact/ContactWithContactFields.php index 7cc9a330b..4d4b77d82 100644 --- a/app/Http/Resources/Contact/ContactWithContactFields.php +++ b/app/Http/Resources/Contact/ContactWithContactFields.php @@ -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) { diff --git a/app/Http/Resources/ContactField/ContactField.php b/app/Http/Resources/ContactField/ContactField.php index ce6f7a4d5..824312eea 100644 --- a/app/Http/Resources/ContactField/ContactField.php +++ b/app/Http/Resources/ContactField/ContactField.php @@ -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) { diff --git a/app/Http/Resources/ContactField/ContactFieldLabel.php b/app/Http/Resources/ContactField/ContactFieldLabel.php index dc33517f7..727d951b5 100644 --- a/app/Http/Resources/ContactField/ContactFieldLabel.php +++ b/app/Http/Resources/ContactField/ContactFieldLabel.php @@ -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) { diff --git a/app/Http/Resources/Conversation/Conversation.php b/app/Http/Resources/Conversation/Conversation.php index e9f02da5c..8c6e81033 100644 --- a/app/Http/Resources/Conversation/Conversation.php +++ b/app/Http/Resources/Conversation/Conversation.php @@ -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) { diff --git a/app/Http/Resources/Conversation/Message.php b/app/Http/Resources/Conversation/Message.php index 1a7a2e922..b25fd8b10 100644 --- a/app/Http/Resources/Conversation/Message.php +++ b/app/Http/Resources/Conversation/Message.php @@ -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) { diff --git a/app/Http/Resources/Country/Country.php b/app/Http/Resources/Country/Country.php index d2129e3fd..ad0de5cf3 100644 --- a/app/Http/Resources/Country/Country.php +++ b/app/Http/Resources/Country/Country.php @@ -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) { diff --git a/app/Http/Resources/Debt/Debt.php b/app/Http/Resources/Debt/Debt.php index 8294473da..818e519bd 100644 --- a/app/Http/Resources/Debt/Debt.php +++ b/app/Http/Resources/Debt/Debt.php @@ -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) { diff --git a/app/Http/Resources/Document/Document.php b/app/Http/Resources/Document/Document.php index cc273042a..969ecb1b1 100644 --- a/app/Http/Resources/Document/Document.php +++ b/app/Http/Resources/Document/Document.php @@ -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) { diff --git a/app/Http/Resources/Emotion/Emotion.php b/app/Http/Resources/Emotion/Emotion.php index 541b563e7..a68e0f908 100644 --- a/app/Http/Resources/Emotion/Emotion.php +++ b/app/Http/Resources/Emotion/Emotion.php @@ -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) { diff --git a/app/Http/Resources/Gender/Gender.php b/app/Http/Resources/Gender/Gender.php index 08c244586..dbb19b0f8 100644 --- a/app/Http/Resources/Gender/Gender.php +++ b/app/Http/Resources/Gender/Gender.php @@ -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) { diff --git a/app/Http/Resources/Gift/Gift.php b/app/Http/Resources/Gift/Gift.php index 75d388347..86c3de4cf 100644 --- a/app/Http/Resources/Gift/Gift.php +++ b/app/Http/Resources/Gift/Gift.php @@ -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) { diff --git a/app/Http/Resources/Journal/Entry.php b/app/Http/Resources/Journal/Entry.php index e80a7cc42..69f6b8c2f 100644 --- a/app/Http/Resources/Journal/Entry.php +++ b/app/Http/Resources/Journal/Entry.php @@ -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) { diff --git a/app/Http/Resources/LifeEvent/LifeEvent.php b/app/Http/Resources/LifeEvent/LifeEvent.php index 7c0f796a6..1ca038ef7 100644 --- a/app/Http/Resources/LifeEvent/LifeEvent.php +++ b/app/Http/Resources/LifeEvent/LifeEvent.php @@ -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) { diff --git a/app/Http/Resources/LifeEvent/LifeEventCategory.php b/app/Http/Resources/LifeEvent/LifeEventCategory.php index bc326e01e..f80ac8e9b 100644 --- a/app/Http/Resources/LifeEvent/LifeEventCategory.php +++ b/app/Http/Resources/LifeEvent/LifeEventCategory.php @@ -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) { diff --git a/app/Http/Resources/LifeEvent/LifeEventType.php b/app/Http/Resources/LifeEvent/LifeEventType.php index 88d7111f4..4d57aa972 100644 --- a/app/Http/Resources/LifeEvent/LifeEventType.php +++ b/app/Http/Resources/LifeEvent/LifeEventType.php @@ -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) { diff --git a/app/Http/Resources/Note/Note.php b/app/Http/Resources/Note/Note.php index ad0542528..0b0b472dc 100644 --- a/app/Http/Resources/Note/Note.php +++ b/app/Http/Resources/Note/Note.php @@ -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) { diff --git a/app/Http/Resources/Occupation/Occupation.php b/app/Http/Resources/Occupation/Occupation.php index 6c565ae95..6e6854c79 100644 --- a/app/Http/Resources/Occupation/Occupation.php +++ b/app/Http/Resources/Occupation/Occupation.php @@ -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) { diff --git a/app/Http/Resources/Pet/Pet.php b/app/Http/Resources/Pet/Pet.php index ae9c349d6..6ff90afa0 100644 --- a/app/Http/Resources/Pet/Pet.php +++ b/app/Http/Resources/Pet/Pet.php @@ -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) { diff --git a/app/Http/Resources/Pet/PetCategory.php b/app/Http/Resources/Pet/PetCategory.php index f93246345..1415d61e2 100644 --- a/app/Http/Resources/Pet/PetCategory.php +++ b/app/Http/Resources/Pet/PetCategory.php @@ -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) { diff --git a/app/Http/Resources/Photo/Photo.php b/app/Http/Resources/Photo/Photo.php index 765e10f43..8f3c4a2c4 100644 --- a/app/Http/Resources/Photo/Photo.php +++ b/app/Http/Resources/Photo/Photo.php @@ -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) { diff --git a/app/Http/Resources/Place/Place.php b/app/Http/Resources/Place/Place.php index 683893ae0..5a5fdf687 100644 --- a/app/Http/Resources/Place/Place.php +++ b/app/Http/Resources/Place/Place.php @@ -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) { diff --git a/app/Http/Resources/Relationship/Relationship.php b/app/Http/Resources/Relationship/Relationship.php index f2e5e5bf5..82f58d649 100644 --- a/app/Http/Resources/Relationship/Relationship.php +++ b/app/Http/Resources/Relationship/Relationship.php @@ -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) { diff --git a/app/Http/Resources/Relationship/RelationshipShort.php b/app/Http/Resources/Relationship/RelationshipShort.php index 8c262c641..492f7c1b1 100644 --- a/app/Http/Resources/Relationship/RelationshipShort.php +++ b/app/Http/Resources/Relationship/RelationshipShort.php @@ -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) { diff --git a/app/Http/Resources/RelationshipType/RelationshipType.php b/app/Http/Resources/RelationshipType/RelationshipType.php index 2af7d8715..dad0d6e59 100644 --- a/app/Http/Resources/RelationshipType/RelationshipType.php +++ b/app/Http/Resources/RelationshipType/RelationshipType.php @@ -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) { diff --git a/app/Http/Resources/RelationshipTypeGroup/RelationshipTypeGroup.php b/app/Http/Resources/RelationshipTypeGroup/RelationshipTypeGroup.php index 726fafe52..e43c7c13b 100644 --- a/app/Http/Resources/RelationshipTypeGroup/RelationshipTypeGroup.php +++ b/app/Http/Resources/RelationshipTypeGroup/RelationshipTypeGroup.php @@ -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) { diff --git a/app/Http/Resources/Reminder/Reminder.php b/app/Http/Resources/Reminder/Reminder.php index 4c5517d69..3c6048f5d 100644 --- a/app/Http/Resources/Reminder/Reminder.php +++ b/app/Http/Resources/Reminder/Reminder.php @@ -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) { diff --git a/app/Http/Resources/Reminder/ReminderOutbox.php b/app/Http/Resources/Reminder/ReminderOutbox.php index a5f7f6632..6b8ba8f68 100644 --- a/app/Http/Resources/Reminder/ReminderOutbox.php +++ b/app/Http/Resources/Reminder/ReminderOutbox.php @@ -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) { diff --git a/app/Http/Resources/Settings/Compliance/Compliance.php b/app/Http/Resources/Settings/Compliance/Compliance.php index 899092521..633f7c393 100644 --- a/app/Http/Resources/Settings/Compliance/Compliance.php +++ b/app/Http/Resources/Settings/Compliance/Compliance.php @@ -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) { diff --git a/app/Http/Resources/Settings/ContactFieldType/ContactFieldType.php b/app/Http/Resources/Settings/ContactFieldType/ContactFieldType.php index 974635a90..161f22e93 100644 --- a/app/Http/Resources/Settings/ContactFieldType/ContactFieldType.php +++ b/app/Http/Resources/Settings/ContactFieldType/ContactFieldType.php @@ -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) { diff --git a/app/Http/Resources/Settings/Currency/Currency.php b/app/Http/Resources/Settings/Currency/Currency.php index 961dc32ec..57d5763b7 100644 --- a/app/Http/Resources/Settings/Currency/Currency.php +++ b/app/Http/Resources/Settings/Currency/Currency.php @@ -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) { diff --git a/app/Http/Resources/Settings/WebauthnKey/WebauthnKey.php b/app/Http/Resources/Settings/WebauthnKey/WebauthnKey.php index 6c810c38f..3dc813f48 100644 --- a/app/Http/Resources/Settings/WebauthnKey/WebauthnKey.php +++ b/app/Http/Resources/Settings/WebauthnKey/WebauthnKey.php @@ -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) { diff --git a/app/Http/Resources/Tag/Tag.php b/app/Http/Resources/Tag/Tag.php index 20b24e602..3d0bf31b4 100644 --- a/app/Http/Resources/Tag/Tag.php +++ b/app/Http/Resources/Tag/Tag.php @@ -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) { diff --git a/app/Http/Resources/Task/Task.php b/app/Http/Resources/Task/Task.php index 37f0eeb2d..df52ac5c3 100644 --- a/app/Http/Resources/Task/Task.php +++ b/app/Http/Resources/Task/Task.php @@ -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) { diff --git a/app/Jobs/ServiceQueue.php b/app/Jobs/ServiceQueue.php index 44acf1707..579475f36 100644 --- a/app/Jobs/ServiceQueue.php +++ b/app/Jobs/ServiceQueue.php @@ -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'); diff --git a/app/Models/Account/Account.php b/app/Models/Account/Account.php index 4bbb8da23..5dc12a778 100644 --- a/app/Models/Account/Account.php +++ b/app/Models/Account/Account.php @@ -56,10 +56,17 @@ class Account extends Model { use Subscription, HasUuid; + /** + * The attributes that aren't mass assignable. + * + * @var array|bool + */ + protected $guarded = ['id']; + /** * The attributes that are mass assignable. * - * @var array + * @var array */ 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 */ protected $casts = [ 'has_access_to_paid_version_for_free' => 'boolean', diff --git a/app/Models/Account/Activity.php b/app/Models/Account/Activity.php index 5aa78127f..121b8e66a 100644 --- a/app/Models/Account/Activity.php +++ b/app/Models/Account/Activity.php @@ -31,14 +31,14 @@ class Activity extends Model implements IsJournalableInterface /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that should be mutated to dates. * - * @var array + * @var array */ protected $dates = ['happened_at']; diff --git a/app/Models/Account/ActivityStatistic.php b/app/Models/Account/ActivityStatistic.php index f7729fe0f..15f588d2a 100644 --- a/app/Models/Account/ActivityStatistic.php +++ b/app/Models/Account/ActivityStatistic.php @@ -12,7 +12,7 @@ class ActivityStatistic extends Model /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'account_id', diff --git a/app/Models/Account/ActivityType.php b/app/Models/Account/ActivityType.php index 9c8f065b6..f3782ec94 100644 --- a/app/Models/Account/ActivityType.php +++ b/app/Models/Account/ActivityType.php @@ -16,7 +16,7 @@ class ActivityType extends Model /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'name', diff --git a/app/Models/Account/ActivityTypeCategory.php b/app/Models/Account/ActivityTypeCategory.php index 6f22c2b81..c745a1df0 100644 --- a/app/Models/Account/ActivityTypeCategory.php +++ b/app/Models/Account/ActivityTypeCategory.php @@ -18,7 +18,7 @@ class ActivityTypeCategory extends Model /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'name', diff --git a/app/Models/Account/AddressBook.php b/app/Models/Account/AddressBook.php index f0bc5d057..94d520727 100644 --- a/app/Models/Account/AddressBook.php +++ b/app/Models/Account/AddressBook.php @@ -19,7 +19,7 @@ class AddressBook extends Model /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'account_id', @@ -31,14 +31,14 @@ class AddressBook extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that should be cast to native types. * - * @var array + * @var array */ protected $casts = [ ]; diff --git a/app/Models/Account/AddressBookSubscription.php b/app/Models/Account/AddressBookSubscription.php index 7871dd077..987f245b1 100644 --- a/app/Models/Account/AddressBookSubscription.php +++ b/app/Models/Account/AddressBookSubscription.php @@ -21,7 +21,7 @@ class AddressBookSubscription extends Model /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'account_id', @@ -43,14 +43,14 @@ class AddressBookSubscription extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that should be mutated to dates. * - * @var array + * @var array */ 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 */ protected $casts = [ 'readonly' => 'boolean', diff --git a/app/Models/Account/Company.php b/app/Models/Account/Company.php index 55383ceca..60f1a5a82 100644 --- a/app/Models/Account/Company.php +++ b/app/Models/Account/Company.php @@ -14,7 +14,7 @@ class Company extends Model /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'weather_json', @@ -27,7 +27,7 @@ class Company extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/Account/ExportJob.php b/app/Models/Account/ExportJob.php index 19d77cf21..22f2e823d 100644 --- a/app/Models/Account/ExportJob.php +++ b/app/Models/Account/ExportJob.php @@ -35,7 +35,7 @@ class ExportJob extends Model /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'uuid', @@ -52,14 +52,14 @@ class ExportJob extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that should be mutated to dates. * - * @var array + * @var array */ protected $dates = [ 'started_at', diff --git a/app/Models/Account/ImportJob.php b/app/Models/Account/ImportJob.php index ff333c247..5e7ce643f 100644 --- a/app/Models/Account/ImportJob.php +++ b/app/Models/Account/ImportJob.php @@ -55,14 +55,14 @@ class ImportJob extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that should be mutated to dates. * - * @var array + * @var array */ protected $dates = ['started_at', 'ended_at']; diff --git a/app/Models/Account/ImportJobReport.php b/app/Models/Account/ImportJobReport.php index b4f465690..f634669cd 100644 --- a/app/Models/Account/ImportJobReport.php +++ b/app/Models/Account/ImportJobReport.php @@ -23,7 +23,7 @@ class ImportJobReport extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/Account/Invitation.php b/app/Models/Account/Invitation.php index 6a245e8b5..25de4cc63 100644 --- a/app/Models/Account/Invitation.php +++ b/app/Models/Account/Invitation.php @@ -19,7 +19,7 @@ class Invitation extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/Account/Photo.php b/app/Models/Account/Photo.php index 76b50c046..b1adc8e1b 100644 --- a/app/Models/Account/Photo.php +++ b/app/Models/Account/Photo.php @@ -26,7 +26,7 @@ class Photo extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/Account/Place.php b/app/Models/Account/Place.php index c3bfefd18..bb1bde813 100644 --- a/app/Models/Account/Place.php +++ b/app/Models/Account/Place.php @@ -26,7 +26,7 @@ class Place extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/Account/Weather.php b/app/Models/Account/Weather.php index 3705623cc..b696ecdbf 100644 --- a/app/Models/Account/Weather.php +++ b/app/Models/Account/Weather.php @@ -16,7 +16,7 @@ class Weather extends Model /** * The attributes that are mass assignable. * - * @var array + * @var array */ 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 */ protected $casts = [ 'weather_json' => 'array', @@ -36,7 +36,7 @@ class Weather extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/Contact/Address.php b/app/Models/Contact/Address.php index 31e0bbf88..dbf2bc664 100644 --- a/app/Models/Contact/Address.php +++ b/app/Models/Contact/Address.php @@ -21,7 +21,7 @@ class Address extends Model implements LabelInterface /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/Contact/Call.php b/app/Models/Contact/Call.php index cf31ae495..851d7ada8 100644 --- a/app/Models/Contact/Call.php +++ b/app/Models/Contact/Call.php @@ -19,21 +19,21 @@ class Call extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that should be mutated to dates. * - * @var array + * @var array */ protected $dates = ['called_at']; /** * The attributes that should be cast to native types. * - * @var array + * @var array */ protected $casts = [ 'contact_called' => 'boolean', diff --git a/app/Models/Contact/Contact.php b/app/Models/Contact/Contact.php index 299b7e329..e8f94d8c4 100644 --- a/app/Models/Contact/Contact.php +++ b/app/Models/Contact/Contact.php @@ -130,7 +130,7 @@ class Contact extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|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 */ protected $casts = [ 'is_partial' => 'boolean', diff --git a/app/Models/Contact/ContactField.php b/app/Models/Contact/ContactField.php index d95d161ab..5d2b0f3e9 100644 --- a/app/Models/Contact/ContactField.php +++ b/app/Models/Contact/ContactField.php @@ -16,7 +16,7 @@ class ContactField extends Model implements LabelInterface /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/Contact/ContactFieldLabel.php b/app/Models/Contact/ContactFieldLabel.php index d5d2308b5..53544aaf9 100644 --- a/app/Models/Contact/ContactFieldLabel.php +++ b/app/Models/Contact/ContactFieldLabel.php @@ -15,7 +15,7 @@ class ContactFieldLabel extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/Contact/ContactFieldType.php b/app/Models/Contact/ContactFieldType.php index 73f7723e2..b5eb98a95 100644 --- a/app/Models/Contact/ContactFieldType.php +++ b/app/Models/Contact/ContactFieldType.php @@ -15,7 +15,7 @@ class ContactFieldType extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|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 */ protected $casts = [ 'delible' => 'boolean', diff --git a/app/Models/Contact/Conversation.php b/app/Models/Contact/Conversation.php index 9b44cc9e4..5982946b1 100644 --- a/app/Models/Contact/Conversation.php +++ b/app/Models/Contact/Conversation.php @@ -15,14 +15,14 @@ class Conversation extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that should be mutated to dates. * - * @var array + * @var array */ protected $dates = ['happened_at']; diff --git a/app/Models/Contact/Debt.php b/app/Models/Contact/Debt.php index 2cfa899bb..710e261e8 100644 --- a/app/Models/Contact/Debt.php +++ b/app/Models/Contact/Debt.php @@ -26,7 +26,7 @@ class Debt extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/Contact/Document.php b/app/Models/Contact/Document.php index 20a07ca5e..5f191760d 100644 --- a/app/Models/Contact/Document.php +++ b/app/Models/Contact/Document.php @@ -25,14 +25,14 @@ class Document extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that should be cast to native types. * - * @var array + * @var array */ protected $casts = [ 'number_of_downloads' => 'integer', diff --git a/app/Models/Contact/Gender.php b/app/Models/Contact/Gender.php index 07b03da8d..a7b892bc9 100644 --- a/app/Models/Contact/Gender.php +++ b/app/Models/Contact/Gender.php @@ -15,14 +15,14 @@ class Gender extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'name', diff --git a/app/Models/Contact/Gift.php b/app/Models/Contact/Gift.php index d51b36be6..7d98f9624 100644 --- a/app/Models/Contact/Gift.php +++ b/app/Models/Contact/Gift.php @@ -31,14 +31,14 @@ class Gift extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that should be mutated to dates. * - * @var array + * @var array */ protected $dates = [ 'date', @@ -47,7 +47,7 @@ class Gift extends Model /** * The attributes that should be cast to native types. * - * @var array + * @var array */ protected $casts = [ ]; diff --git a/app/Models/Contact/LifeEvent.php b/app/Models/Contact/LifeEvent.php index 493d5f436..c71afbd35 100644 --- a/app/Models/Contact/LifeEvent.php +++ b/app/Models/Contact/LifeEvent.php @@ -16,14 +16,14 @@ class LifeEvent extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'name', @@ -40,14 +40,14 @@ class LifeEvent extends Model /** * The attributes that should be mutated to dates. * - * @var array + * @var array */ protected $dates = ['happened_at']; /** * The attributes that should be cast to native types. * - * @var array + * @var array */ protected $casts = [ 'happened_at_month_unknown' => 'boolean', diff --git a/app/Models/Contact/LifeEventCategory.php b/app/Models/Contact/LifeEventCategory.php index e23aac2bb..3442ecadc 100644 --- a/app/Models/Contact/LifeEventCategory.php +++ b/app/Models/Contact/LifeEventCategory.php @@ -17,7 +17,7 @@ class LifeEventCategory extends Model /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'name', @@ -29,7 +29,7 @@ class LifeEventCategory extends Model /** * The attributes that should be cast to native types. * - * @var array + * @var array */ protected $casts = [ 'core_monica_data' => 'boolean', diff --git a/app/Models/Contact/LifeEventType.php b/app/Models/Contact/LifeEventType.php index c17ffadab..e6a681457 100644 --- a/app/Models/Contact/LifeEventType.php +++ b/app/Models/Contact/LifeEventType.php @@ -17,7 +17,7 @@ class LifeEventType extends Model /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'name', @@ -30,7 +30,7 @@ class LifeEventType extends Model /** * The attributes that should be cast to native types. * - * @var array + * @var array */ protected $casts = [ 'core_monica_data' => 'boolean', diff --git a/app/Models/Contact/Message.php b/app/Models/Contact/Message.php index 8e98b3344..8c4d5056d 100644 --- a/app/Models/Contact/Message.php +++ b/app/Models/Contact/Message.php @@ -14,21 +14,21 @@ class Message extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that should be mutated to dates. * - * @var array + * @var array */ protected $dates = ['written_at']; /** * The attributes that should be cast to native types. * - * @var array + * @var array */ protected $casts = [ 'written_by_me' => 'boolean', diff --git a/app/Models/Contact/Note.php b/app/Models/Contact/Note.php index 594b3dc9b..06435db01 100644 --- a/app/Models/Contact/Note.php +++ b/app/Models/Contact/Note.php @@ -24,14 +24,14 @@ class Note extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that should be cast to native types. * - * @var array + * @var array */ protected $casts = [ 'is_favorited' => 'boolean', @@ -44,7 +44,7 @@ class Note extends Model /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'account_id', diff --git a/app/Models/Contact/Occupation.php b/app/Models/Contact/Occupation.php index fe78501b1..ea44c856f 100644 --- a/app/Models/Contact/Occupation.php +++ b/app/Models/Contact/Occupation.php @@ -14,7 +14,7 @@ class Occupation extends Model /** * The attributes that are mass assignable. * - * @var array + * @var array */ 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 */ 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|bool */ protected $guarded = ['id']; diff --git a/app/Models/Contact/Pet.php b/app/Models/Contact/Pet.php index dd538adff..fdbb9db79 100644 --- a/app/Models/Contact/Pet.php +++ b/app/Models/Contact/Pet.php @@ -14,7 +14,7 @@ class Pet extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/Contact/PetCategory.php b/app/Models/Contact/PetCategory.php index 12399b768..536b08769 100644 --- a/app/Models/Contact/PetCategory.php +++ b/app/Models/Contact/PetCategory.php @@ -9,7 +9,7 @@ class PetCategory extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/Contact/Reminder.php b/app/Models/Contact/Reminder.php index 901ce835e..a38e54cb5 100644 --- a/app/Models/Contact/Reminder.php +++ b/app/Models/Contact/Reminder.php @@ -26,14 +26,14 @@ class Reminder extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that should be cast to native types. * - * @var array + * @var array */ protected $casts = [ 'is_birthday' => 'boolean', diff --git a/app/Models/Contact/ReminderOutbox.php b/app/Models/Contact/ReminderOutbox.php index ff90ed6b4..515bcc358 100644 --- a/app/Models/Contact/ReminderOutbox.php +++ b/app/Models/Contact/ReminderOutbox.php @@ -26,14 +26,14 @@ class ReminderOutbox extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that should be mutated to dates. * - * @var array + * @var array */ protected $dates = [ 'planned_date', diff --git a/app/Models/Contact/ReminderRule.php b/app/Models/Contact/ReminderRule.php index ea3eafda1..5d1223cb5 100644 --- a/app/Models/Contact/ReminderRule.php +++ b/app/Models/Contact/ReminderRule.php @@ -11,7 +11,7 @@ class ReminderRule extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|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 */ protected $casts = [ 'active' => 'boolean', diff --git a/app/Models/Contact/Tag.php b/app/Models/Contact/Tag.php index 9e5b5d685..0ffb8a65e 100644 --- a/app/Models/Contact/Tag.php +++ b/app/Models/Contact/Tag.php @@ -11,14 +11,14 @@ class Tag extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'name', diff --git a/app/Models/Contact/Task.php b/app/Models/Contact/Task.php index 4ede1cc71..1be25be10 100644 --- a/app/Models/Contact/Task.php +++ b/app/Models/Contact/Task.php @@ -25,14 +25,14 @@ class Task extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that should be mutated to dates. * - * @var array + * @var array */ 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 */ protected $casts = [ 'completed' => 'boolean', diff --git a/app/Models/Instance/AuditLog.php b/app/Models/Instance/AuditLog.php index e99c0bf17..05dcc8490 100644 --- a/app/Models/Instance/AuditLog.php +++ b/app/Models/Instance/AuditLog.php @@ -16,7 +16,7 @@ class AuditLog extends Model /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'account_id', @@ -32,7 +32,7 @@ class AuditLog extends Model /** * The attributes that should be mutated to dates. * - * @var array + * @var array */ 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 */ 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) { diff --git a/app/Models/Instance/Cron.php b/app/Models/Instance/Cron.php index fd222c205..615631e24 100644 --- a/app/Models/Instance/Cron.php +++ b/app/Models/Instance/Cron.php @@ -9,7 +9,7 @@ class Cron extends Model /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'command', @@ -19,7 +19,7 @@ class Cron extends Model /** * The attributes that should be cast to native types. * - * @var array + * @var array */ protected $casts = [ 'last_run' => 'datetime', diff --git a/app/Models/Instance/Emotion/Emotion.php b/app/Models/Instance/Emotion/Emotion.php index 32ef31c34..92d3f4f91 100644 --- a/app/Models/Instance/Emotion/Emotion.php +++ b/app/Models/Instance/Emotion/Emotion.php @@ -21,7 +21,7 @@ class Emotion extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/Instance/Emotion/PrimaryEmotion.php b/app/Models/Instance/Emotion/PrimaryEmotion.php index 51e84ce12..fd2602281 100644 --- a/app/Models/Instance/Emotion/PrimaryEmotion.php +++ b/app/Models/Instance/Emotion/PrimaryEmotion.php @@ -18,7 +18,7 @@ class PrimaryEmotion extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/Instance/Emotion/SecondaryEmotion.php b/app/Models/Instance/Emotion/SecondaryEmotion.php index 7b2ce7f2e..1b6f8d981 100644 --- a/app/Models/Instance/Emotion/SecondaryEmotion.php +++ b/app/Models/Instance/Emotion/SecondaryEmotion.php @@ -19,7 +19,7 @@ class SecondaryEmotion extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/Instance/SpecialDate.php b/app/Models/Instance/SpecialDate.php index e612da314..486b9472f 100644 --- a/app/Models/Instance/SpecialDate.php +++ b/app/Models/Instance/SpecialDate.php @@ -39,7 +39,7 @@ class SpecialDate extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; @@ -53,14 +53,14 @@ class SpecialDate extends Model /** * The attributes that should be mutated to dates. * - * @var array + * @var array */ protected $dates = ['date']; /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'contact_id', @@ -70,7 +70,7 @@ class SpecialDate extends Model /** * The attributes that should be cast to native types. * - * @var array + * @var array */ protected $casts = [ 'is_age_based' => 'boolean', diff --git a/app/Models/Journal/Day.php b/app/Models/Journal/Day.php index e847a81ae..0809e5c12 100644 --- a/app/Models/Journal/Day.php +++ b/app/Models/Journal/Day.php @@ -16,7 +16,7 @@ class Day extends Model implements IsJournalableInterface /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/Journal/Entry.php b/app/Models/Journal/Entry.php index 88a0affb1..fd124b3f4 100644 --- a/app/Models/Journal/Entry.php +++ b/app/Models/Journal/Entry.php @@ -22,14 +22,14 @@ class Entry extends Model implements IsJournalableInterface /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'account_id', diff --git a/app/Models/Journal/JournalEntry.php b/app/Models/Journal/JournalEntry.php index 772ba9fbb..f3f10e9a9 100644 --- a/app/Models/Journal/JournalEntry.php +++ b/app/Models/Journal/JournalEntry.php @@ -25,7 +25,7 @@ class JournalEntry extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/Relationship/Relationship.php b/app/Models/Relationship/Relationship.php index 48dac7098..590d57053 100644 --- a/app/Models/Relationship/Relationship.php +++ b/app/Models/Relationship/Relationship.php @@ -28,7 +28,7 @@ class Relationship extends Model /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'account_id', diff --git a/app/Models/Relationship/RelationshipType.php b/app/Models/Relationship/RelationshipType.php index f6fe8ce8d..53ae47ea6 100644 --- a/app/Models/Relationship/RelationshipType.php +++ b/app/Models/Relationship/RelationshipType.php @@ -14,7 +14,7 @@ class RelationshipType extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; @@ -23,7 +23,7 @@ class RelationshipType extends Model /** * The attributes that should be cast to native types. * - * @var array + * @var array */ protected $casts = [ 'delible' => 'boolean', diff --git a/app/Models/Relationship/RelationshipTypeGroup.php b/app/Models/Relationship/RelationshipTypeGroup.php index 07ddd01a4..b27ac7439 100644 --- a/app/Models/Relationship/RelationshipTypeGroup.php +++ b/app/Models/Relationship/RelationshipTypeGroup.php @@ -11,7 +11,7 @@ class RelationshipTypeGroup extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; @@ -20,7 +20,7 @@ class RelationshipTypeGroup extends Model /** * The attributes that should be cast to native types. * - * @var array + * @var array */ protected $casts = [ 'delible' => 'boolean', diff --git a/app/Models/Settings/Term.php b/app/Models/Settings/Term.php index 4c4fc371f..19dd09bf4 100644 --- a/app/Models/Settings/Term.php +++ b/app/Models/Settings/Term.php @@ -10,7 +10,7 @@ class Term extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; diff --git a/app/Models/User/Changelog.php b/app/Models/User/Changelog.php index 06e1961a6..06f020248 100644 --- a/app/Models/User/Changelog.php +++ b/app/Models/User/Changelog.php @@ -11,14 +11,14 @@ class Changelog extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that should be mutated to dates. * - * @var array + * @var array */ protected $dates = [ 'created_at', diff --git a/app/Models/User/Module.php b/app/Models/User/Module.php index 740eef7a7..807ecb0c9 100644 --- a/app/Models/User/Module.php +++ b/app/Models/User/Module.php @@ -15,14 +15,14 @@ class Module extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that should be cast to native types. * - * @var array + * @var array */ protected $casts = [ 'active' => 'boolean', diff --git a/app/Models/User/RecoveryCode.php b/app/Models/User/RecoveryCode.php index 3bd5a4363..1a5adbf72 100644 --- a/app/Models/User/RecoveryCode.php +++ b/app/Models/User/RecoveryCode.php @@ -12,7 +12,7 @@ class RecoveryCode extends Model /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'account_id', diff --git a/app/Models/User/SyncToken.php b/app/Models/User/SyncToken.php index 0f76105ec..6416fdede 100644 --- a/app/Models/User/SyncToken.php +++ b/app/Models/User/SyncToken.php @@ -11,14 +11,14 @@ class SyncToken extends Model /** * The attributes that aren't mass assignable. * - * @var array + * @var array|bool */ protected $guarded = ['id']; /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'account_id', diff --git a/app/Models/User/User.php b/app/Models/User/User.php index ca2158b59..3f0dd2082 100644 --- a/app/Models/User/User.php +++ b/app/Models/User/User.php @@ -28,7 +28,7 @@ class User extends Authenticatable implements MustVerifyEmail, HasLocalePreferen /** * The attributes that are mass assignable. * - * @var array + * @var array */ protected $fillable = [ 'first_name', @@ -52,7 +52,7 @@ class User extends Authenticatable implements MustVerifyEmail, HasLocalePreferen /** * The attributes that should be hidden for arrays. * - * @var array + * @var array */ protected $hidden = [ 'password', 'remember_token', 'google2fa_secret', @@ -61,7 +61,7 @@ class User extends Authenticatable implements MustVerifyEmail, HasLocalePreferen /** * The attributes that should be cast to native types. * - * @var array + * @var array */ protected $casts = [ 'profile_new_life_event_badge_seen' => 'boolean', diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 264f10bf5..60cd0825e 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -11,7 +11,7 @@ class AuthServiceProvider extends ServiceProvider /** * The policy mappings for the application. * - * @var array + * @var array */ protected $policies = [ 'App\Model' => 'App\Policies\ModelPolicy', diff --git a/tests/Commands/PingVersionServerTest.php b/tests/Commands/PingVersionServerTest.php index de3ca2251..99b56a403 100644 --- a/tests/Commands/PingVersionServerTest.php +++ b/tests/Commands/PingVersionServerTest.php @@ -16,6 +16,7 @@ class PingVersionServerTest extends TestCase { config(['monica.weekly_ping_server_url' => 'https://version.test/ping']); config(['monica.app_version' => '2.9.0']); + config(['monica.check_version' => true]); Instance::all()->each(function ($instance) { $instance->delete();