chore(deps): upgrade dependencies (#7395)

This commit is contained in:
Alexis Saettler
2024-10-06 18:33:02 +02:00
committed by GitHub
parent c900b4af72
commit a2492ed820
481 changed files with 4509 additions and 4325 deletions
-3
View File
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx lint-staged
+1
View File
@@ -3,3 +3,4 @@ storage
vendor
node_modules
composer.lock
.yarn/*
-893
View File
File diff suppressed because one or more lines are too long
+925
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -2,4 +2,4 @@ checksumBehavior: update
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-4.1.1.cjs
yarnPath: .yarn/releases/yarn-4.5.0.cjs
@@ -34,8 +34,7 @@ class AttemptToAuthenticateSocialite
public function __construct(
protected StatefulGuard $guard,
protected LoginRateLimiter $limiter
) {
}
) {}
/**
* Handle the incoming request.
@@ -21,8 +21,7 @@ class AttemptToAuthenticateWebauthn
public function __construct(
protected StatefulGuard $guard,
protected LoginRateLimiter $limiter
) {
}
) {}
/**
* Handle the incoming request.
@@ -20,8 +20,7 @@ class RedirectIfTwoFactorAuthenticatable
public function __construct(
protected StatefulGuard $guard,
protected LoginRateLimiter $limiter
) {
}
) {}
/**
* Handle the incoming request.
@@ -42,7 +42,7 @@ class MonicaLocalize extends Command
*/
public function handle(): void
{
$this->googleTranslate = (new GoogleTranslate())->setSource('en');
$this->googleTranslate = (new GoogleTranslate)->setSource('en');
$locales = $langs = config('localizer.supported_locales');
@@ -136,7 +136,7 @@ class SetupDummyAccount extends Command
$this->info('☐ Create vaults');
for ($i = 0; $i < rand(3, 5); $i++) {
(new CreateVault())->execute([
(new CreateVault)->execute([
'account_id' => $this->firstUser->account_id,
'author_id' => $this->firstUser->id,
'type' => Vault::TYPE_PERSONAL,
@@ -155,7 +155,7 @@ class SetupDummyAccount extends Command
$date = $this->faker->dateTimeThisCentury();
$birthDate = Carbon::parse($date);
$contact = (new CreateContact())->execute([
$contact = (new CreateContact)->execute([
'account_id' => $this->firstUser->account_id,
'author_id' => $this->firstUser->id,
'vault_id' => $vault->id,
@@ -167,7 +167,7 @@ class SetupDummyAccount extends Command
'listed' => true,
]);
(new CreateContactImportantDate())->execute([
(new CreateContactImportantDate)->execute([
'account_id' => $this->firstUser->account_id,
'author_id' => $this->firstUser->id,
'vault_id' => $vault->id,
@@ -188,7 +188,7 @@ class SetupDummyAccount extends Command
foreach (Contact::all() as $contact) {
for ($i = 0; $i < 4; $i++) {
(new CreateNote())->execute([
(new CreateNote)->execute([
'account_id' => $this->firstUser->account_id,
'author_id' => $this->firstUser->id,
'vault_id' => $contact->vault_id,
@@ -206,7 +206,7 @@ class SetupDummyAccount extends Command
foreach (Contact::all() as $contact) {
for ($i = 0; $i < 4; $i++) {
(new CreateContactTask())->execute([
(new CreateContactTask)->execute([
'account_id' => $this->firstUser->account_id,
'author_id' => $this->firstUser->id,
'vault_id' => $contact->vault_id,
@@ -231,7 +231,7 @@ class SetupDummyAccount extends Command
foreach (Contact::all() as $contact) {
foreach ($goals->take(rand(1, 4)) as $goal) {
$goal = (new CreateGoal())->execute([
$goal = (new CreateGoal)->execute([
'account_id' => $this->firstUser->account_id,
'author_id' => $this->firstUser->id,
'vault_id' => $contact->vault_id,
@@ -245,7 +245,7 @@ class SetupDummyAccount extends Command
$date = $date->addDays(rand(1, 3));
try {
(new ToggleStreak())->execute([
(new ToggleStreak)->execute([
'account_id' => $this->firstUser->account_id,
'author_id' => $this->firstUser->id,
'vault_id' => $contact->vault_id,
@@ -275,7 +275,7 @@ class SetupDummyAccount extends Command
foreach (Vault::all() as $vault) {
foreach ($journals->take(rand(1, 4)) as $journal) {
$journal = (new CreateJournal())->execute([
$journal = (new CreateJournal)->execute([
'account_id' => $this->firstUser->account_id,
'author_id' => $this->firstUser->id,
'vault_id' => $vault->id,
@@ -284,7 +284,7 @@ class SetupDummyAccount extends Command
]);
for ($j = 0; $j < rand(1, 20); $j++) {
(new CreatePost())->execute([
(new CreatePost)->execute([
'account_id' => $this->firstUser->account_id,
'author_id' => $this->firstUser->id,
'vault_id' => $vault->id,
+1 -1
View File
@@ -60,7 +60,7 @@ class TestReminders extends Command
}
try {
(new RescheduleContactReminderForChannel())->execute([
(new RescheduleContactReminderForChannel)->execute([
'contact_reminder_id' => $scheduledReminder->contact_reminder_id,
'user_notification_channel_id' => $scheduledReminder->user_notification_channel_id,
'contact_reminder_scheduled_id' => $scheduledReminder->id,
@@ -19,6 +19,5 @@ class TokenDeleteEvent
*/
public function __construct(
public SyncToken $token
) {
}
) {}
}
+1 -3
View File
@@ -2,6 +2,4 @@
namespace App\Domains\Contact\Dav;
interface ImportResource
{
}
interface ImportResource {}
+1 -2
View File
@@ -11,8 +11,7 @@ class Order
{
public function __construct(
public int $order,
) {
}
) {}
/**
* Get order value from a reflection class.
@@ -61,7 +61,7 @@ class ExportVCard extends BaseService implements ServiceInterface
} elseif (isset($data['group_id'])) {
$obj = $this->group;
} else {
throw new ModelNotFoundException();
throw new ModelNotFoundException;
}
$vcard = $this->export($obj);
@@ -123,7 +123,7 @@ class ExportVCard extends BaseService implements ServiceInterface
'group' => $vcard,
]);
} else {
throw new ModelNotFoundException();
throw new ModelNotFoundException;
}
}
+1 -1
View File
@@ -45,7 +45,7 @@ class GetEtag extends BaseService implements ServiceInterface
$entry = $data['entry'];
if ($entry->vault_id !== $this->vault->id) {
throw new ModelNotFoundException();
throw new ModelNotFoundException;
}
return $entry->distant_etag ?? '"'.hash('sha256', $entry->vcard).'"';
@@ -260,7 +260,7 @@ class CardDAVBackend extends AbstractBackend implements IDAVBackend, SyncSupport
->find($collectionId);
if (! $vault) {
throw new NotEnoughPermissionException();
throw new NotEnoughPermissionException;
}
return Contact::firstWhere([
@@ -12,8 +12,7 @@ class PrincipalBackend extends AbstractBackend
{
public function __construct(
private User $user
) {
}
) {}
/**
* This is the prefix that will be used to generate principal urls.
@@ -96,9 +95,7 @@ class PrincipalBackend extends AbstractBackend
* @param string $path
* @param \Sabre\DAV\PropPatch $propPatch
*/
public function updatePrincipal($path, DAV\PropPatch $propPatch): void
{
}
public function updatePrincipal($path, DAV\PropPatch $propPatch): void {}
/**
* This method is used to search for principals matching a set of
@@ -188,7 +185,5 @@ class PrincipalBackend extends AbstractBackend
*
* @param string $principal
*/
public function setGroupMemberSet($principal, array $members): void
{
}
public function setGroupMemberSet($principal, array $members): void {}
}
@@ -6,8 +6,8 @@ use App\Models\AddressBookSubscription;
use Carbon\Carbon;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Support\Collection;
class UpdateAddressBooks implements ShouldQueue
{
@@ -26,8 +26,6 @@ class UpdateAddressBooks implements ShouldQueue
/**
* Manage the subscriptions.
*
* @param Collection<array-key,AddressBookSubscription> $subscriptions
*/
private function manageSubscriptions(Collection $subscriptions, Carbon $now): void
{
@@ -62,7 +62,7 @@ class SynchronizeAddressBook extends BaseService
$this->subscription = AddressBookSubscription::findOrFail($data['addressbook_subscription_id']);
if ($this->subscription->user->account_id !== $data['account_id']) {
throw new ModelNotFoundException();
throw new ModelNotFoundException;
}
// TODO: check if account is limited
@@ -403,9 +403,9 @@ class DavClient
*/
public function propPatch(array $properties, string $url = ''): bool
{
$propPatch = new PropPatch();
$propPatch = new PropPatch;
$propPatch->properties = $properties;
$body = (new Service())->write(
$body = (new Service)->write(
'{DAV:}propertyupdate',
$propPatch
);
@@ -524,7 +524,7 @@ class DavClient
*/
private static function parseMultiStatus(string $body): array
{
$multistatus = (new Service())
$multistatus = (new Service)
->expect('{DAV:}multistatus', $body);
$result = [];
@@ -4,6 +4,4 @@ namespace App\Domains\Contact\DavClient\Services\Utils\Dav;
use Exception;
class DavClientException extends Exception
{
}
class DavClientException extends Exception {}
@@ -2,6 +2,4 @@
namespace App\Domains\Contact\DavClient\Services\Utils\Dav;
class DavServerNotCompliantException extends DavClientException
{
}
class DavServerNotCompliantException extends DavClientException {}
@@ -61,7 +61,7 @@ class ServiceUrlQuery
*/
private function getUri(array $entry, bool $https): string
{
$uri = (new Uri())
$uri = (new Uri)
->withScheme($https ? 'https' : 'http')
->withPort($entry['port'])
->withHost($entry['target']);
@@ -2,6 +2,4 @@
namespace App\Domains\Contact\DavClient\Services\Utils\Model;
class ContactDeleteDto extends ContactDto
{
}
class ContactDeleteDto extends ContactDto {}
@@ -10,6 +10,5 @@ class ContactDto
public function __construct(
public string $uri,
public ?string $etag = null
) {
}
) {}
}
@@ -28,7 +28,7 @@ class ModuleAvatarController extends Controller
'type' => File::TYPE_AVATAR,
];
$file = (new UploadFile())->execute($data);
$file = (new UploadFile)->execute($data);
$data = [
'account_id' => Auth::user()->account_id,
@@ -38,7 +38,7 @@ class ModuleAvatarController extends Controller
'file_id' => $file->id,
];
(new UpdatePhotoAsAvatar())->execute($data);
(new UpdatePhotoAsAvatar)->execute($data);
return response()->json([
'data' => route('contact.show', [
@@ -57,7 +57,7 @@ class ModuleAvatarController extends Controller
'contact_id' => $contactId,
];
(new DestroyAvatar())->execute($data);
(new DestroyAvatar)->execute($data);
return response()->json([
'data' => route('contact.show', [
@@ -57,7 +57,7 @@ class ContactModuleCallController extends Controller
'who_initiated' => $whoInitiated,
];
$call = (new CreateCall())->execute($data);
$call = (new CreateCall)->execute($data);
$contact = Contact::find($contactId);
return response()->json([
@@ -112,7 +112,7 @@ class ContactModuleCallController extends Controller
'who_initiated' => $whoInitiated,
];
$call = (new UpdateCall())->execute($data);
$call = (new UpdateCall)->execute($data);
$contact = Contact::find($contactId);
return response()->json([
@@ -130,7 +130,7 @@ class ContactModuleCallController extends Controller
'call_id' => $callId,
];
(new DestroyCall())->execute($data);
(new DestroyCall)->execute($data);
return response()->json([
'data' => true,
@@ -104,7 +104,7 @@ class ImportContact extends Importer implements ImportVCardResource
}
if ($contact !== null && $contact->vault_id !== $this->vault()->id) {
throw new ModelNotFoundException();
throw new ModelNotFoundException;
}
return $contact;
@@ -70,13 +70,13 @@ class CopyContactToAnotherVault extends BaseService implements ServiceInterface
->exists();
if (! $exists) {
throw new NotEnoughPermissionException();
throw new NotEnoughPermissionException;
}
}
private function copy(): void
{
$this->newContact = new Contact();
$this->newContact = new Contact;
$this->newContact = $this->contact->replicate();
$this->newContact->vault_id = $this->newVault->id;
@@ -42,7 +42,7 @@ class DestroyContact extends QueuableService implements ServiceInterface
$this->validateRules($data);
if (! $this->contact->can_be_deleted) {
throw new CantBeDeletedException();
throw new CantBeDeletedException;
}
$this->destroyFiles();
@@ -70,7 +70,7 @@ class MoveContactToAnotherVault extends BaseService implements ServiceInterface
->exists();
if (! $exists) {
throw new NotEnoughPermissionException();
throw new NotEnoughPermissionException;
}
}
@@ -94,7 +94,7 @@ class MoveContactToAnotherVault extends BaseService implements ServiceInterface
$this->contact->company->vault_id = $this->newVault->id;
$this->contact->company->save();
} else {
$newCompany = (new CreateCompany())->execute([
$newCompany = (new CreateCompany)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'vault_id' => $this->newVault->id,
@@ -18,7 +18,7 @@ class ContactArchiveController extends Controller
'contact_id' => $contactId,
];
(new ToggleArchiveContact())->execute($data);
(new ToggleArchiveContact)->execute($data);
return response()->json([
'data' => route('contact.show', [
@@ -83,7 +83,7 @@ class ContactController extends Controller
'listed' => true,
];
$contact = (new CreateContact())->execute($data);
$contact = (new CreateContact)->execute($data);
return response()->json([
'data' => route('contact.show', [
@@ -112,7 +112,7 @@ class ContactController extends Controller
]);
}
(new UpdateContactView())->execute([
(new UpdateContactView)->execute([
'account_id' => Auth::user()->account_id,
'vault_id' => $vaultId,
'author_id' => Auth::id(),
@@ -154,7 +154,7 @@ class ContactController extends Controller
'suffix' => $request->input('suffix'),
];
$contact = (new UpdateContact())->execute($data);
$contact = (new UpdateContact)->execute($data);
return response()->json([
'data' => route('contact.show', [
@@ -20,7 +20,7 @@ class ContactFavoriteController extends Controller
'contact_id' => $contactId,
];
(new ToggleFavoriteContact())->execute($data);
(new ToggleFavoriteContact)->execute($data);
$contact = Contact::find($contactId);
@@ -36,7 +36,7 @@ class ContactMoveController extends Controller
'contact_id' => $contactId,
];
(new MoveContactToAnotherVault())->execute($data);
(new MoveContactToAnotherVault)->execute($data);
return Redirect::route('contact.show', [
'vault' => $request->input('other_vault_id'),
@@ -38,7 +38,7 @@ class ContactPageController extends Controller
->where('template_id', $contact->template_id)
->firstOrFail();
(new UpdateContactView())->execute([
(new UpdateContactView)->execute([
'account_id' => Auth::user()->account_id,
'vault_id' => $vaultId,
'author_id' => Auth::id(),
@@ -20,7 +20,7 @@ class ContactSortController extends Controller
'sort_order' => $request->input('sort_order'),
];
(new UpdateContactSortOrder())->execute($data);
(new UpdateContactSortOrder)->execute($data);
return response()->json([
'data' => route('contact.index', [
@@ -19,7 +19,7 @@ class ContactTemplateController extends Controller
'template_id' => $request->input('templateId'),
];
(new UpdateContactTemplate())->execute($data);
(new UpdateContactTemplate)->execute($data);
return response()->json([
'data' => route('contact.show', [
@@ -33,13 +33,13 @@ class ContactModuleAddressController extends Controller
];
if (! $request->input('existing_address')) {
$address = (new CreateAddress())->execute($data);
$address = (new CreateAddress)->execute($data);
} else {
$address = Address::where('vault_id', $vaultId)
->findOrFail($request->input('existing_address_id'));
}
(new AssociateAddressToContact())->execute([
(new AssociateAddressToContact)->execute([
'account_id' => Auth::user()->account_id,
'vault_id' => $vaultId,
'author_id' => Auth::id(),
@@ -73,7 +73,7 @@ class ContactModuleAddressController extends Controller
'longitude' => null,
];
(new UpdateAddress())->execute($data);
(new UpdateAddress)->execute($data);
$contact = Contact::find($contactId);
// update pivot table
@@ -99,7 +99,7 @@ class ContactModuleAddressController extends Controller
'address_id' => $addressId,
];
(new RemoveAddressFromContact())->execute($data);
(new RemoveAddressFromContact)->execute($data);
return response()->json([
'data' => true,
@@ -54,12 +54,12 @@ class ContactImportantDatesController extends Controller
$year = Carbon::now()->subYears($request->input('age'))->format('Y');
}
$date = (new CreateContactImportantDate())->execute([
$date = (new CreateContactImportantDate)->execute([
'account_id' => Auth::user()->account_id,
'author_id' => Auth::id(),
'vault_id' => $vaultId,
'contact_id' => $contactId,
'contact_important_date_type_id' => $request->input('contact_important_date_type_id') == 0 ? null : $request->input('contact_important_date_type_id'),
'contact_important_date_type_id' => $request->input('contact_important_date_type_id') <= 0 ? null : $request->input('contact_important_date_type_id'),
'label' => $request->input('label'),
'day' => $day,
'month' => $month,
@@ -67,7 +67,7 @@ class ContactImportantDatesController extends Controller
]);
if ($request->input('reminder')) {
(new CreateContactReminder())->execute([
(new CreateContactReminder)->execute([
'account_id' => Auth::user()->account_id,
'author_id' => Auth::id(),
'vault_id' => $vaultId,
@@ -125,7 +125,7 @@ class ContactImportantDatesController extends Controller
'year' => $year,
];
$date = (new UpdateContactImportantDate())->execute($data);
$date = (new UpdateContactImportantDate)->execute($data);
$contact = Contact::find($contactId);
@@ -144,7 +144,7 @@ class ContactImportantDatesController extends Controller
'contact_important_date_id' => $dateId,
];
(new DestroyContactImportantDate())->execute($data);
(new DestroyContactImportantDate)->execute($data);
return response()->json([
'data' => true,
@@ -28,7 +28,7 @@ class ContactImportantDatesViewHelper
});
// we add an empty field so the dropdown field can be nullified
$dateTypesCollection->prepend([
'id' => null,
'id' => -1,
'name' => '',
]);
@@ -15,7 +15,7 @@ class ContactInformationController extends Controller
{
public function store(Request $request, string $vaultId, string $contactId)
{
$info = (new CreateContactInformation())->execute([
$info = (new CreateContactInformation)->execute([
'account_id' => Auth::user()->account_id,
'author_id' => Auth::id(),
'vault_id' => $vaultId,
@@ -43,7 +43,7 @@ class ContactInformationController extends Controller
'data' => $request->input('data'),
];
$info = (new UpdateContactInformation())->execute($data);
$info = (new UpdateContactInformation)->execute($data);
$contact = Contact::find($contactId);
return response()->json([
@@ -61,7 +61,7 @@ class ContactInformationController extends Controller
'contact_information_id' => $infoId,
];
(new DestroyContactInformation())->execute($data);
(new DestroyContactInformation)->execute($data);
return response()->json([
'data' => true,
@@ -5,8 +5,8 @@ namespace App\Domains\Contact\ManageDocuments\Listeners;
use App\Domains\Contact\ManageDocuments\Events\FileDeleted;
use App\Exceptions\EnvVariablesNotSetException;
use App\Models\File;
use Http\Client\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Uploadcare\Api;
use Uploadcare\Configuration;
use Uploadcare\Interfaces\File\FileInfoInterface;
@@ -31,9 +31,7 @@ class DeleteFileInStorage
/**
* Create the event listener.
*/
public function __construct()
{
}
public function __construct() {}
/**
* Handle the event.
@@ -49,11 +47,11 @@ class DeleteFileInStorage
private function checkAPIKeyPresence(): void
{
if (is_null(config('services.uploadcare.private_key'))) {
throw new EnvVariablesNotSetException();
throw new EnvVariablesNotSetException;
}
if (is_null(config('services.uploadcare.public_key'))) {
throw new EnvVariablesNotSetException();
throw new EnvVariablesNotSetException;
}
}
@@ -63,11 +63,11 @@ class UploadFile extends BaseService
private function validate(): void
{
if (is_null(config('services.uploadcare.private_key'))) {
throw new EnvVariablesNotSetException();
throw new EnvVariablesNotSetException;
}
if (is_null(config('services.uploadcare.public_key'))) {
throw new EnvVariablesNotSetException();
throw new EnvVariablesNotSetException;
}
$this->validateRules($this->data);
@@ -28,7 +28,7 @@ class ContactModuleDocumentController extends Controller
'type' => File::TYPE_DOCUMENT,
];
$file = (new UploadFile())->execute($data);
$file = (new UploadFile)->execute($data);
$contact = Contact::where('vault_id', $vaultId)->findOrFail($contactId);
@@ -48,7 +48,7 @@ class ContactModuleDocumentController extends Controller
'file_id' => $fileId,
];
(new DestroyFile())->execute($data);
(new DestroyFile)->execute($data);
return response()->json([
'data' => true,
@@ -42,7 +42,7 @@ class ContactGoalController extends Controller
$contact = Contact::findOrFail($contactId);
$goal = Goal::where('contact_id', $contact->id)->findOrFail($goalId);
$goal = (new UpdateGoal())->execute($data);
$goal = (new UpdateGoal)->execute($data);
$contact = Contact::find($contactId);
@@ -64,7 +64,7 @@ class ContactGoalController extends Controller
$contact = Contact::findOrFail($contactId);
Goal::where('contact_id', $contact->id)->findOrFail($goalId);
(new DestroyGoal())->execute($data);
(new DestroyGoal)->execute($data);
return response()->json([
'data' => route('contact.show', [
@@ -21,7 +21,7 @@ class ContactModuleGoalController extends Controller
'name' => $request->input('name'),
];
$goal = (new CreateGoal())->execute($data);
$goal = (new CreateGoal)->execute($data);
$contact = Contact::find($contactId);
@@ -23,7 +23,7 @@ class ContactModuleStreakController extends Controller
'happened_at' => $request->input('happened_at'),
];
(new ToggleStreak())->execute($data);
(new ToggleStreak)->execute($data);
$contact = Contact::find($contactId);
$goal = Goal::find($goalId);
@@ -83,7 +83,7 @@ class ImportGroup extends Importer implements ImportVCardResource
}
if ($group !== null && $group->vault_id !== $this->vault()->id) {
throw new ModelNotFoundException();
throw new ModelNotFoundException;
}
return $group;
@@ -64,7 +64,7 @@ class ImportMembers extends Importer implements ImportVCardResource
}
if ($group !== null && $group->vault_id !== $this->vault()->id) {
throw new ModelNotFoundException();
throw new ModelNotFoundException;
}
return $group;
@@ -38,7 +38,7 @@ class ContactModuleGroupController extends Controller
'name' => $request->input('name'),
];
$group = (new CreateGroup())->execute($data);
$group = (new CreateGroup)->execute($data);
$groupId = $group->id;
}
@@ -73,7 +73,7 @@ class GroupController extends Controller
'name' => $request->input('name'),
];
$group = (new UpdateGroup())->execute($data);
$group = (new UpdateGroup)->execute($data);
return response()->json([
'data' => route('group.show', [
@@ -94,7 +94,7 @@ class GroupController extends Controller
'group_id' => $groupId,
];
(new DestroyGroup())->execute($data);
(new DestroyGroup)->execute($data);
return response()->json([
'data' => route('group.index', [
@@ -44,11 +44,11 @@ class ContactModuleJobInformationController extends Controller
'type' => Company::TYPE_COMPANY,
];
$company = (new CreateCompany())->execute($data);
$company = (new CreateCompany)->execute($data);
$companyId = $company->id;
}
(new UpdateJobInformation())->execute([
(new UpdateJobInformation)->execute([
'account_id' => Auth::user()->account_id,
'author_id' => Auth::id(),
'vault_id' => $vaultId,
@@ -66,7 +66,7 @@ class ContactModuleJobInformationController extends Controller
public function destroy(Request $request, string $vaultId, string $contactId)
{
(new ResetJobInformation())->execute([
(new ResetJobInformation)->execute([
'account_id' => Auth::user()->account_id,
'author_id' => Auth::id(),
'vault_id' => $vaultId,
@@ -25,7 +25,7 @@ class ContactModuleLabelController extends Controller
'text_color' => 'text-neutral-800',
];
$label = (new CreateLabel())->execute($data);
$label = (new CreateLabel)->execute($data);
$data = [
'account_id' => Auth::user()->account_id,
@@ -35,7 +35,7 @@ class ContactModuleLabelController extends Controller
'label_id' => $label->id,
];
$label = (new AssignLabel())->execute($data);
$label = (new AssignLabel)->execute($data);
$contact = Contact::find($contactId);
@@ -54,7 +54,7 @@ class ContactModuleLabelController extends Controller
'label_id' => $labelId,
];
$label = (new AssignLabel())->execute($data);
$label = (new AssignLabel)->execute($data);
$contact = Contact::find($contactId);
return response()->json([
@@ -72,7 +72,7 @@ class ContactModuleLabelController extends Controller
'label_id' => $labelId,
];
$label = (new RemoveLabel())->execute($data);
$label = (new RemoveLabel)->execute($data);
$contact = Contact::find($contactId);
return response()->json([
@@ -49,7 +49,7 @@ class ContactModuleLifeEventController extends Controller
'participant_ids' => $participants,
];
$lifeEvent = (new CreateLifeEvent())->execute($data);
$lifeEvent = (new CreateLifeEvent)->execute($data);
$contact = Contact::find($contactId);
return response()->json([
@@ -93,7 +93,7 @@ class ContactModuleLifeEventController extends Controller
'participant_ids' => $participants,
];
$lifeEvent = (new UpdateLifeEvent())->execute($data);
$lifeEvent = (new UpdateLifeEvent)->execute($data);
$contact = Contact::find($contactId);
return response()->json([
@@ -111,7 +111,7 @@ class ContactModuleLifeEventController extends Controller
'life_event_id' => $lifeEventId,
];
(new DestroyLifeEvent())->execute($data);
(new DestroyLifeEvent)->execute($data);
return response()->json([
'data' => true,
@@ -40,7 +40,7 @@ class ContactModuleTimelineEventController extends Controller
'started_at' => $request->input('started_at'),
];
$timelineEvent = (new CreateTimelineEvent())->execute($data);
$timelineEvent = (new CreateTimelineEvent)->execute($data);
// we also need to add the current contact to the list of participants
// finally, just so we are sure that we don't have the same participant
@@ -75,7 +75,7 @@ class ContactModuleTimelineEventController extends Controller
'participant_ids' => $participants,
];
$lifeEvent = (new CreateLifeEvent())->execute($data);
$lifeEvent = (new CreateLifeEvent)->execute($data);
$contact = Contact::find($contactId);
return response()->json([
@@ -92,7 +92,7 @@ class ContactModuleTimelineEventController extends Controller
'timeline_event_id' => $timelineEventId,
];
(new DestroyTimelineEvent())->execute($data);
(new DestroyTimelineEvent)->execute($data);
return response()->json([
'data' => true,
@@ -18,7 +18,7 @@ class ToggleLifeEventController
'life_event_id' => $lifeEventId,
];
(new ToggleLifeEvent())->execute($data);
(new ToggleLifeEvent)->execute($data);
return response()->json([
'data' => true,
@@ -17,7 +17,7 @@ class ToggleTimelineEventController
'timeline_event_id' => $timelineEventId,
];
(new ToggleTimelineEvent())->execute($data);
(new ToggleTimelineEvent)->execute($data);
return response()->json([
'data' => true,
@@ -37,7 +37,7 @@ class ContactModuleLoanController extends Controller
'loaned_at' => $request->input('loaned_at'),
];
$loan = (new CreateLoan())->execute($data);
$loan = (new CreateLoan)->execute($data);
$contact = Contact::find($contactId);
@@ -69,7 +69,7 @@ class ContactModuleLoanController extends Controller
'loaned_at' => $request->input('loaned_at'),
];
$loan = (new UpdateLoan())->execute($data);
$loan = (new UpdateLoan)->execute($data);
$contact = Contact::find($contactId);
return response()->json([
@@ -87,7 +87,7 @@ class ContactModuleLoanController extends Controller
'loan_id' => $loanId,
];
(new DestroyLoan())->execute($data);
(new DestroyLoan)->execute($data);
return response()->json([
'data' => true,
@@ -21,7 +21,7 @@ class ContactModuleToggleLoanController extends Controller
'loan_id' => $loanId,
];
$loan = (new ToggleLoan())->execute($data);
$loan = (new ToggleLoan)->execute($data);
$contact = Contact::find($contactId);
return response()->json([
@@ -28,7 +28,7 @@ class ContactMoodTrackingEventsController extends Controller
'number_of_hours_slept' => $request->input('hours') ?? null,
];
$moodTrackingEvent = (new CreateMoodTrackingEvent())->execute($data);
$moodTrackingEvent = (new CreateMoodTrackingEvent)->execute($data);
$contact = Contact::find($contactId);
@@ -25,7 +25,7 @@ class ContactModuleNoteController extends Controller
'emotion_id' => $request->input('emotion'),
];
$note = (new CreateNote())->execute($data);
$note = (new CreateNote)->execute($data);
$contact = Contact::find($contactId);
@@ -47,7 +47,7 @@ class ContactModuleNoteController extends Controller
'emotion_id' => $request->input('emotion'),
];
$note = (new UpdateNote())->execute($data);
$note = (new UpdateNote)->execute($data);
$contact = Contact::find($contactId);
@@ -66,7 +66,7 @@ class ContactModuleNoteController extends Controller
'note_id' => $noteId,
];
(new DestroyNote())->execute($data);
(new DestroyNote)->execute($data);
return response()->json([
'data' => true,
@@ -24,7 +24,7 @@ class ContactModulePetController extends Controller
'name' => $request->input('name'),
];
$pet = (new CreatePet())->execute($data);
$pet = (new CreatePet)->execute($data);
$contact = Contact::find($contactId);
@@ -45,7 +45,7 @@ class ContactModulePetController extends Controller
'name' => $request->input('name'),
];
$pet = (new UpdatePet())->execute($data);
$pet = (new UpdatePet)->execute($data);
$contact = Contact::find($contactId);
@@ -64,7 +64,7 @@ class ContactModulePetController extends Controller
'pet_id' => $petId,
];
(new DestroyPet())->execute($data);
(new DestroyPet)->execute($data);
return response()->json([
'data' => true,
@@ -28,7 +28,7 @@ class ContactModulePhotoController extends Controller
'type' => File::TYPE_PHOTO,
];
$file = (new UploadFile())->execute($data);
$file = (new UploadFile)->execute($data);
$contact = Contact::where('vault_id', $vaultId)->findOrFail($contactId);
@@ -48,7 +48,7 @@ class ContactModulePhotoController extends Controller
'file_id' => $fileId,
];
(new DestroyFile())->execute($data);
(new DestroyFile)->execute($data);
return response()->json([
'data' => route('contact.photo.index', [
@@ -35,7 +35,7 @@ class ContactQuickFactController extends Controller
'content' => $request->input('content'),
];
$quickFact = (new CreateQuickFact())->execute($data);
$quickFact = (new CreateQuickFact)->execute($data);
return response()->json([
'data' => ContactModuleQuickFactViewHelper::dto($quickFact),
@@ -53,7 +53,7 @@ class ContactQuickFactController extends Controller
'content' => $request->input('content'),
];
$quickFact = (new UpdateQuickFact())->execute($data);
$quickFact = (new UpdateQuickFact)->execute($data);
return response()->json([
'data' => ContactModuleQuickFactViewHelper::dto($quickFact),
@@ -70,7 +70,7 @@ class ContactQuickFactController extends Controller
'quick_fact_id' => $quickFactId,
];
(new DestroyQuickFact())->execute($data);
(new DestroyQuickFact)->execute($data);
return response()->json([
'data' => true,
@@ -19,7 +19,7 @@ class ContactQuickFactToggleController extends Controller
'contact_id' => $contactId,
];
(new ToggleQuickFactModule())->execute($data);
(new ToggleQuickFactModule)->execute($data);
return response()->json([
'data' => true,
@@ -53,7 +53,7 @@ class SetRelationship extends BaseService implements ServiceInterface
$relationshipType = RelationshipType::findOrFail($data['relationship_type_id']);
if ($relationshipType->groupType->account_id !== $data['account_id']) {
throw new ModelNotFoundException();
throw new ModelNotFoundException;
}
// create the relationships
@@ -53,7 +53,7 @@ class UnsetRelationship extends BaseService implements ServiceInterface
$this->relationshipType = RelationshipType::findOrFail($data['relationship_type_id']);
if ($this->relationshipType->groupType->account_id !== $data['account_id']) {
throw new ModelNotFoundException();
throw new ModelNotFoundException;
}
$this->unsetRelationship($this->contact, $otherContact);
@@ -45,7 +45,7 @@ class ContactRelationshipsController extends Controller
// first, let's create a contact if there is no contact selected
$otherContactId = 0;
if ($request->input('choice') !== 'contact') {
$otherContact = (new CreateContact())->execute([
$otherContact = (new CreateContact)->execute([
'account_id' => Auth::user()->account_id,
'author_id' => Auth::id(),
'vault_id' => $vaultId,
@@ -64,7 +64,7 @@ class ContactRelationshipsController extends Controller
$otherContactId = collect($request->input('other_contact_id'))->pluck('id')->first();
}
(new SetRelationship())->execute([
(new SetRelationship)->execute([
'account_id' => Auth::user()->account_id,
'author_id' => Auth::id(),
'vault_id' => $vaultId,
@@ -85,7 +85,7 @@ class ContactRelationshipsController extends Controller
{
$relationship = DB::table('relationships')->where('id', $relationshipId)->first();
(new UnsetRelationship())->execute([
(new UnsetRelationship)->execute([
'account_id' => Auth::user()->account_id,
'author_id' => Auth::id(),
'vault_id' => $vaultId,
@@ -13,7 +13,7 @@ class ContactModuleReligionController extends Controller
{
public function update(Request $request, string $vaultId, string $contactId)
{
(new UpdateReligion())->execute([
(new UpdateReligion)->execute([
'account_id' => Auth::user()->account_id,
'author_id' => Auth::user()->id,
'vault_id' => $vaultId,
@@ -117,7 +117,7 @@ class ProcessScheduledContactReminders implements ShouldQueue
$this->updateNumberOfTimesTriggered($scheduledReminder->contact_reminder_id);
(new RescheduleContactReminderForChannel())->execute([
(new RescheduleContactReminderForChannel)->execute([
'contact_reminder_id' => $scheduledReminder->contact_reminder_id,
'user_notification_channel_id' => $scheduledReminder->user_notification_channel_id,
'contact_reminder_scheduled_id' => $scheduledReminder->id,
@@ -84,7 +84,7 @@ class CreateContactReminder extends BaseService implements ServiceInterface
$users = $this->vault->users()->get();
foreach ($users as $user) {
(new ScheduleContactReminderForUser())->execute([
(new ScheduleContactReminderForUser)->execute([
'contact_reminder_id' => $this->reminder->id,
'user_id' => $user->id,
]);
@@ -89,7 +89,7 @@ class UpdateContactReminder extends BaseService implements ServiceInterface
private function scheduledReminderForAllUsersInVault(): void
{
foreach ($this->vault->users as $user) {
(new ScheduleContactReminderForUser())->execute([
(new ScheduleContactReminderForUser)->execute([
'contact_reminder_id' => $this->reminder->id,
'user_id' => $user->id,
]);
@@ -49,7 +49,7 @@ class ContactModuleReminderController extends Controller
'frequency_number' => $frequencyNumber,
];
$reminder = (new CreateContactReminder())->execute($data);
$reminder = (new CreateContactReminder)->execute($data);
$contact = Contact::find($contactId);
return response()->json([
@@ -92,7 +92,7 @@ class ContactModuleReminderController extends Controller
'frequency_number' => $frequencyNumber,
];
$reminder = (new UpdateContactReminder())->execute($data);
$reminder = (new UpdateContactReminder)->execute($data);
$contact = Contact::find($contactId);
return response()->json([
@@ -110,7 +110,7 @@ class ContactModuleReminderController extends Controller
'contact_reminder_id' => $reminderId,
];
(new DestroyReminder())->execute($data);
(new DestroyReminder)->execute($data);
return response()->json([
'data' => true,
@@ -41,7 +41,7 @@ class ContactModuleTaskController extends Controller
'due_at' => $dueAt,
];
$task = (new CreateContactTask())->execute($data);
$task = (new CreateContactTask)->execute($data);
$contact = Contact::find($contactId);
return response()->json([
@@ -67,7 +67,7 @@ class ContactModuleTaskController extends Controller
'due_at' => $dueAt === '' ? null : $dueAt,
];
$task = (new UpdateContactTask())->execute($data);
$task = (new UpdateContactTask)->execute($data);
$contact = Contact::find($contactId);
return response()->json([
@@ -87,7 +87,7 @@ class ContactModuleTaskController extends Controller
'description' => null,
];
$task = (new ToggleContactTask())->execute($data);
$task = (new ToggleContactTask)->execute($data);
$contact = Contact::find($contactId);
return response()->json([
@@ -105,7 +105,7 @@ class ContactModuleTaskController extends Controller
'contact_task_id' => $taskId,
];
(new DestroyContactTask())->execute($data);
(new DestroyContactTask)->execute($data);
return response()->json([
'data' => true,
@@ -97,7 +97,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
*/
private function addNotificationChannel(): void
{
$channel = (new CreateUserNotificationChannel())->execute([
$channel = (new CreateUserNotificationChannel)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'label' => 'Email address',
@@ -125,7 +125,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
'can_be_deleted' => false,
];
$this->template = (new CreateTemplate())->execute($request);
$this->template = (new CreateTemplate)->execute($request);
}
private function addTemplatePageContactInformation(): void
@@ -136,7 +136,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
->firstWhere('type', TemplatePage::TYPE_CONTACT);
// avatar
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Avatar'),
@@ -144,7 +144,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
'can_be_deleted' => false,
'reserved_to_contact_information' => true,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -153,7 +153,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// names
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Contact name'),
@@ -161,7 +161,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
'can_be_deleted' => false,
'reserved_to_contact_information' => true,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -170,7 +170,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// family summary
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Family summary'),
@@ -178,7 +178,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
'can_be_deleted' => false,
'reserved_to_contact_information' => true,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -187,7 +187,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// important dates
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Important dates'),
@@ -195,7 +195,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
'can_be_deleted' => false,
'reserved_to_contact_information' => true,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -204,7 +204,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// gender/pronouns
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Gender and pronoun'),
@@ -212,7 +212,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
'can_be_deleted' => false,
'reserved_to_contact_information' => true,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -221,7 +221,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// labels
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Labels'),
@@ -229,7 +229,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
'can_be_deleted' => false,
'reserved_to_contact_information' => true,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -238,7 +238,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// companies
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Job information'),
@@ -246,7 +246,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
'can_be_deleted' => false,
'reserved_to_contact_information' => true,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -255,7 +255,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// religions
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Religions'),
@@ -263,7 +263,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
'can_be_deleted' => false,
'reserved_to_contact_information' => true,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -274,21 +274,21 @@ class SetupAccount extends QueuableService implements ServiceInterface
private function addTemplatePageFeed(): void
{
$templatePageFeed = (new CreateTemplatePage())->execute([
$templatePageFeed = (new CreateTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
'name_translation_key' => trans_key('Activity feed'),
'can_be_deleted' => true,
]);
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Contact feed'),
'type' => Module::TYPE_FEED,
'can_be_deleted' => false,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -299,7 +299,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
private function addTemplatePageContact(): void
{
$template = (new CreateTemplatePage())->execute([
$template = (new CreateTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -308,14 +308,14 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// Addresses
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Addresses'),
'type' => Module::TYPE_ADDRESSES,
'can_be_deleted' => false,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -324,14 +324,14 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// Contact information
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Contact information'),
'type' => Module::TYPE_CONTACT_INFORMATION,
'can_be_deleted' => false,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -342,7 +342,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
private function addTemplatePageSocial(): void
{
$templatePageSocial = (new CreateTemplatePage())->execute([
$templatePageSocial = (new CreateTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -351,14 +351,14 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// Relationships
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Relationships'),
'type' => Module::TYPE_RELATIONSHIPS,
'can_be_deleted' => false,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -367,14 +367,14 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// Pets
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Pets'),
'type' => Module::TYPE_PETS,
'can_be_deleted' => false,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -383,14 +383,14 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// Groups
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Groups'),
'type' => Module::TYPE_GROUPS,
'can_be_deleted' => false,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -401,7 +401,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
private function addTemplatePageLifeEvents(): void
{
$templatePageSocial = (new CreateTemplatePage())->execute([
$templatePageSocial = (new CreateTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -410,14 +410,14 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// life events
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Life'),
'type' => Module::TYPE_LIFE_EVENTS,
'can_be_deleted' => false,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -426,14 +426,14 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// goals
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Goals'),
'type' => Module::TYPE_GOALS,
'can_be_deleted' => false,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -444,7 +444,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
private function addTemplatePageInformation(): void
{
$templatePageInformation = (new CreateTemplatePage())->execute([
$templatePageInformation = (new CreateTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -453,14 +453,14 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// Documents
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Documents'),
'type' => Module::TYPE_DOCUMENTS,
'can_be_deleted' => false,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -469,14 +469,14 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// Documents
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Photos'),
'type' => Module::TYPE_PHOTOS,
'can_be_deleted' => false,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -485,7 +485,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// Notes
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Notes'),
@@ -493,7 +493,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
'can_be_deleted' => false,
'pagination' => 3,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -502,14 +502,14 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// Reminders
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Reminders'),
'type' => Module::TYPE_REMINDERS,
'can_be_deleted' => false,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -518,14 +518,14 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// Loans
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Loans'),
'type' => Module::TYPE_LOANS,
'can_be_deleted' => false,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -534,14 +534,14 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// Tasks
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Tasks'),
'type' => Module::TYPE_TASKS,
'can_be_deleted' => false,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -550,14 +550,14 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// Calls
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Calls'),
'type' => Module::TYPE_CALLS,
'can_be_deleted' => false,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -566,14 +566,14 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// Posts
$module = (new CreateModule())->execute([
$module = (new CreateModule)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Posts'),
'type' => Module::TYPE_POSTS,
'can_be_deleted' => false,
]);
(new AssociateModuleToTemplatePage())->execute([
(new AssociateModuleToTemplatePage)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'template_id' => $this->template->id,
@@ -617,7 +617,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
'name_translation_key' => $type,
];
(new CreateGender())->execute($request);
(new CreateGender)->execute($request);
}
}
@@ -643,7 +643,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
'name_translation_key' => $pronoun,
];
(new CreatePronoun())->execute($request);
(new CreatePronoun)->execute($request);
}
}
@@ -652,49 +652,49 @@ class SetupAccount extends QueuableService implements ServiceInterface
*/
private function addGroupTypes(): void
{
$groupType = (new CreateGroupType())->execute([
$groupType = (new CreateGroupType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'label_translation_key' => trans_key('Family'),
]);
(new CreateGroupTypeRole())->execute([
(new CreateGroupTypeRole)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'group_type_id' => $groupType->id,
'label_translation_key' => trans_key('Parent'),
]);
(new CreateGroupTypeRole())->execute([
(new CreateGroupTypeRole)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'group_type_id' => $groupType->id,
'label_translation_key' => trans_key('Child'),
]);
$groupType = (new CreateGroupType())->execute([
$groupType = (new CreateGroupType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'label_translation_key' => trans_key('Couple'),
]);
(new CreateGroupTypeRole())->execute([
(new CreateGroupTypeRole)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'group_type_id' => $groupType->id,
'label_translation_key' => trans_key('Partner'),
]);
$groupType = (new CreateGroupType())->execute([
$groupType = (new CreateGroupType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'label_translation_key' => trans_key('Club'),
]);
$groupType = (new CreateGroupType())->execute([
$groupType = (new CreateGroupType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'label_translation_key' => trans_key('Association'),
]);
$groupType = (new CreateGroupType())->execute([
$groupType = (new CreateGroupType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'label_translation_key' => trans_key('Roomates'),
@@ -704,7 +704,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
private function addRelationshipTypes(): void
{
// Love type
$group = (new CreateRelationshipGroupType())->execute([
$group = (new CreateRelationshipGroupType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Love'),
@@ -758,7 +758,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// Family type
$group = (new CreateRelationshipGroupType())->execute([
$group = (new CreateRelationshipGroupType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Family'),
@@ -812,7 +812,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// Friend
$group = (new CreateRelationshipGroupType())->execute([
$group = (new CreateRelationshipGroupType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Friend'),
@@ -837,7 +837,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// Work
$group = (new CreateRelationshipGroupType())->execute([
$group = (new CreateRelationshipGroupType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Work'),
@@ -879,7 +879,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
foreach ($addresses as $address) {
(new CreateAddressType())->execute([
(new CreateAddressType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => $address,
@@ -889,36 +889,36 @@ class SetupAccount extends QueuableService implements ServiceInterface
private function addCallReasonTypes(): void
{
$type = (new CreateCallReasonType())->execute([
$type = (new CreateCallReasonType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'label_translation_key' => trans_key('Personal'),
]);
(new CreateCallReason())->execute([
(new CreateCallReason)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'call_reason_type_id' => $type->id,
'label_translation_key' => trans_key('For advice'),
]);
(new CreateCallReason())->execute([
(new CreateCallReason)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'call_reason_type_id' => $type->id,
'label_translation_key' => trans_key('Just to say hello'),
]);
(new CreateCallReason())->execute([
(new CreateCallReason)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'call_reason_type_id' => $type->id,
'label_translation_key' => trans_key('To see if they need anything'),
]);
(new CreateCallReason())->execute([
(new CreateCallReason)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'call_reason_type_id' => $type->id,
'label_translation_key' => trans_key('Out of respect and appreciation'),
]);
(new CreateCallReason())->execute([
(new CreateCallReason)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'call_reason_type_id' => $type->id,
@@ -926,18 +926,18 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// business
$type = (new CreateCallReasonType())->execute([
$type = (new CreateCallReasonType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'label_translation_key' => trans_key('Business'),
]);
(new CreateCallReason())->execute([
(new CreateCallReason)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'call_reason_type_id' => $type->id,
'label_translation_key' => trans_key('Discuss recent purchases'),
]);
(new CreateCallReason())->execute([
(new CreateCallReason)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'call_reason_type_id' => $type->id,
@@ -947,7 +947,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
private function addContactInformation(): void
{
$information = (new CreateContactInformationType())->execute([
$information = (new CreateContactInformationType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Email address'),
@@ -957,7 +957,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
$information->type = 'email';
$information->save();
$information = (new CreateContactInformationType())->execute([
$information = (new CreateContactInformationType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => trans_key('Phone'),
@@ -967,37 +967,37 @@ class SetupAccount extends QueuableService implements ServiceInterface
$information->type = 'phone';
$information->save();
(new CreateContactInformationType())->execute([
(new CreateContactInformationType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name' => 'Facebook',
]);
(new CreateContactInformationType())->execute([
(new CreateContactInformationType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name' => 'Twitter',
]);
(new CreateContactInformationType())->execute([
(new CreateContactInformationType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name' => 'Whatsapp',
]);
(new CreateContactInformationType())->execute([
(new CreateContactInformationType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name' => 'Telegram',
]);
(new CreateContactInformationType())->execute([
(new CreateContactInformationType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name' => 'Hangouts',
]);
(new CreateContactInformationType())->execute([
(new CreateContactInformationType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name' => 'Linkedin',
]);
(new CreateContactInformationType())->execute([
(new CreateContactInformationType)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name' => 'Instagram',
@@ -1020,7 +1020,7 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
foreach ($categories as $category) {
(new CreatePetCategory())->execute([
(new CreatePetCategory)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'name_translation_key' => $category,
@@ -1114,14 +1114,14 @@ class SetupAccount extends QueuableService implements ServiceInterface
private function addPostTemplates(): void
{
// default template
$postTemplate = (new CreatePostTemplate())->execute([
$postTemplate = (new CreatePostTemplate)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'label_translation_key' => trans_key('Regular post'),
'can_be_deleted' => false,
]);
(new CreatePostTemplateSection())->execute([
(new CreatePostTemplateSection)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'post_template_id' => $postTemplate->id,
@@ -1130,42 +1130,42 @@ class SetupAccount extends QueuableService implements ServiceInterface
]);
// inspirational template
$postTemplate = (new CreatePostTemplate())->execute([
$postTemplate = (new CreatePostTemplate)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'label_translation_key' => trans_key('Inspirational post'),
'can_be_deleted' => true,
]);
(new CreatePostTemplateSection())->execute([
(new CreatePostTemplateSection)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'post_template_id' => $postTemplate->id,
'label_translation_key' => trans_key('I am grateful for'),
'can_be_deleted' => true,
]);
(new CreatePostTemplateSection())->execute([
(new CreatePostTemplateSection)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'post_template_id' => $postTemplate->id,
'label_translation_key' => trans_key('Daily affirmation'),
'can_be_deleted' => true,
]);
(new CreatePostTemplateSection())->execute([
(new CreatePostTemplateSection)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'post_template_id' => $postTemplate->id,
'label_translation_key' => trans_key('How could I have done this day better?'),
'can_be_deleted' => true,
]);
(new CreatePostTemplateSection())->execute([
(new CreatePostTemplateSection)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'post_template_id' => $postTemplate->id,
'label_translation_key' => trans_key('What would make today great?'),
'can_be_deleted' => true,
]);
(new CreatePostTemplateSection())->execute([
(new CreatePostTemplateSection)->execute([
'account_id' => $this->author->account_id,
'author_id' => $this->author->id,
'post_template_id' => $postTemplate->id,
@@ -30,7 +30,7 @@ class PersonalizeAddressTypeController extends Controller
'name' => $request->input('name'),
];
$addressType = (new CreateAddressType())->execute($data);
$addressType = (new CreateAddressType)->execute($data);
return response()->json([
'data' => PersonalizeAddressTypeIndexViewHelper::dtoAddressType($addressType),
@@ -46,7 +46,7 @@ class PersonalizeAddressTypeController extends Controller
'name' => $request->input('name'),
];
$addressType = (new UpdateAddressType())->execute($data);
$addressType = (new UpdateAddressType)->execute($data);
return response()->json([
'data' => PersonalizeAddressTypeIndexViewHelper::dtoAddressType($addressType),
@@ -61,7 +61,7 @@ class PersonalizeAddressTypeController extends Controller
'address_type_id' => $addressTypeId,
];
(new DestroyPronoun())->execute($data);
(new DestroyPronoun)->execute($data);
return response()->json([
'data' => true,
@@ -30,7 +30,7 @@ class PersonalizeCallReasonTypesController extends Controller
'label' => $request->input('callReasonTypeName'),
];
$callReasonType = (new CreateCallReasonType())->execute($data);
$callReasonType = (new CreateCallReasonType)->execute($data);
return response()->json([
'data' => PersonalizeCallReasonsIndexViewHelper::dtoReasonType($callReasonType),
@@ -46,7 +46,7 @@ class PersonalizeCallReasonTypesController extends Controller
'label' => $request->input('callReasonTypeName'),
];
$callReasonType = (new UpdateCallReasonType())->execute($data);
$callReasonType = (new UpdateCallReasonType)->execute($data);
return response()->json([
'data' => PersonalizeCallReasonsIndexViewHelper::dtoReasonType($callReasonType),
@@ -61,7 +61,7 @@ class PersonalizeCallReasonTypesController extends Controller
'call_reason_type_id' => $callReasonTypeId,
];
(new DestroyCallReasonType())->execute($data);
(new DestroyCallReasonType)->execute($data);
return response()->json([
'data' => true,
@@ -21,7 +21,7 @@ class PersonalizeCallReasonsController extends Controller
'label' => $request->input('label'),
];
$reason = (new CreateCallReason())->execute($data);
$reason = (new CreateCallReason)->execute($data);
return response()->json([
'data' => PersonalizeCallReasonsIndexViewHelper::dtoReason($reason->callReasonType, $reason),
@@ -38,7 +38,7 @@ class PersonalizeCallReasonsController extends Controller
'label' => $request->input('label'),
];
$reason = (new UpdateCallReason())->execute($data);
$reason = (new UpdateCallReason)->execute($data);
return response()->json([
'data' => PersonalizeCallReasonsIndexViewHelper::dtoReason($reason->callReasonType, $reason),
@@ -54,7 +54,7 @@ class PersonalizeCallReasonsController extends Controller
'call_reason_id' => $reasonId,
];
(new DestroyCallReason())->execute($data);
(new DestroyCallReason)->execute($data);
return response()->json([
'data' => true,
@@ -31,7 +31,7 @@ class PersonalizeContatInformationTypesController extends Controller
'protocol' => $request->input('protocol'),
];
$contactInformationType = (new CreateContactInformationType())->execute($data);
$contactInformationType = (new CreateContactInformationType)->execute($data);
return response()->json([
'data' => PersonalizeContactInformationTypeIndexViewHelper::dtoContactInformationType($contactInformationType),
@@ -48,7 +48,7 @@ class PersonalizeContatInformationTypesController extends Controller
'protocol' => $request->input('protocol'),
];
$contactInformationType = (new UpdateContactInformationType())->execute($data);
$contactInformationType = (new UpdateContactInformationType)->execute($data);
return response()->json([
'data' => PersonalizeContactInformationTypeIndexViewHelper::dtoContactInformationType($contactInformationType),
@@ -63,7 +63,7 @@ class PersonalizeContatInformationTypesController extends Controller
'contact_information_type_id' => $contactInformationTypeId,
];
(new DestroyContactInformationType())->execute($data);
(new DestroyContactInformationType)->execute($data);
return response()->json([
'data' => true,
@@ -29,7 +29,7 @@ class PersonalizeCurrencyController extends Controller
'author_id' => Auth::id(),
];
(new EnableAllCurrencies())->execute($data);
(new EnableAllCurrencies)->execute($data);
return response()->json([
'data' => true,
@@ -44,7 +44,7 @@ class PersonalizeCurrencyController extends Controller
'currency_id' => $currencyId,
];
(new ToggleCurrency())->execute($data);
(new ToggleCurrency)->execute($data);
return response()->json([
'data' => true,
@@ -58,7 +58,7 @@ class PersonalizeCurrencyController extends Controller
'author_id' => Auth::id(),
];
(new DisableAllCurrencies())->execute($data);
(new DisableAllCurrencies)->execute($data);
return response()->json([
'data' => true,
@@ -30,7 +30,7 @@ class ManageGenderController extends Controller
'name' => $request->input('name'),
];
$gender = (new CreateGender())->execute($data);
$gender = (new CreateGender)->execute($data);
return response()->json([
'data' => ManageGenderIndexViewHelper::dtoGender($gender),
@@ -46,7 +46,7 @@ class ManageGenderController extends Controller
'name' => $request->input('name'),
];
$gender = (new UpdateGender())->execute($data);
$gender = (new UpdateGender)->execute($data);
return response()->json([
'data' => ManageGenderIndexViewHelper::dtoGender($gender),
@@ -61,7 +61,7 @@ class ManageGenderController extends Controller
'gender_id' => $genderId,
];
(new DestroyGender())->execute($data);
(new DestroyGender)->execute($data);
return response()->json([
'data' => true,
@@ -30,7 +30,7 @@ class PersonalizeGiftOccasionController extends Controller
'label' => $request->input('label'),
];
$giftOccasion = (new CreateGiftOccasion())->execute($data);
$giftOccasion = (new CreateGiftOccasion)->execute($data);
return response()->json([
'data' => PersonalizeGiftOccasionViewHelper::dto($giftOccasion),
@@ -46,7 +46,7 @@ class PersonalizeGiftOccasionController extends Controller
'label' => $request->input('label'),
];
$giftOccasion = (new UpdateGiftOccasion())->execute($data);
$giftOccasion = (new UpdateGiftOccasion)->execute($data);
return response()->json([
'data' => PersonalizeGiftOccasionViewHelper::dto($giftOccasion),
@@ -61,7 +61,7 @@ class PersonalizeGiftOccasionController extends Controller
'gift_occasion_id' => $giftOccasionId,
];
(new DestroyGiftOccasion())->execute($data);
(new DestroyGiftOccasion)->execute($data);
return response()->json([
'data' => true,
@@ -19,7 +19,7 @@ class PersonalizeGiftOccasionsPositionController extends Controller
'new_position' => $request->input('position'),
];
$giftOccasion = (new UpdateGiftOccasionPosition())->execute($data);
$giftOccasion = (new UpdateGiftOccasionPosition)->execute($data);
return response()->json([
'data' => PersonalizeGiftOccasionViewHelper::dto($giftOccasion),
@@ -30,7 +30,7 @@ class PersonalizeGiftStateController extends Controller
'label' => $request->input('label'),
];
$giftState = (new CreateGiftState())->execute($data);
$giftState = (new CreateGiftState)->execute($data);
return response()->json([
'data' => PersonalizeGiftStateViewHelper::dto($giftState),
@@ -46,7 +46,7 @@ class PersonalizeGiftStateController extends Controller
'label' => $request->input('label'),
];
$newGiftState = (new UpdateGiftState())->execute($data);
$newGiftState = (new UpdateGiftState)->execute($data);
return response()->json([
'data' => PersonalizeGiftStateViewHelper::dto($newGiftState),
@@ -61,7 +61,7 @@ class PersonalizeGiftStateController extends Controller
'gift_state_id' => $giftStateId,
];
(new DestroyGiftState())->execute($data);
(new DestroyGiftState)->execute($data);
return response()->json([
'data' => true,
@@ -19,7 +19,7 @@ class PersonalizeGiftStatesPositionController extends Controller
'new_position' => $request->input('position'),
];
$giftState = (new UpdateGiftStatePosition())->execute($data);
$giftState = (new UpdateGiftStatePosition)->execute($data);
return response()->json([
'data' => PersonalizeGiftStateViewHelper::dto($giftState),
@@ -30,7 +30,7 @@ class PersonalizeGroupTypeController extends Controller
'label' => $request->input('label'),
];
$groupType = (new CreateGroupType())->execute($data);
$groupType = (new CreateGroupType)->execute($data);
return response()->json([
'data' => PersonalizeGroupTypeViewHelper::dto($groupType),
@@ -46,7 +46,7 @@ class PersonalizeGroupTypeController extends Controller
'label' => $request->input('label'),
];
$groupType = (new UpdateGroupType())->execute($data);
$groupType = (new UpdateGroupType)->execute($data);
return response()->json([
'data' => PersonalizeGroupTypeViewHelper::dto($groupType),
@@ -61,7 +61,7 @@ class PersonalizeGroupTypeController extends Controller
'group_type_id' => $groupTypeId,
];
(new DestroyGroupType())->execute($data);
(new DestroyGroupType)->execute($data);
return response()->json([
'data' => true,
@@ -19,7 +19,7 @@ class PersonalizeGroupTypePositionController extends Controller
'new_position' => $request->input('position'),
];
$groupType = (new UpdateGroupTypePosition())->execute($data);
$groupType = (new UpdateGroupTypePosition)->execute($data);
return response()->json([
'data' => PersonalizeGroupTypeViewHelper::dto($groupType),
@@ -21,7 +21,7 @@ class PersonalizeGroupTypeRoleController extends Controller
'label' => $request->input('label'),
];
$groupTypeRole = (new CreateGroupTypeRole())->execute($data);
$groupTypeRole = (new CreateGroupTypeRole)->execute($data);
return response()->json([
'data' => PersonalizeGroupTypeViewHelper::dtoGroupTypeRole($groupTypeRole->groupType, $groupTypeRole),
@@ -38,7 +38,7 @@ class PersonalizeGroupTypeRoleController extends Controller
'label' => $request->input('label'),
];
$groupTypeRole = (new UpdateGroupTypeRole())->execute($data);
$groupTypeRole = (new UpdateGroupTypeRole)->execute($data);
return response()->json([
'data' => PersonalizeGroupTypeViewHelper::dtoGroupTypeRole($groupTypeRole->groupType, $groupTypeRole),
@@ -54,7 +54,7 @@ class PersonalizeGroupTypeRoleController extends Controller
'group_type_role_id' => $groupTypeRoleId,
];
(new DestroyGroupTypeRole())->execute($data);
(new DestroyGroupTypeRole)->execute($data);
return response()->json([
'data' => true,
@@ -20,7 +20,7 @@ class PersonalizeGroupTypeRolePositionController extends Controller
'new_position' => $request->input('position'),
];
$groupTypeRole = (new UpdateGroupTypeRolePosition())->execute($data);
$groupTypeRole = (new UpdateGroupTypeRolePosition)->execute($data);
return response()->json([
'data' => PersonalizeGroupTypeViewHelper::dto($groupTypeRole->groupType),
@@ -85,7 +85,7 @@ class ToggleUserNotificationChannel extends BaseService implements ServiceInterf
private function rescheduledReminders(): void
{
(new ScheduleAllContactRemindersForNotificationChannel())->execute([
(new ScheduleAllContactRemindersForNotificationChannel)->execute([
'account_id' => $this->data['account_id'],
'author_id' => $this->data['author_id'],
'user_notification_channel_id' => $this->userNotificationChannel->id,
@@ -65,7 +65,7 @@ class VerifyUserNotificationChannelEmailAddress extends BaseService implements S
private function rescheduledReminders(): void
{
(new ScheduleAllContactRemindersForNotificationChannel())->execute([
(new ScheduleAllContactRemindersForNotificationChannel)->execute([
'account_id' => $this->data['account_id'],
'author_id' => $this->data['author_id'],
'user_notification_channel_id' => $this->userNotificationChannel->id,
@@ -36,7 +36,7 @@ class NotificationsController extends Controller
'preferred_time' => $time,
];
$channel = (new CreateUserNotificationChannel())->execute($data);
$channel = (new CreateUserNotificationChannel)->execute($data);
return response()->json([
'data' => NotificationsIndexViewHelper::dtoEmail($channel),
@@ -51,7 +51,7 @@ class NotificationsController extends Controller
'user_notification_channel_id' => $channelId,
];
(new DestroyUserNotificationChannel())->execute($data);
(new DestroyUserNotificationChannel)->execute($data);
return response()->json([
'data' => true,
@@ -22,11 +22,11 @@ class NotificationsTestController extends Controller
$channel = UserNotificationChannel::find($userNotificationChannelId);
if ($channel->type == UserNotificationChannel::TYPE_EMAIL) {
(new SendTestEmail())->execute($data);
(new SendTestEmail)->execute($data);
}
if ($channel->type == UserNotificationChannel::TYPE_TELEGRAM) {
(new SendTestTelegramNotification())->execute($data);
(new SendTestTelegramNotification)->execute($data);
}
return response()->json([
@@ -18,7 +18,7 @@ class NotificationsToggleController extends Controller
'user_notification_channel_id' => $userNotificationChannelId,
];
$channel = (new ToggleUserNotificationChannel())->execute($data);
$channel = (new ToggleUserNotificationChannel)->execute($data);
return response()->json([
'data' => NotificationsIndexViewHelper::dtoEmail($channel),
@@ -21,7 +21,7 @@ class NotificationsVerificationController extends Controller
'uuid' => $uuid,
];
(new VerifyUserNotificationChannelEmailAddress())->execute($data);
(new VerifyUserNotificationChannelEmailAddress)->execute($data);
return Inertia::render('Settings/Notifications/Index', [
'layoutData' => VaultIndexViewHelper::layoutData(),
@@ -25,7 +25,7 @@ class TelegramNotificationsController extends Controller
'preferred_time' => $time,
];
$channel = (new CreateUserNotificationChannel())->execute($data);
$channel = (new CreateUserNotificationChannel)->execute($data);
return response()->json([
'data' => NotificationsIndexViewHelper::dtoTelegram($channel),
@@ -53,7 +53,7 @@ class TelegramWebhookController extends Controller
$channel->active = true;
$channel->save();
(new ScheduleAllContactRemindersForNotificationChannel())->execute([
(new ScheduleAllContactRemindersForNotificationChannel)->execute([
'account_id' => $channel->user->account_id,
'author_id' => $channel->user->id,
'user_notification_channel_id' => $channel->id,
@@ -30,7 +30,7 @@ class PersonalizePetCategoriesController extends Controller
'name' => $request->input('name'),
];
$petCategory = (new CreatePetCategory())->execute($data);
$petCategory = (new CreatePetCategory)->execute($data);
return response()->json([
'data' => PersonalizePetCategoriesIndexViewHelper::dtoPetCategory($petCategory),
@@ -46,7 +46,7 @@ class PersonalizePetCategoriesController extends Controller
'name' => $request->input('name'),
];
$petCategory = (new UpdatePetCategory())->execute($data);
$petCategory = (new UpdatePetCategory)->execute($data);
return response()->json([
'data' => PersonalizePetCategoriesIndexViewHelper::dtoPetCategory($petCategory),
@@ -61,7 +61,7 @@ class PersonalizePetCategoriesController extends Controller
'pet_category_id' => $petCategoryId,
];
(new DestroyPetCategory())->execute($data);
(new DestroyPetCategory)->execute($data);
return response()->json([
'data' => true,

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