From a59309a8aa38f40b8b47e8033e4e4b93d9c31312 Mon Sep 17 00:00:00 2001 From: will Date: Fri, 14 Aug 2020 09:56:22 +0100 Subject: [PATCH 1/4] Enable deletion of subscribers --- resources/views/subscribers/index.blade.php | 11 +++++++++-- .../Subscribers/SubscribersController.php | 12 ++++++++++++ src/Models/Subscriber.php | 5 +++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/resources/views/subscribers/index.blade.php b/resources/views/subscribers/index.blade.php index 715cbece..e97a2a12 100644 --- a/resources/views/subscribers/index.blade.php +++ b/resources/views/subscribers/index.blade.php @@ -89,8 +89,15 @@ class="btn btn-md btn-light">{{ __('Clear') }} {{ __('Subscribed') }} @endif - {{ __('Edit') }} + +
+ @csrf + @method('DELETE') + {{ __('Edit') }} + +
+ @empty diff --git a/src/Http/Controllers/Subscribers/SubscribersController.php b/src/Http/Controllers/Subscribers/SubscribersController.php index 3ffdfbb4..9ff00e43 100644 --- a/src/Http/Controllers/Subscribers/SubscribersController.php +++ b/src/Http/Controllers/Subscribers/SubscribersController.php @@ -130,6 +130,18 @@ public function update(SubscriberRequest $request, int $id): RedirectResponse return redirect()->route('sendportal.subscribers.index'); } + /** + * @throws Exception + */ + public function destroy($id) + { + $subscriber = $this->subscriberRepo->find(auth()->user()->currentWorkspace()->id, $id); + + $subscriber->delete(); + + return redirect()->route('sendportal.subscribers.index')->withSuccess('Subscriber deleted'); + } + /** * @return string|StreamedResponse * @throws IOException diff --git a/src/Models/Subscriber.php b/src/Models/Subscriber.php index e4abeae4..fd4d6373 100644 --- a/src/Models/Subscriber.php +++ b/src/Models/Subscriber.php @@ -28,6 +28,11 @@ protected static function boot() static::creating(function ($model) { $model->hash = Uuid::uuid4()->toString(); }); + + static::deleting(function (self $subscriber) { + $subscriber->segments()->detach(); + $subscriber->messages()->delete(); + }); } public function workspace(): BelongsTo From 90fab000969e60cc2f024243065d07298afaef66 Mon Sep 17 00:00:00 2001 From: willselby Date: Fri, 14 Aug 2020 08:59:18 +0000 Subject: [PATCH 2/4] Apply php-cs-fixer changes --- .php_cs.cache | 1 + database/factories/EmailServiceFactory.php | 3 +- ...7_04_11_000000_create_workspaces_table.php | 2 +- ..._04_11_100000_create_invitations_table.php | 2 +- ..._11_133343_create_email_service_tables.php | 9 +++--- ...7_04_12_6000_create_unsubscribed_table.php | 9 +++--- ..._223029_create_campaign_statuses_table.php | 4 +-- ..._04_28_223840_create_subscribers_table.php | 4 +-- ...017_04_28_223844_create_segments_table.php | 4 +-- ...223854_create_segment_subscriber_table.php | 4 +-- ...17_04_28_223906_create_templates_table.php | 4 +-- ...17_04_28_223915_create_campaigns_table.php | 4 +-- ...2_104440_create_campaign_segment_table.php | 4 +-- ...019_07_10_194325_create_messages_table.php | 4 +-- ...07_30_153117_create_message_urls_table.php | 4 +-- .../2019_08_24_114758_adjust_users_table.php | 3 +- src/Adapters/MailgunMailAdapter.php | 1 - src/Adapters/SesMailAdapter.php | 4 +-- src/Console/Commands/SetupProduction.php | 12 +++++--- src/Console/Kernel.php | 2 +- src/Events/MessageDispatchEvent.php | 9 ++---- src/Events/SubscriberAddedEvent.php | 2 +- .../Webhooks/MailgunWebhookReceived.php | 5 ++-- src/Factories/MailAdapterFactory.php | 2 +- .../Controllers/Ajax/SegmentsController.php | 3 -- .../Api/CampaignDispatchController.php | 3 +- .../Api/SegmentSubscribersController.php | 4 +-- .../Controllers/Api/SegmentsController.php | 7 ++--- .../Api/SubscriberSegmentsController.php | 5 ++-- .../Controllers/Api/SubscribersController.php | 6 ++-- .../Controllers/Api/TemplatesController.php | 3 +- .../Controllers/Api/WorkspacesController.php | 4 +-- .../Controllers/Auth/ProfileController.php | 1 - .../Controllers/Auth/RegisterController.php | 2 +- .../Controllers/Webview/WebviewController.php | 4 +-- .../PendingInvitationController.php | 6 ++-- .../Workspaces/SwitchWorkspaceController.php | 2 +- src/Http/Middleware/VerifyUserOnWorkspace.php | 2 +- .../Api/SegmentSubscriberDestroyRequest.php | 2 +- .../Api/SegmentSubscriberStoreRequest.php | 2 +- .../Api/SegmentSubscriberUpdateRequest.php | 2 +- .../Api/SubscriberSegmentDestroyRequest.php | 2 +- .../Api/SubscriberSegmentStoreRequest.php | 2 +- .../Api/SubscriberSegmentUpdateRequest.php | 2 +- .../Requests/EmailServiceStoreRequest.php | 2 +- .../Requests/EmailServiceUpdateRequest.php | 2 +- .../WorkspaceInvitationStoreRequest.php | 2 +- src/Models/User.php | 4 +-- src/Providers/EventServiceProvider.php | 8 ++--- src/Providers/FormServiceProvider.php | 28 ++++++++--------- .../SendportalAppServiceProvider.php | 2 +- .../SqliteCampaignTenantRepository.php | 2 -- src/Repositories/WorkspacesRepository.php | 4 +-- src/Rules/CanAccessSegment.php | 6 ++-- src/Rules/CanAccessSubscriber.php | 6 ++-- src/Rules/ValidInvitation.php | 2 +- .../Campaigns/CampaignDispatchService.php | 2 +- src/Services/Messages/DispatchMessage.php | 6 ++-- src/Services/Messages/RelayMessage.php | 2 +- src/Services/Messages/ResolveEmailService.php | 2 +- src/Services/Segments/ApiSegmentService.php | 4 +-- .../Segments/ApiSegmentSubscriberService.php | 2 +- .../Subscribers/ApiSubscriberService.php | 5 ++-- .../Subscribers/ImportSubscriberService.php | 2 +- .../Segments/ApiSubscriberSegmentService.php | 2 +- src/Services/Workspaces/AcceptInvitation.php | 6 ++-- .../Workspaces/AddWorkspaceMember.php | 2 +- src/Services/Workspaces/CreateWorkspace.php | 6 ++-- .../Workspaces/RemoveUserFromWorkspace.php | 2 +- src/Services/Workspaces/SendInvitation.php | 6 ++-- .../Feature/API/SubscribersControllerTest.php | 2 +- tests/Feature/API/TemplatesControllerTest.php | 2 +- .../Feature/API/WorkspacesControllerTest.php | 8 ++--- tests/Feature/Auth/AuthConfigDisabledTest.php | 8 ++--- tests/Feature/Auth/AuthConfigEnabledTest.php | 10 ++----- .../Campaigns/CampaignControllerTest.php | 24 +++++++-------- .../CampaignReportsControllerTest.php | 12 ++++---- tests/Feature/Content/MergeContentTest.php | 12 ++++---- .../EmailServicesControllerTest.php | 16 +++++----- .../ExistingUserInvitationTest.php | 14 ++++----- .../Invitations/NewUserInvitationTest.php | 6 ++-- .../Messages/MessagesControllerTest.php | 10 +++---- .../Segments/SegmentsControllerTest.php | 10 +++---- .../Subscribers/SubscribersControllerTest.php | 12 ++++---- .../Templates/TemplatesControllerTest.php | 30 +++++++++---------- .../Feature/Webhooks/MailgunWebhooksTest.php | 2 +- .../Feature/Webview/WebviewControllerTest.php | 2 +- .../Workspaces/SwitchWorkspaceTest.php | 8 ++--- .../WorkspaceInvitationsControllerTest.php | 10 +++---- .../WorkspaceUserControllerTest.php | 13 ++++---- .../Workspaces/WorkspacesControllerTest.php | 10 +++---- tests/SendportalTestSupportTrait.php | 3 +- tests/TestCase.php | 2 +- .../Unit/Factories/MailAdapterFactoryTest.php | 12 ++++---- tests/Unit/Models/CampaignTest.php | 22 ++++++-------- tests/Unit/Models/SubscriberTest.php | 6 ++-- tests/Unit/Models/TemplateTest.php | 7 ++--- .../CampaignTenantRepositoryTest.php | 10 +++---- .../MessageTenantRepositoryTest.php | 9 +++--- .../SubscriberTenantRepositoryTest.php | 4 +-- .../Messages/MessageTrackingOptionsTest.php | 14 ++++----- 101 files changed, 280 insertions(+), 313 deletions(-) create mode 100644 .php_cs.cache diff --git a/.php_cs.cache b/.php_cs.cache new file mode 100644 index 00000000..f22f60d0 --- /dev/null +++ b/.php_cs.cache @@ -0,0 +1 @@ +{"php":"7.4.7","version":"2.16.4","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces":true,"class_definition":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"ordered_imports":{"sortAlgorithm":"alpha"},"no_unused_imports":true},"hashes":{"tests\/Feature\/Webview\/WebviewControllerTest.php":2535759113,"tests\/Feature\/API\/SubscribersControllerTest.php":2793740894,"tests\/Feature\/API\/SegmentsControllerTest.php":237579380,"tests\/Feature\/API\/CampaignsControllerTest.php":2986507470,"tests\/Feature\/API\/SegmentSubscribersControllerTest.php":90654729,"tests\/Feature\/API\/TemplatesControllerTest.php":1464508170,"tests\/Feature\/API\/CampaignDispatchControllerTest.php":1815088962,"tests\/Feature\/API\/SubscriberSegmentsControllerTest.php":2045771091,"tests\/Feature\/API\/WorkspacesControllerTest.php":3695478411,"tests\/Feature\/Workspaces\/WorkspaceUserControllerTest.php":4194838600,"tests\/Feature\/Workspaces\/WorkspaceInvitationsControllerTest.php":1686923043,"tests\/Feature\/Workspaces\/SwitchWorkspaceTest.php":3132868480,"tests\/Feature\/Workspaces\/WorkspacesControllerTest.php":4117964831,"tests\/Feature\/Auth\/AuthConfigDisabledTest.php":2712218786,"tests\/Feature\/Auth\/AuthConfigEnabledTest.php":2050691960,"tests\/Feature\/Messages\/MessagesControllerTest.php":2262982461,"tests\/Feature\/Webhooks\/PostmarkWebhooksTest.php":2588822427,"tests\/Feature\/Webhooks\/SendgridWebhooksTest.php":4249665791,"tests\/Feature\/Webhooks\/MailgunWebhooksTest.php":3791954128,"tests\/Feature\/Webhooks\/AwsWebhooksTest.php":3493563250,"tests\/Feature\/Subscribers\/SubscribersControllerTest.php":1037559540,"tests\/Feature\/Segments\/SegmentsControllerTest.php":2325615301,"tests\/Feature\/EmailServices\/EmailServicesControllerTest.php":725788716,"tests\/Feature\/Campaigns\/CampaignReportsControllerTest.php":1350626890,"tests\/Feature\/Campaigns\/CampaignControllerTest.php":596263424,"tests\/Feature\/Content\/MergeContentTest.php":534700073,"tests\/Feature\/Templates\/TemplatesControllerTest.php":3203633291,"tests\/Feature\/Invitations\/NewUserInvitationTest.php":2719907928,"tests\/Feature\/Invitations\/ExistingUserInvitationTest.php":240790849,"tests\/TestCase.php":3795584197,"tests\/SendportalTestSupportTrait.php":551796750,"tests\/Unit\/Repositories\/CampaignTenantRepositoryTest.php":2402313543,"tests\/Unit\/Repositories\/MessageTenantRepositoryTest.php":3623740779,"tests\/Unit\/Repositories\/SubscriberTenantRepositoryTest.php":898571096,"tests\/Unit\/Services\/Messages\/MessageTrackingOptionsTest.php":46944835,"tests\/Unit\/Factories\/MailAdapterFactoryTest.php":3399406624,"tests\/Unit\/Models\/CampaignTest.php":870437449,"tests\/Unit\/Models\/TemplateTest.php":79881901,"tests\/Unit\/Models\/SubscriberTest.php":3142694578,"routes\/api.php":1150129286,"routes\/web.php":2837450997,"src\/Adapters\/BaseMailAdapter.php":2529230802,"src\/Adapters\/SendgridMailAdapter.php":4277132130,"src\/Adapters\/MailgunMailAdapter.php":1483562893,"src\/Adapters\/SesMailAdapter.php":3730945172,"src\/Adapters\/PostmarkMailAdapter.php":538078784,"src\/Http\/Requests\/CampaignDeleteRequest.php":368609726,"src\/Http\/Requests\/Api\/SegmentSubscriberStoreRequest.php":3248423559,"src\/Http\/Requests\/Api\/TemplateUpdateRequest.php":687342421,"src\/Http\/Requests\/Api\/SegmentSubscriberUpdateRequest.php":942935001,"src\/Http\/Requests\/Api\/SegmentSubscriberDestroyRequest.php":466145461,"src\/Http\/Requests\/Api\/SubscriberUpdateRequest.php":4219924558,"src\/Http\/Requests\/Api\/CampaignDispatchRequest.php":288916051,"src\/Http\/Requests\/Api\/SubscriberSegmentUpdateRequest.php":678637663,"src\/Http\/Requests\/Api\/CampaignStoreRequest.php":3290281303,"src\/Http\/Requests\/Api\/SegmentStoreRequest.php":2456712749,"src\/Http\/Requests\/Api\/SubscriberSegmentStoreRequest.php":1536255200,"src\/Http\/Requests\/Api\/TemplateStoreRequest.php":1142475105,"src\/Http\/Requests\/Api\/SegmentUpdateRequest.php":1514958860,"src\/Http\/Requests\/Api\/SubscriberSegmentDestroyRequest.php":3287356123,"src\/Http\/Requests\/Api\/SubscriberStoreRequest.php":3612893729,"src\/Http\/Requests\/TemplateUpdateRequest.php":3503722152,"src\/Http\/Requests\/SubscriptionToggleRequest.php":3726657740,"src\/Http\/Requests\/Workspaces\/WorkspaceUpdateRequest.php":1321366471,"src\/Http\/Requests\/Workspaces\/WorkspaceInvitationStoreRequest.php":2630595037,"src\/Http\/Requests\/Workspaces\/CreateWorkspaceRequest.php":3431339599,"src\/Http\/Requests\/Workspaces\/WorkspaceStoreRequest.php":3537047411,"src\/Http\/Requests\/CampaignDispatchRequest.php":1281664598,"src\/Http\/Requests\/CampaignStoreRequest.php":3645991413,"src\/Http\/Requests\/CampaignTestRequest.php":4235293899,"src\/Http\/Requests\/SubscriberRequest.php":192801441,"src\/Http\/Requests\/SegmentRequest.php":4283208938,"src\/Http\/Requests\/EmailServiceStoreRequest.php":1247658478,"src\/Http\/Requests\/CampaignContentRequest.php":1232189474,"src\/Http\/Requests\/ProfileUpdateRequest.php":2459854388,"src\/Http\/Requests\/CampaignTemplateUpdateRequest.php":120478771,"src\/Http\/Requests\/EmailServiceUpdateRequest.php":2689607115,"src\/Http\/Requests\/TemplateStoreRequest.php":1415487707,"src\/Http\/Requests\/SubscribersImportRequest.php":3691588349,"src\/Http\/Controllers\/Subscriptions\/SubscriptionsController.php":974643272,"src\/Http\/Controllers\/Api\/SegmentSubscribersController.php":2600232672,"src\/Http\/Controllers\/Api\/CampaignsController.php":1735125716,"src\/Http\/Controllers\/Api\/SegmentsController.php":1362180760,"src\/Http\/Controllers\/Api\/Webhooks\/SesWebhooksController.php":3278766678,"src\/Http\/Controllers\/Api\/Webhooks\/SendgridWebhooksController.php":308336950,"src\/Http\/Controllers\/Api\/Webhooks\/PostmarkWebhooksController.php":2649888651,"src\/Http\/Controllers\/Api\/Webhooks\/MailgunWebhooksController.php":1388261497,"src\/Http\/Controllers\/Api\/CampaignDispatchController.php":1190800482,"src\/Http\/Controllers\/Api\/SubscribersController.php":2129517280,"src\/Http\/Controllers\/Api\/WorkspacesController.php":4223646033,"src\/Http\/Controllers\/Api\/TemplatesController.php":2851414694,"src\/Http\/Controllers\/Api\/SubscriberSegmentsController.php":305668822,"src\/Http\/Controllers\/Webview\/WebviewController.php":3714420626,"src\/Http\/Controllers\/Workspaces\/PendingInvitationController.php":3832725633,"src\/Http\/Controllers\/Workspaces\/WorkspaceUsersController.php":884123219,"src\/Http\/Controllers\/Workspaces\/WorkspacesController.php":2433208414,"src\/Http\/Controllers\/Workspaces\/WorkspaceInvitationsController.php":587975813,"src\/Http\/Controllers\/Workspaces\/SwitchWorkspaceController.php":1038632863,"src\/Http\/Controllers\/Auth\/RegisterController.php":2992468056,"src\/Http\/Controllers\/Auth\/VerificationController.php":3586878139,"src\/Http\/Controllers\/Auth\/ResetPasswordController.php":2095143753,"src\/Http\/Controllers\/Auth\/LoginController.php":626790338,"src\/Http\/Controllers\/Auth\/ForgotPasswordController.php":1596906878,"src\/Http\/Controllers\/Auth\/ConfirmPasswordController.php":3132239200,"src\/Http\/Controllers\/Auth\/ProfileController.php":2127456338,"src\/Http\/Controllers\/Ajax\/SegmentsController.php":3641837735,"src\/Http\/Controllers\/Subscribers\/SubscribersImportController.php":2185379622,"src\/Http\/Controllers\/Subscribers\/SubscribersController.php":641038576,"src\/Http\/Controllers\/Segments\/SegmentsController.php":1140188137,"src\/Http\/Controllers\/EmailServices\/EmailServicesController.php":2627691162,"src\/Http\/Controllers\/MessagesController.php":2429663066,"src\/Http\/Controllers\/Campaigns\/CampaignReportsController.php":1746840511,"src\/Http\/Controllers\/Campaigns\/CampaignTestController.php":1673734283,"src\/Http\/Controllers\/Campaigns\/CampaignsController.php":2955818422,"src\/Http\/Controllers\/Campaigns\/CampaignDispatchController.php":2047400719,"src\/Http\/Controllers\/Campaigns\/CampaignDeleteController.php":1879365339,"src\/Http\/Controllers\/Campaigns\/CampaignDuplicateController.php":84112401,"src\/Http\/Controllers\/DashboardController.php":4165878695,"src\/Http\/Controllers\/Controller.php":153774118,"src\/Http\/Controllers\/TemplatesController.php":3671674407,"src\/Http\/Middleware\/Authenticate.php":1835928171,"src\/Http\/Middleware\/RedirectIfAuthenticated.php":640989464,"src\/Http\/Middleware\/LocaleMiddleware.php":4107854528,"src\/Http\/Middleware\/TrustProxies.php":1757267858,"src\/Http\/Middleware\/VerifyCsrfToken.php":1775469156,"src\/Http\/Middleware\/OwnsRequestedWorkspace.php":2914479210,"src\/Http\/Middleware\/TrimStrings.php":2385018901,"src\/Http\/Middleware\/OwnsCurrentWorkspace.php":3501720709,"src\/Http\/Middleware\/CheckForMaintenanceMode.php":259153984,"src\/Http\/Middleware\/EncryptCookies.php":3774761695,"src\/Http\/Middleware\/VerifyUserOnWorkspace.php":2687531141,"src\/Http\/Resources\/Workspace.php":4013160935,"src\/Http\/Resources\/Subscriber.php":1824029385,"src\/Http\/Resources\/Template.php":3600632339,"src\/Http\/Resources\/Segment.php":213263096,"src\/Http\/Resources\/Campaign.php":463656753,"src\/SendportalBaseServiceProvider.php":2864458849,"src\/Pipelines\/Campaigns\/CreateMessages.php":605678265,"src\/Pipelines\/Campaigns\/CompleteCampaign.php":3051555738,"src\/Pipelines\/Campaigns\/StartCampaign.php":4264567283,"src\/Interfaces\/QuotaServiceInterface.php":3710829468,"src\/Interfaces\/BaseEloquentInterface.php":2679968441,"src\/Interfaces\/BaseTenantInterface.php":1039061782,"src\/Interfaces\/MailAdapterInterface.php":2744397698,"src\/Console\/Kernel.php":753701322,"src\/Console\/Commands\/SetupProduction.php":289982368,"src\/Console\/Commands\/CampaignDispatchCommand.php":1955564877,"src\/Console\/Commands\/GenerateTestSubscribers.php":972254575,"src\/Presenters\/CampaignReportPresenter.php":163420074,"src\/Repositories\/BaseEloquentRepository.php":2158650621,"src\/Repositories\/Messages\/PostgresMessageTenantRepository.php":1122750600,"src\/Repositories\/Messages\/MySqlMessageTenantRepository.php":3090359210,"src\/Repositories\/Messages\/SqliteMessageTenantRepository.php":997597262,"src\/Repositories\/Messages\/MessageTenantRepositoryInterface.php":1440401593,"src\/Repositories\/Messages\/BaseMessageTenantRepository.php":2009232862,"src\/Repositories\/TemplateTenantRepository.php":1819072745,"src\/Repositories\/WorkspacesRepository.php":584366456,"src\/Repositories\/EmailServiceTenantRepository.php":1345639575,"src\/Repositories\/Subscribers\/MySqlSubscriberTenantRepository.php":3625049486,"src\/Repositories\/Subscribers\/SubscriberTenantRepositoryInterface.php":2399497237,"src\/Repositories\/Subscribers\/PostgresSubscriberTenantRepository.php":1695259078,"src\/Repositories\/Subscribers\/SqliteSubscriberTenantRepository.php":2448479769,"src\/Repositories\/Subscribers\/BaseSubscriberTenantRepository.php":2182538747,"src\/Repositories\/SegmentTenantRepository.php":1787839002,"src\/Repositories\/Campaigns\/PostgresCampaignTenantRepository.php":687676756,"src\/Repositories\/Campaigns\/BaseCampaignTenantRepository.php":3322151715,"src\/Repositories\/Campaigns\/MySqlCampaignTenantRepository.php":3211702238,"src\/Repositories\/Campaigns\/CampaignTenantRepositoryInterface.php":3044258004,"src\/Repositories\/Campaigns\/SqliteCampaignTenantRepository.php":752618084,"src\/Repositories\/MessageUrlRepository.php":520332968,"src\/Repositories\/BaseTenantRepository.php":3464483901,"src\/Listeners\/Webhooks\/HandleMailgunWebhook.php":508480186,"src\/Listeners\/Webhooks\/HandleSendgridWebhook.php":2195241036,"src\/Listeners\/Webhooks\/HandleSesWebhook.php":1514930979,"src\/Listeners\/Webhooks\/HandlePostmarkWebhook.php":1633073198,"src\/Listeners\/MessageDispatchHandler.php":3514540013,"src\/Services\/QuotaService.php":151482878,"src\/Services\/Workspaces\/SendInvitation.php":3173336885,"src\/Services\/Workspaces\/AddWorkspaceMember.php":2951754652,"src\/Services\/Workspaces\/RemoveUserFromWorkspace.php":1894874548,"src\/Services\/Workspaces\/CreateWorkspace.php":3676529903,"src\/Services\/Workspaces\/AcceptInvitation.php":3970362876,"src\/Services\/Messages\/DispatchTestMessage.php":3794709464,"src\/Services\/Messages\/MarkAsSent.php":3611214529,"src\/Services\/Messages\/ResolveEmailService.php":3697855227,"src\/Services\/Messages\/MessageTrackingOptions.php":4038519324,"src\/Services\/Messages\/RelayMessage.php":943777897,"src\/Services\/Messages\/DispatchMessage.php":4098833346,"src\/Services\/Messages\/MessageOptions.php":2820793114,"src\/Services\/Webhooks\/EmailWebhookService.php":4148027466,"src\/Services\/Webhooks\/Mailgun\/WebhookVerifier.php":1769120066,"src\/Services\/Subscribers\/ApiSubscriberService.php":378793899,"src\/Services\/Subscribers\/ImportSubscriberService.php":3839923391,"src\/Services\/Subscribers\/Segments\/ApiSubscriberSegmentService.php":3998235018,"src\/Services\/Segments\/ApiSegmentSubscriberService.php":2982311498,"src\/Services\/Segments\/ApiSegmentService.php":4098631072,"src\/Services\/Campaigns\/CampaignDispatchService.php":1513872021,"src\/Services\/Campaigns\/CampaignStatisticsService.php":2101873625,"src\/Services\/Content\/MergeContent.php":3812284428,"src\/Services\/Helper.php":3273682296,"src\/Services\/Templates\/TemplateService.php":2140165200,"src\/Factories\/MailAdapterFactory.php":1275052413,"src\/Models\/CampaignStatus.php":3579786638,"src\/Models\/EmailServiceType.php":130851654,"src\/Models\/Workspace.php":2656358466,"src\/Models\/EmailService.php":597585726,"src\/Models\/User.php":3658292469,"src\/Models\/Subscriber.php":2469698271,"src\/Models\/UnsubscribeEventType.php":1462800983,"src\/Models\/Invitation.php":690254896,"src\/Models\/BaseModel.php":4169817253,"src\/Models\/Template.php":806389561,"src\/Models\/Segment.php":4146847716,"src\/Models\/Subscription.php":2794321122,"src\/Models\/MessageFailure.php":1302806817,"src\/Models\/MessageUrl.php":2259379933,"src\/Models\/Message.php":760476053,"src\/Models\/Campaign.php":1442081003,"src\/Exceptions\/Handler.php":2905627596,"src\/Events\/MessageDispatchEvent.php":301345637,"src\/Events\/Webhooks\/MailgunWebhookReceived.php":3881941755,"src\/Events\/Webhooks\/PostmarkWebhookReceived.php":3896170533,"src\/Events\/Webhooks\/SesWebhookReceived.php":743580678,"src\/Events\/Webhooks\/SendgridWebhookReceived.php":641948760,"src\/Events\/SubscriberAddedEvent.php":2226178055,"src\/Rules\/CanAccessSubscriber.php":1821529708,"src\/Rules\/CanAccessSegment.php":2886742344,"src\/Rules\/ValidInvitation.php":1919343115,"src\/Rules\/NotEmpty.php":881473860,"src\/Providers\/RouteServiceProvider.php":478969985,"src\/Providers\/EventServiceProvider.php":98020599,"src\/Providers\/FormServiceProvider.php":1015303618,"src\/Providers\/SendportalAppServiceProvider.php":4286129681,"src\/Facades\/Helper.php":4106765437,"src\/Traits\/SecondsToHms.php":1549572817,"src\/Traits\/ResolvesDatabaseDriver.php":2784887599,"src\/Traits\/NormalizeTags.php":3993386615,"src\/Traits\/ThrottlesSending.php":1616950802,"src\/Traits\/HasWorkspaces.php":959401559,"src\/Traits\/ScheduledAt.php":4210545466,"src\/Traits\/ChecksInvitations.php":1292936512,"src\/Traits\/Uuid.php":1070796280,"config\/config.php":3284073876,"database\/factories\/EmailServiceFactory.php":98771028,"database\/factories\/InvitationFactory.php":87011664,"database\/factories\/UserFactory.php":462382854,"database\/factories\/MessageFactory.php":1438262214,"database\/factories\/SegmentFactory.php":3001303380,"database\/factories\/CampaignFactory.php":292229003,"database\/factories\/SubscriberFactory.php":736716877,"database\/factories\/TemplateFactory.php":3401919933,"database\/factories\/WorkspaceFactory.php":2487381381,"database\/migrations\/2017_04_11_133343_create_email_service_tables.php":131230242,"database\/migrations\/2019_07_30_153117_create_message_urls_table.php":375655402,"database\/migrations\/2017_04_28_223915_create_campaigns_table.php":3706508056,"database\/migrations\/2017_04_28_223840_create_subscribers_table.php":467982134,"database\/migrations\/2019_08_19_000000_create_failed_jobs_table.php":1910101684,"database\/migrations\/2017_04_11_000000_create_workspaces_table.php":167376516,"database\/migrations\/2019_08_24_114758_adjust_users_table.php":844901304,"database\/migrations\/2019_07_10_194325_create_messages_table.php":748935844,"database\/migrations\/2017_04_28_223029_create_campaign_statuses_table.php":64947054,"database\/migrations\/2020_06_16_072116_adjust_campaign_content.php":3013201675,"database\/migrations\/2017_04_28_223854_create_segment_subscriber_table.php":1648290932,"database\/migrations\/2020_01_23_153845_create_message_failures_table.php":2300201577,"database\/migrations\/2017_04_12_6000_create_unsubscribed_table.php":2234240014,"database\/migrations\/2020_06_16_072137_adjust_template_content.php":869559510,"database\/migrations\/2017_04_28_223844_create_segments_table.php":1418574083,"database\/migrations\/2014_10_12_000000_create_users_table.php":2307441707,"database\/migrations\/2017_05_02_104440_create_campaign_segment_table.php":2739174255,"database\/migrations\/2014_10_12_100000_create_password_resets_table.php":2899799885,"database\/migrations\/2017_04_11_100000_create_invitations_table.php":1137353567,"database\/migrations\/2017_04_28_223906_create_templates_table.php":2287907578}} \ No newline at end of file diff --git a/database/factories/EmailServiceFactory.php b/database/factories/EmailServiceFactory.php index d086da36..2e5af5e4 100644 --- a/database/factories/EmailServiceFactory.php +++ b/database/factories/EmailServiceFactory.php @@ -8,8 +8,7 @@ use Sendportal\Base\Models\EmailServiceType; use Sendportal\Base\Models\Workspace; -$factory->define(EmailService::class, function (Faker $faker) -{ +$factory->define(EmailService::class, function (Faker $faker) { return [ 'name' => ucwords($faker->word), 'workspace_id' => factory(Workspace::class), diff --git a/database/migrations/2017_04_11_000000_create_workspaces_table.php b/database/migrations/2017_04_11_000000_create_workspaces_table.php index 85b9f74f..edf2d8ac 100644 --- a/database/migrations/2017_04_11_000000_create_workspaces_table.php +++ b/database/migrations/2017_04_11_000000_create_workspaces_table.php @@ -1,7 +1,7 @@ increments('id'); $table->string('name'); $table->timestamps(); @@ -22,7 +21,7 @@ public function up() $this->seedEmailServiceTypes(); - \Schema::create('email_services', function(Blueprint $table) { + \Schema::create('email_services', function (Blueprint $table) { $table->increments('id'); $table->unsignedInteger('workspace_id'); $table->string('name')->nullable(); @@ -59,4 +58,4 @@ protected function seedEmailServiceTypes() 'name' => 'Postmark' ]); } -} \ No newline at end of file +} diff --git a/database/migrations/2017_04_12_6000_create_unsubscribed_table.php b/database/migrations/2017_04_12_6000_create_unsubscribed_table.php index ea6d3332..992109dc 100644 --- a/database/migrations/2017_04_12_6000_create_unsubscribed_table.php +++ b/database/migrations/2017_04_12_6000_create_unsubscribed_table.php @@ -1,9 +1,9 @@ increments('id'); $table->string('name'); }); @@ -27,8 +27,7 @@ public function up() UnsubscribeEventType::MANUAL_BY_SUBSCRIBER => 'Manual by Subscriber', ]; - foreach($types as $id => $name) - { + foreach ($types as $id => $name) { DB::table('unsubscribe_event_types')->insert([ 'id' => $id, 'name' => $name diff --git a/database/migrations/2017_04_28_223029_create_campaign_statuses_table.php b/database/migrations/2017_04_28_223029_create_campaign_statuses_table.php index 9c426f3a..0a8850f9 100644 --- a/database/migrations/2017_04_28_223029_create_campaign_statuses_table.php +++ b/database/migrations/2017_04_28_223029_create_campaign_statuses_table.php @@ -1,8 +1,8 @@ [ 'Data' => $subject, ], - 'Body' => array( + 'Body' => [ 'Html' => [ 'Data' => $content, ], - ), + ], ], 'ConfigurationSetName' => Arr::get($this->config, 'configuration_set_name'), ]); diff --git a/src/Console/Commands/SetupProduction.php b/src/Console/Commands/SetupProduction.php index 92ed2e86..633be402 100644 --- a/src/Console/Commands/SetupProduction.php +++ b/src/Console/Commands/SetupProduction.php @@ -132,8 +132,10 @@ protected function checkDatabaseConnection(): void protected function createDatabaseCredentials(): bool { - $storeCredentials = $this->confirm('Unable to connect to your database. Would you like to enter your credentials now?', - true); + $storeCredentials = $this->confirm( + 'Unable to connect to your database. Would you like to enter your credentials now?', + true + ); if (!$storeCredentials) { return false; @@ -201,8 +203,10 @@ protected function checkMigrations(): void */ protected function runMigrations(): bool { - $runMigrations = $this->confirm('There are pending database migrations. Would you like to run migrations now?', - true); + $runMigrations = $this->confirm( + 'There are pending database migrations. Would you like to run migrations now?', + true + ); if (!$runMigrations) { return false; diff --git a/src/Console/Kernel.php b/src/Console/Kernel.php index 00dfdff0..b86c0d41 100644 --- a/src/Console/Kernel.php +++ b/src/Console/Kernel.php @@ -3,8 +3,8 @@ namespace Sendportal\Base\Console; use Illuminate\Console\Scheduling\Schedule; -use Sendportal\Base\Console\Commands\CampaignDispatchCommand; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; +use Sendportal\Base\Console\Commands\CampaignDispatchCommand; class Kernel extends ConsoleKernel { diff --git a/src/Events/MessageDispatchEvent.php b/src/Events/MessageDispatchEvent.php index a813cab5..712e300d 100644 --- a/src/Events/MessageDispatchEvent.php +++ b/src/Events/MessageDispatchEvent.php @@ -2,14 +2,11 @@ namespace Sendportal\Base\Events; -use Sendportal\Base\Models\Message; -use Illuminate\Broadcasting\Channel; -use Illuminate\Queue\SerializesModels; +use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Broadcasting\PrivateChannel; -use Illuminate\Broadcasting\PresenceChannel; use Illuminate\Foundation\Events\Dispatchable; -use Illuminate\Broadcasting\InteractsWithSockets; -use Illuminate\Contracts\Broadcasting\ShouldBroadcast; +use Illuminate\Queue\SerializesModels; +use Sendportal\Base\Models\Message; class MessageDispatchEvent { diff --git a/src/Events/SubscriberAddedEvent.php b/src/Events/SubscriberAddedEvent.php index 5637eb30..8dfdf0d5 100644 --- a/src/Events/SubscriberAddedEvent.php +++ b/src/Events/SubscriberAddedEvent.php @@ -4,10 +4,10 @@ namespace Sendportal\Base\Events; -use Sendportal\Base\Models\Subscriber; use Illuminate\Broadcasting\InteractsWithSockets; use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Queue\SerializesModels; +use Sendportal\Base\Models\Subscriber; class SubscriberAddedEvent { diff --git a/src/Events/Webhooks/MailgunWebhookReceived.php b/src/Events/Webhooks/MailgunWebhookReceived.php index 4ed75bee..b6c37010 100644 --- a/src/Events/Webhooks/MailgunWebhookReceived.php +++ b/src/Events/Webhooks/MailgunWebhookReceived.php @@ -2,10 +2,9 @@ namespace Sendportal\Base\Events\Webhooks; -use Illuminate\Queue\SerializesModels; -use Illuminate\Broadcasting\PrivateChannel; -use Illuminate\Foundation\Events\Dispatchable; use Illuminate\Broadcasting\InteractsWithSockets; +use Illuminate\Foundation\Events\Dispatchable; +use Illuminate\Queue\SerializesModels; class MailgunWebhookReceived { diff --git a/src/Factories/MailAdapterFactory.php b/src/Factories/MailAdapterFactory.php index af96d2bf..33f42a4c 100644 --- a/src/Factories/MailAdapterFactory.php +++ b/src/Factories/MailAdapterFactory.php @@ -4,6 +4,7 @@ namespace Sendportal\Base\Factories; +use InvalidArgumentException; use Sendportal\Base\Adapters\MailgunMailAdapter; use Sendportal\Base\Adapters\PostmarkMailAdapter; use Sendportal\Base\Adapters\SendgridMailAdapter; @@ -11,7 +12,6 @@ use Sendportal\Base\Interfaces\MailAdapterInterface; use Sendportal\Base\Models\EmailService; use Sendportal\Base\Models\EmailServiceType; -use InvalidArgumentException; class MailAdapterFactory { diff --git a/src/Http/Controllers/Ajax/SegmentsController.php b/src/Http/Controllers/Ajax/SegmentsController.php index ae6075fd..361140db 100644 --- a/src/Http/Controllers/Ajax/SegmentsController.php +++ b/src/Http/Controllers/Ajax/SegmentsController.php @@ -5,11 +5,8 @@ use Sendportal\Base\Http\Controllers\Controller; use Sendportal\Base\Http\Requests\Api\SegmentStoreRequest; -use Sendportal\Base\Http\Resources\Segment; use Sendportal\Base\Http\Resources\Segment as SegmentResource; use Sendportal\Base\Services\Segments\ApiSegmentService; -use Illuminate\Http\Resources\Json\AnonymousResourceCollection; -use Illuminate\Http\Response; class SegmentsController extends Controller { diff --git a/src/Http/Controllers/Api/CampaignDispatchController.php b/src/Http/Controllers/Api/CampaignDispatchController.php index 8f3f1d6f..970fa338 100644 --- a/src/Http/Controllers/Api/CampaignDispatchController.php +++ b/src/Http/Controllers/Api/CampaignDispatchController.php @@ -24,8 +24,7 @@ class CampaignDispatchController extends Controller public function __construct( CampaignTenantRepositoryInterface $campaigns, QuotaServiceInterface $quotaService - ) - { + ) { $this->campaigns = $campaigns; $this->quotaService = $quotaService; } diff --git a/src/Http/Controllers/Api/SegmentSubscribersController.php b/src/Http/Controllers/Api/SegmentSubscribersController.php index efa60452..063b2208 100644 --- a/src/Http/Controllers/Api/SegmentSubscribersController.php +++ b/src/Http/Controllers/Api/SegmentSubscribersController.php @@ -4,6 +4,8 @@ namespace Sendportal\Base\Http\Controllers\Api; +use Exception; +use Illuminate\Http\Resources\Json\AnonymousResourceCollection; use Sendportal\Base\Http\Controllers\Controller; use Sendportal\Base\Http\Requests\Api\SegmentSubscriberDestroyRequest; use Sendportal\Base\Http\Requests\Api\SegmentSubscriberStoreRequest; @@ -11,8 +13,6 @@ use Sendportal\Base\Http\Resources\Subscriber as SubscriberResource; use Sendportal\Base\Repositories\SegmentTenantRepository; use Sendportal\Base\Services\Segments\ApiSegmentSubscriberService; -use Exception; -use Illuminate\Http\Resources\Json\AnonymousResourceCollection; class SegmentSubscribersController extends Controller { diff --git a/src/Http/Controllers/Api/SegmentsController.php b/src/Http/Controllers/Api/SegmentsController.php index dd6af449..83b78052 100644 --- a/src/Http/Controllers/Api/SegmentsController.php +++ b/src/Http/Controllers/Api/SegmentsController.php @@ -4,16 +4,15 @@ namespace Sendportal\Base\Http\Controllers\Api; +use Exception; +use Illuminate\Http\Resources\Json\AnonymousResourceCollection; +use Illuminate\Http\Response; use Sendportal\Base\Http\Controllers\Controller; use Sendportal\Base\Http\Requests\Api\SegmentStoreRequest; use Sendportal\Base\Http\Requests\Api\SegmentUpdateRequest; -use Sendportal\Base\Http\Resources\Segment; use Sendportal\Base\Http\Resources\Segment as SegmentResource; use Sendportal\Base\Repositories\SegmentTenantRepository; use Sendportal\Base\Services\Segments\ApiSegmentService; -use Exception; -use Illuminate\Http\Resources\Json\AnonymousResourceCollection; -use Illuminate\Http\Response; class SegmentsController extends Controller { diff --git a/src/Http/Controllers/Api/SubscriberSegmentsController.php b/src/Http/Controllers/Api/SubscriberSegmentsController.php index 1ba96cea..c8e3eeb8 100644 --- a/src/Http/Controllers/Api/SubscriberSegmentsController.php +++ b/src/Http/Controllers/Api/SubscriberSegmentsController.php @@ -4,16 +4,15 @@ namespace Sendportal\Base\Http\Controllers\Api; +use Exception; +use Illuminate\Http\Resources\Json\AnonymousResourceCollection; use Sendportal\Base\Http\Controllers\Controller; use Sendportal\Base\Http\Requests\Api\SubscriberSegmentDestroyRequest; use Sendportal\Base\Http\Requests\Api\SubscriberSegmentStoreRequest; use Sendportal\Base\Http\Requests\Api\SubscriberSegmentUpdateRequest; -use Sendportal\Base\Http\Resources\Segment; use Sendportal\Base\Http\Resources\Segment as SegmentResource; use Sendportal\Base\Repositories\Subscribers\SubscriberTenantRepositoryInterface; use Sendportal\Base\Services\Subscribers\Segments\ApiSubscriberSegmentService; -use Exception; -use Illuminate\Http\Resources\Json\AnonymousResourceCollection; class SubscriberSegmentsController extends Controller { diff --git a/src/Http/Controllers/Api/SubscribersController.php b/src/Http/Controllers/Api/SubscribersController.php index c5028f84..f3302229 100644 --- a/src/Http/Controllers/Api/SubscribersController.php +++ b/src/Http/Controllers/Api/SubscribersController.php @@ -4,15 +4,15 @@ namespace Sendportal\Base\Http\Controllers\Api; +use Exception; +use Illuminate\Http\Resources\Json\AnonymousResourceCollection; +use Illuminate\Http\Response; use Sendportal\Base\Http\Controllers\Controller; use Sendportal\Base\Http\Requests\Api\SubscriberStoreRequest; use Sendportal\Base\Http\Requests\Api\SubscriberUpdateRequest; use Sendportal\Base\Http\Resources\Subscriber as SubscriberResource; use Sendportal\Base\Repositories\Subscribers\SubscriberTenantRepositoryInterface; use Sendportal\Base\Services\Subscribers\ApiSubscriberService; -use Exception; -use Illuminate\Http\Resources\Json\AnonymousResourceCollection; -use Illuminate\Http\Response; class SubscribersController extends Controller { diff --git a/src/Http/Controllers/Api/TemplatesController.php b/src/Http/Controllers/Api/TemplatesController.php index 04181c4b..85920d1c 100644 --- a/src/Http/Controllers/Api/TemplatesController.php +++ b/src/Http/Controllers/Api/TemplatesController.php @@ -74,8 +74,7 @@ public function destroy(int $workspaceId, int $id): Response { // TODO: Add a request object to test the validity of deleting the template. // In particular, whether it is in use. - if ( ! $this->service->delete($workspaceId, $id)) - { + if (! $this->service->delete($workspaceId, $id)) { return response(__('Cannot delete a template that has been used.'), 400); } diff --git a/src/Http/Controllers/Api/WorkspacesController.php b/src/Http/Controllers/Api/WorkspacesController.php index 0db4558e..7f7f8c42 100644 --- a/src/Http/Controllers/Api/WorkspacesController.php +++ b/src/Http/Controllers/Api/WorkspacesController.php @@ -4,12 +4,12 @@ namespace Sendportal\Base\Http\Controllers\Api; +use Exception; use Illuminate\Http\Request; +use Illuminate\Http\Resources\Json\AnonymousResourceCollection; use Sendportal\Base\Http\Controllers\Controller; use Sendportal\Base\Http\Resources\Workspace as WorkspaceResource; use Sendportal\Base\Repositories\WorkspacesRepository; -use Exception; -use Illuminate\Http\Resources\Json\AnonymousResourceCollection; class WorkspacesController extends Controller { diff --git a/src/Http/Controllers/Auth/ProfileController.php b/src/Http/Controllers/Auth/ProfileController.php index 22b61d3d..2444dca1 100644 --- a/src/Http/Controllers/Auth/ProfileController.php +++ b/src/Http/Controllers/Auth/ProfileController.php @@ -4,7 +4,6 @@ namespace Sendportal\Base\Http\Controllers\Auth; -use Exception; use Illuminate\Http\RedirectResponse; use Illuminate\View\View; use Sendportal\Base\Http\Controllers\Controller; diff --git a/src/Http/Controllers/Auth/RegisterController.php b/src/Http/Controllers/Auth/RegisterController.php index 1685b7fb..f3491445 100644 --- a/src/Http/Controllers/Auth/RegisterController.php +++ b/src/Http/Controllers/Auth/RegisterController.php @@ -12,8 +12,8 @@ use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; use Sendportal\Base\Http\Controllers\Controller; -use Sendportal\Base\Models\Workspace; use Sendportal\Base\Models\User; +use Sendportal\Base\Models\Workspace; use Sendportal\Base\Rules\ValidInvitation; use Sendportal\Base\Services\Workspaces\AcceptInvitation; use Sendportal\Base\Services\Workspaces\CreateWorkspace; diff --git a/src/Http/Controllers/Webview/WebviewController.php b/src/Http/Controllers/Webview/WebviewController.php index 41b93560..94fc674c 100644 --- a/src/Http/Controllers/Webview/WebviewController.php +++ b/src/Http/Controllers/Webview/WebviewController.php @@ -4,11 +4,11 @@ namespace Sendportal\Base\Http\Controllers\Webview; +use Exception; +use Illuminate\Contracts\View\View as ViewContract; use Sendportal\Base\Http\Controllers\Controller; use Sendportal\Base\Models\Message; use Sendportal\Base\Services\Content\MergeContent; -use Exception; -use Illuminate\Contracts\View\View as ViewContract; class WebviewController extends Controller { diff --git a/src/Http/Controllers/Workspaces/PendingInvitationController.php b/src/Http/Controllers/Workspaces/PendingInvitationController.php index ea9ec6f3..0a2738c2 100644 --- a/src/Http/Controllers/Workspaces/PendingInvitationController.php +++ b/src/Http/Controllers/Workspaces/PendingInvitationController.php @@ -4,12 +4,12 @@ namespace Sendportal\Base\Http\Controllers\Workspaces; -use Sendportal\Base\Http\Controllers\Controller; -use Sendportal\Base\Models\Invitation; -use Sendportal\Base\Services\Workspaces\AcceptInvitation; use Exception; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; +use Sendportal\Base\Http\Controllers\Controller; +use Sendportal\Base\Models\Invitation; +use Sendportal\Base\Services\Workspaces\AcceptInvitation; class PendingInvitationController extends Controller { diff --git a/src/Http/Controllers/Workspaces/SwitchWorkspaceController.php b/src/Http/Controllers/Workspaces/SwitchWorkspaceController.php index 82919b65..a7459f55 100644 --- a/src/Http/Controllers/Workspaces/SwitchWorkspaceController.php +++ b/src/Http/Controllers/Workspaces/SwitchWorkspaceController.php @@ -4,9 +4,9 @@ namespace Sendportal\Base\Http\Controllers\Workspaces; +use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Sendportal\Base\Models\Workspace; -use Illuminate\Http\RedirectResponse; class SwitchWorkspaceController { diff --git a/src/Http/Middleware/VerifyUserOnWorkspace.php b/src/Http/Middleware/VerifyUserOnWorkspace.php index 0c516418..7975df95 100644 --- a/src/Http/Middleware/VerifyUserOnWorkspace.php +++ b/src/Http/Middleware/VerifyUserOnWorkspace.php @@ -2,8 +2,8 @@ namespace Sendportal\Base\Http\Middleware; -use Sendportal\Base\Models\Workspace; use Closure; +use Sendportal\Base\Models\Workspace; class VerifyUserOnWorkspace { diff --git a/src/Http/Requests/Api/SegmentSubscriberDestroyRequest.php b/src/Http/Requests/Api/SegmentSubscriberDestroyRequest.php index 7dc58d79..6e3421d6 100644 --- a/src/Http/Requests/Api/SegmentSubscriberDestroyRequest.php +++ b/src/Http/Requests/Api/SegmentSubscriberDestroyRequest.php @@ -4,8 +4,8 @@ namespace Sendportal\Base\Http\Requests\Api; -use Sendportal\Base\Rules\CanAccessSubscriber; use Illuminate\Foundation\Http\FormRequest; +use Sendportal\Base\Rules\CanAccessSubscriber; class SegmentSubscriberDestroyRequest extends FormRequest { diff --git a/src/Http/Requests/Api/SegmentSubscriberStoreRequest.php b/src/Http/Requests/Api/SegmentSubscriberStoreRequest.php index 901c864b..543c78d3 100644 --- a/src/Http/Requests/Api/SegmentSubscriberStoreRequest.php +++ b/src/Http/Requests/Api/SegmentSubscriberStoreRequest.php @@ -4,8 +4,8 @@ namespace Sendportal\Base\Http\Requests\Api; -use Sendportal\Base\Rules\CanAccessSubscriber; use Illuminate\Foundation\Http\FormRequest; +use Sendportal\Base\Rules\CanAccessSubscriber; class SegmentSubscriberStoreRequest extends FormRequest { diff --git a/src/Http/Requests/Api/SegmentSubscriberUpdateRequest.php b/src/Http/Requests/Api/SegmentSubscriberUpdateRequest.php index 2bd51f90..99506c66 100644 --- a/src/Http/Requests/Api/SegmentSubscriberUpdateRequest.php +++ b/src/Http/Requests/Api/SegmentSubscriberUpdateRequest.php @@ -4,8 +4,8 @@ namespace Sendportal\Base\Http\Requests\Api; -use Sendportal\Base\Rules\CanAccessSubscriber; use Illuminate\Foundation\Http\FormRequest; +use Sendportal\Base\Rules\CanAccessSubscriber; class SegmentSubscriberUpdateRequest extends FormRequest { diff --git a/src/Http/Requests/Api/SubscriberSegmentDestroyRequest.php b/src/Http/Requests/Api/SubscriberSegmentDestroyRequest.php index f40a37b6..43fab11b 100644 --- a/src/Http/Requests/Api/SubscriberSegmentDestroyRequest.php +++ b/src/Http/Requests/Api/SubscriberSegmentDestroyRequest.php @@ -4,8 +4,8 @@ namespace Sendportal\Base\Http\Requests\Api; -use Sendportal\Base\Rules\CanAccessSegment; use Illuminate\Foundation\Http\FormRequest; +use Sendportal\Base\Rules\CanAccessSegment; class SubscriberSegmentDestroyRequest extends FormRequest { diff --git a/src/Http/Requests/Api/SubscriberSegmentStoreRequest.php b/src/Http/Requests/Api/SubscriberSegmentStoreRequest.php index aea15d3b..2bf0916a 100644 --- a/src/Http/Requests/Api/SubscriberSegmentStoreRequest.php +++ b/src/Http/Requests/Api/SubscriberSegmentStoreRequest.php @@ -4,8 +4,8 @@ namespace Sendportal\Base\Http\Requests\Api; -use Sendportal\Base\Rules\CanAccessSegment; use Illuminate\Foundation\Http\FormRequest; +use Sendportal\Base\Rules\CanAccessSegment; class SubscriberSegmentStoreRequest extends FormRequest { diff --git a/src/Http/Requests/Api/SubscriberSegmentUpdateRequest.php b/src/Http/Requests/Api/SubscriberSegmentUpdateRequest.php index bff661e5..0ae861be 100644 --- a/src/Http/Requests/Api/SubscriberSegmentUpdateRequest.php +++ b/src/Http/Requests/Api/SubscriberSegmentUpdateRequest.php @@ -4,8 +4,8 @@ namespace Sendportal\Base\Http\Requests\Api; -use Sendportal\Base\Rules\CanAccessSegment; use Illuminate\Foundation\Http\FormRequest; +use Sendportal\Base\Rules\CanAccessSegment; class SubscriberSegmentUpdateRequest extends FormRequest { diff --git a/src/Http/Requests/EmailServiceStoreRequest.php b/src/Http/Requests/EmailServiceStoreRequest.php index 4d7b1de5..6f86bcda 100644 --- a/src/Http/Requests/EmailServiceStoreRequest.php +++ b/src/Http/Requests/EmailServiceStoreRequest.php @@ -2,8 +2,8 @@ namespace Sendportal\Base\Http\Requests; -use Sendportal\Base\Models\EmailServiceType; use Illuminate\Foundation\Http\FormRequest; +use Sendportal\Base\Models\EmailServiceType; class EmailServiceStoreRequest extends FormRequest { diff --git a/src/Http/Requests/EmailServiceUpdateRequest.php b/src/Http/Requests/EmailServiceUpdateRequest.php index 1bea4e10..cba5d800 100644 --- a/src/Http/Requests/EmailServiceUpdateRequest.php +++ b/src/Http/Requests/EmailServiceUpdateRequest.php @@ -2,8 +2,8 @@ namespace Sendportal\Base\Http\Requests; -use Sendportal\Base\Models\EmailServiceType; use Illuminate\Foundation\Http\FormRequest; +use Sendportal\Base\Models\EmailServiceType; class EmailServiceUpdateRequest extends FormRequest { diff --git a/src/Http/Requests/Workspaces/WorkspaceInvitationStoreRequest.php b/src/Http/Requests/Workspaces/WorkspaceInvitationStoreRequest.php index a493d823..c91730a4 100644 --- a/src/Http/Requests/Workspaces/WorkspaceInvitationStoreRequest.php +++ b/src/Http/Requests/Workspaces/WorkspaceInvitationStoreRequest.php @@ -4,10 +4,10 @@ namespace Sendportal\Base\Http\Requests\Workspaces; -use Sendportal\Base\Models\Workspace; use Illuminate\Contracts\Validation\Validator as ValidatorContract; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Facades\Validator; +use Sendportal\Base\Models\Workspace; class WorkspaceInvitationStoreRequest extends FormRequest { diff --git a/src/Models/User.php b/src/Models/User.php index 1e3ae533..df38bf38 100644 --- a/src/Models/User.php +++ b/src/Models/User.php @@ -2,10 +2,10 @@ namespace Sendportal\Base\Models; -use Sendportal\Base\Traits\HasWorkspaces; -use Illuminate\Notifications\Notifiable; use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Foundation\Auth\User as Authenticatable; +use Illuminate\Notifications\Notifiable; +use Sendportal\Base\Traits\HasWorkspaces; class User extends Authenticatable implements MustVerifyEmail { diff --git a/src/Providers/EventServiceProvider.php b/src/Providers/EventServiceProvider.php index 8aa817a0..9a35ed7c 100644 --- a/src/Providers/EventServiceProvider.php +++ b/src/Providers/EventServiceProvider.php @@ -2,6 +2,9 @@ namespace Sendportal\Base\Providers; +use Illuminate\Auth\Events\Registered; +use Illuminate\Auth\Listeners\SendEmailVerificationNotification; +use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; use Sendportal\Base\Events\MessageDispatchEvent; use Sendportal\Base\Events\SubscriberAddedEvent; use Sendportal\Base\Events\Webhooks\MailgunWebhookReceived; @@ -9,13 +12,10 @@ use Sendportal\Base\Events\Webhooks\SendgridWebhookReceived; use Sendportal\Base\Events\Webhooks\SesWebhookReceived; use Sendportal\Base\Listeners\MessageDispatchHandler; -use Sendportal\Base\Listeners\Webhooks\HandleSesWebhook; use Sendportal\Base\Listeners\Webhooks\HandleMailgunWebhook; use Sendportal\Base\Listeners\Webhooks\HandlePostmarkWebhook; use Sendportal\Base\Listeners\Webhooks\HandleSendgridWebhook; -use Illuminate\Auth\Events\Registered; -use Illuminate\Auth\Listeners\SendEmailVerificationNotification; -use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; +use Sendportal\Base\Listeners\Webhooks\HandleSesWebhook; class EventServiceProvider extends ServiceProvider { diff --git a/src/Providers/FormServiceProvider.php b/src/Providers/FormServiceProvider.php index 6c99cd1f..a8458890 100644 --- a/src/Providers/FormServiceProvider.php +++ b/src/Providers/FormServiceProvider.php @@ -3,10 +3,10 @@ namespace Sendportal\Base\Providers; use Form; -use Session; - use Illuminate\Support\ServiceProvider; +use Session; + class FormServiceProvider extends ServiceProvider { /** @@ -16,44 +16,44 @@ class FormServiceProvider extends ServiceProvider */ public function boot() { - Form::macro('textField', function ($name, $label = null, $value = null, $attributes = array()) { + Form::macro('textField', function ($name, $label = null, $value = null, $attributes = []) { $element = Form::text($name, $value, Form::fieldAttributes($name, $attributes)); return Form::fieldWrapper($name, $label, $element); }); - Form::macro('passwordField', function ($name, $label = null, $attributes = array()) { + Form::macro('passwordField', function ($name, $label = null, $attributes = []) { $element = Form::password($name, Form::fieldAttributes($name, $attributes)); return Form::fieldWrapper($name, $label, $element); }); - Form::macro('textareaField', function ($name, $label = null, $value = null, $attributes = array()) { + Form::macro('textareaField', function ($name, $label = null, $value = null, $attributes = []) { $element = Form::textarea($name, $value, Form::fieldAttributes($name, $attributes)); return Form::fieldWrapper($name, $label, $element); }); - Form::macro('fileField', function ($name, $label = null, $attributes = array()) { + Form::macro('fileField', function ($name, $label = null, $attributes = []) { $element = Form::file($name, Form::fieldAttributes($name, $attributes)); return Form::fieldWrapper($name, $label, $element); }); - Form::macro('selectField', function ($name, $label = null, $options, $value = null, $attributes = array()) { + Form::macro('selectField', function ($name, $label = null, $options, $value = null, $attributes = []) { $element = Form::select($name, $options, $value, Form::fieldAttributes($name, $attributes)); return Form::fieldWrapper($name, $label, $element); }); - Form::macro('selectMultipleField', function ($name, $label = null, $options, $value = null, $attributes = array()) { + Form::macro('selectMultipleField', function ($name, $label = null, $options, $value = null, $attributes = []) { $attributes = array_merge($attributes, ['multiple' => true, 'class' => 'selectpicker']); $element = Form::select($name, $options, $value, Form::fieldAttributes($name, $attributes)); return Form::fieldWrapper($name, $label, $element); }); - Form::macro('selectRangeField', function ($name, $label = null, $begin, $end, $value = null, $attributes = array()) { + Form::macro('selectRangeField', function ($name, $label = null, $begin, $end, $value = null, $attributes = []) { $range = array_combine($range = range($begin, $end), $range); $element = Form::select($name, $range, $value, Form::fieldAttributes($name, $attributes)); @@ -61,8 +61,8 @@ public function boot() return Form::fieldWrapper($name, $label, $element); }); - Form::macro('selectMonthField', function ($name, $label = null, $value = null, $attributes = array()) { - $months = array(); + Form::macro('selectMonthField', function ($name, $label = null, $value = null, $attributes = []) { + $months = []; foreach (range(1, 12) as $month) { $months[$month] = strftime('%B', mktime(0, 0, 0, $month, 1)); @@ -73,14 +73,14 @@ public function boot() return Form::fieldWrapper($name, $label, $element); }); - Form::macro('checkboxField', function ($name, $label = null, $value = 1, $checked = null, $attributes = array()) { + Form::macro('checkboxField', function ($name, $label = null, $value = 1, $checked = null, $attributes = []) { $attributes = array_merge(['id' => 'id-field-' . $name], $attributes); $element = Form::checkbox($name, $value, $checked, $attributes); return Form::fieldWrapper($name, $label, $element); }); - Form::macro('switchField', function ($name, $label = null, $value = 1, $checked = null, $attributes = array()) { + Form::macro('switchField', function ($name, $label = null, $value = 1, $checked = null, $attributes = []) { $attributes = array_merge(['id' => 'id-field-' . $name], $attributes); $element = Form::checkbox($name, $value, $checked, $attributes); @@ -153,7 +153,7 @@ public function boot() return $out; }); - Form::macro('fieldAttributes', function ($name, $attributes = array()) { + Form::macro('fieldAttributes', function ($name, $attributes = []) { $name = str_replace('[]', '', $name); $class = 'form-control'; diff --git a/src/Providers/SendportalAppServiceProvider.php b/src/Providers/SendportalAppServiceProvider.php index c4d1311b..90433d75 100644 --- a/src/Providers/SendportalAppServiceProvider.php +++ b/src/Providers/SendportalAppServiceProvider.php @@ -13,9 +13,9 @@ use Sendportal\Base\Repositories\Campaigns\SqliteCampaignTenantRepository; use Sendportal\Base\Repositories\Messages\MessageTenantRepositoryInterface; use Sendportal\Base\Repositories\Messages\MySqlMessageTenantRepository; +use Sendportal\Base\Repositories\Messages\PostgresMessageTenantRepository; use Sendportal\Base\Repositories\Messages\SqliteMessageTenantRepository; use Sendportal\Base\Repositories\Subscribers\MySqlSubscriberTenantRepository; -use Sendportal\Base\Repositories\Messages\PostgresMessageTenantRepository; use Sendportal\Base\Repositories\Subscribers\PostgresSubscriberTenantRepository; use Sendportal\Base\Repositories\Subscribers\SqliteSubscriberTenantRepository; use Sendportal\Base\Repositories\Subscribers\SubscriberTenantRepositoryInterface; diff --git a/src/Repositories/Campaigns/SqliteCampaignTenantRepository.php b/src/Repositories/Campaigns/SqliteCampaignTenantRepository.php index f0a35060..2361ac21 100644 --- a/src/Repositories/Campaigns/SqliteCampaignTenantRepository.php +++ b/src/Repositories/Campaigns/SqliteCampaignTenantRepository.php @@ -4,8 +4,6 @@ namespace Sendportal\Base\Repositories\Campaigns; -use Illuminate\Support\Collection; -use Illuminate\Support\Facades\DB; use Sendportal\Base\Models\Campaign; class SqliteCampaignTenantRepository extends BaseCampaignTenantRepository diff --git a/src/Repositories/WorkspacesRepository.php b/src/Repositories/WorkspacesRepository.php index 66be3350..872e4861 100644 --- a/src/Repositories/WorkspacesRepository.php +++ b/src/Repositories/WorkspacesRepository.php @@ -4,10 +4,10 @@ namespace Sendportal\Base\Repositories; -use Sendportal\Base\Models\Workspace; -use Sendportal\Base\Models\User; use Exception; use Illuminate\Contracts\Pagination\LengthAwarePaginator; +use Sendportal\Base\Models\User; +use Sendportal\Base\Models\Workspace; class WorkspacesRepository extends BaseEloquentRepository { diff --git a/src/Rules/CanAccessSegment.php b/src/Rules/CanAccessSegment.php index 9a4049f1..9ab72e89 100644 --- a/src/Rules/CanAccessSegment.php +++ b/src/Rules/CanAccessSegment.php @@ -4,11 +4,11 @@ namespace Sendportal\Base\Rules; -use Sendportal\Base\Models\Segment; -use Sendportal\Base\Models\Workspace; -use Sendportal\Base\Models\User; use Illuminate\Contracts\Validation\Rule; use Illuminate\Support\Collection; +use Sendportal\Base\Models\Segment; +use Sendportal\Base\Models\User; +use Sendportal\Base\Models\Workspace; class CanAccessSegment implements Rule { diff --git a/src/Rules/CanAccessSubscriber.php b/src/Rules/CanAccessSubscriber.php index 1e7ab5a9..c8c1556d 100644 --- a/src/Rules/CanAccessSubscriber.php +++ b/src/Rules/CanAccessSubscriber.php @@ -4,11 +4,11 @@ namespace Sendportal\Base\Rules; -use Sendportal\Base\Models\Subscriber; -use Sendportal\Base\Models\Workspace; -use Sendportal\Base\Models\User; use Illuminate\Contracts\Validation\Rule; use Illuminate\Support\Collection; +use Sendportal\Base\Models\Subscriber; +use Sendportal\Base\Models\User; +use Sendportal\Base\Models\Workspace; class CanAccessSubscriber implements Rule { diff --git a/src/Rules/ValidInvitation.php b/src/Rules/ValidInvitation.php index b1b4f831..6d1211ac 100644 --- a/src/Rules/ValidInvitation.php +++ b/src/Rules/ValidInvitation.php @@ -4,8 +4,8 @@ namespace Sendportal\Base\Rules; -use Sendportal\Base\Traits\ChecksInvitations; use Illuminate\Contracts\Validation\Rule; +use Sendportal\Base\Traits\ChecksInvitations; class ValidInvitation implements Rule { diff --git a/src/Services/Campaigns/CampaignDispatchService.php b/src/Services/Campaigns/CampaignDispatchService.php index 8f695485..133d7317 100644 --- a/src/Services/Campaigns/CampaignDispatchService.php +++ b/src/Services/Campaigns/CampaignDispatchService.php @@ -2,11 +2,11 @@ namespace Sendportal\Base\Services\Campaigns; +use Illuminate\Pipeline\Pipeline; use Sendportal\Base\Models\Campaign; use Sendportal\Base\Pipelines\Campaigns\CompleteCampaign; use Sendportal\Base\Pipelines\Campaigns\CreateMessages; use Sendportal\Base\Pipelines\Campaigns\StartCampaign; -use Illuminate\Pipeline\Pipeline; class CampaignDispatchService { diff --git a/src/Services/Messages/DispatchMessage.php b/src/Services/Messages/DispatchMessage.php index 5427ab95..0ff0c4fb 100644 --- a/src/Services/Messages/DispatchMessage.php +++ b/src/Services/Messages/DispatchMessage.php @@ -4,11 +4,11 @@ namespace Sendportal\Base\Services\Messages; -use Sendportal\Base\Models\Message; -use Sendportal\Base\Models\EmailService; -use Sendportal\Base\Services\Content\MergeContent; use Exception; use Illuminate\Support\Facades\Log; +use Sendportal\Base\Models\EmailService; +use Sendportal\Base\Models\Message; +use Sendportal\Base\Services\Content\MergeContent; class DispatchMessage { diff --git a/src/Services/Messages/RelayMessage.php b/src/Services/Messages/RelayMessage.php index ef507dab..bbfff42e 100644 --- a/src/Services/Messages/RelayMessage.php +++ b/src/Services/Messages/RelayMessage.php @@ -4,9 +4,9 @@ namespace Sendportal\Base\Services\Messages; +use Exception; use Sendportal\Base\Factories\MailAdapterFactory; use Sendportal\Base\Models\EmailService; -use Exception; class RelayMessage { diff --git a/src/Services/Messages/ResolveEmailService.php b/src/Services/Messages/ResolveEmailService.php index 985e1b85..aceab74e 100644 --- a/src/Services/Messages/ResolveEmailService.php +++ b/src/Services/Messages/ResolveEmailService.php @@ -3,8 +3,8 @@ namespace Sendportal\Base\Services\Messages; use Exception; -use Sendportal\Base\Models\Message; use Sendportal\Base\Models\EmailService; +use Sendportal\Base\Models\Message; use Sendportal\Base\Repositories\Campaigns\CampaignTenantRepositoryInterface; use Sendportal\Pro\Repositories\AutomationScheduleRepository; diff --git a/src/Services/Segments/ApiSegmentService.php b/src/Services/Segments/ApiSegmentService.php index 260dfa3e..8ff7eb15 100644 --- a/src/Services/Segments/ApiSegmentService.php +++ b/src/Services/Segments/ApiSegmentService.php @@ -4,10 +4,10 @@ namespace Sendportal\Base\Services\Segments; -use Sendportal\Base\Models\Segment; -use Sendportal\Base\Repositories\SegmentTenantRepository; use Exception; use Illuminate\Support\Collection; +use Sendportal\Base\Models\Segment; +use Sendportal\Base\Repositories\SegmentTenantRepository; class ApiSegmentService { diff --git a/src/Services/Segments/ApiSegmentSubscriberService.php b/src/Services/Segments/ApiSegmentSubscriberService.php index 1288e4f7..97b376a2 100644 --- a/src/Services/Segments/ApiSegmentSubscriberService.php +++ b/src/Services/Segments/ApiSegmentSubscriberService.php @@ -4,10 +4,10 @@ namespace Sendportal\Base\Services\Segments; -use Sendportal\Base\Repositories\SegmentTenantRepository; use Exception; use Illuminate\Database\Eloquent\Collection as EloquentCollection; use Illuminate\Support\Collection; +use Sendportal\Base\Repositories\SegmentTenantRepository; class ApiSegmentSubscriberService { diff --git a/src/Services/Subscribers/ApiSubscriberService.php b/src/Services/Subscribers/ApiSubscriberService.php index e8b98366..e1be9a7c 100644 --- a/src/Services/Subscribers/ApiSubscriberService.php +++ b/src/Services/Subscribers/ApiSubscriberService.php @@ -4,12 +4,11 @@ namespace Sendportal\Base\Services\Subscribers; +use Illuminate\Support\Collection; +use Illuminate\Support\Facades\DB; use Sendportal\Base\Events\SubscriberAddedEvent; use Sendportal\Base\Models\Subscriber; use Sendportal\Base\Repositories\Subscribers\SubscriberTenantRepositoryInterface; -use Exception; -use Illuminate\Support\Collection; -use Illuminate\Support\Facades\DB; class ApiSubscriberService { diff --git a/src/Services/Subscribers/ImportSubscriberService.php b/src/Services/Subscribers/ImportSubscriberService.php index 63eeafb1..d53a325a 100644 --- a/src/Services/Subscribers/ImportSubscriberService.php +++ b/src/Services/Subscribers/ImportSubscriberService.php @@ -2,10 +2,10 @@ namespace Sendportal\Base\Services\Subscribers; +use Exception; use Illuminate\Support\Arr; use Sendportal\Base\Models\Subscriber; use Sendportal\Base\Repositories\Subscribers\SubscriberTenantRepositoryInterface; -use Exception; class ImportSubscriberService { diff --git a/src/Services/Subscribers/Segments/ApiSubscriberSegmentService.php b/src/Services/Subscribers/Segments/ApiSubscriberSegmentService.php index d84cc04b..30b1a784 100644 --- a/src/Services/Subscribers/Segments/ApiSubscriberSegmentService.php +++ b/src/Services/Subscribers/Segments/ApiSubscriberSegmentService.php @@ -4,9 +4,9 @@ namespace Sendportal\Base\Services\Subscribers\Segments; -use Sendportal\Base\Repositories\Subscribers\SubscriberTenantRepositoryInterface; use Exception; use Illuminate\Support\Collection; +use Sendportal\Base\Repositories\Subscribers\SubscriberTenantRepositoryInterface; class ApiSubscriberSegmentService { diff --git a/src/Services/Workspaces/AcceptInvitation.php b/src/Services/Workspaces/AcceptInvitation.php index 55a95e33..ce15d5a3 100644 --- a/src/Services/Workspaces/AcceptInvitation.php +++ b/src/Services/Workspaces/AcceptInvitation.php @@ -4,11 +4,11 @@ namespace Sendportal\Base\Services\Workspaces; -use Sendportal\Base\Models\Invitation; -use Sendportal\Base\Models\Workspace; -use Sendportal\Base\Models\User; use Exception; use RuntimeException; +use Sendportal\Base\Models\Invitation; +use Sendportal\Base\Models\User; +use Sendportal\Base\Models\Workspace; class AcceptInvitation { diff --git a/src/Services/Workspaces/AddWorkspaceMember.php b/src/Services/Workspaces/AddWorkspaceMember.php index cf7da286..99eefd4a 100644 --- a/src/Services/Workspaces/AddWorkspaceMember.php +++ b/src/Services/Workspaces/AddWorkspaceMember.php @@ -4,8 +4,8 @@ namespace Sendportal\Base\Services\Workspaces; -use Sendportal\Base\Models\Workspace; use Sendportal\Base\Models\User; +use Sendportal\Base\Models\Workspace; class AddWorkspaceMember { diff --git a/src/Services/Workspaces/CreateWorkspace.php b/src/Services/Workspaces/CreateWorkspace.php index c7541c73..587de187 100644 --- a/src/Services/Workspaces/CreateWorkspace.php +++ b/src/Services/Workspaces/CreateWorkspace.php @@ -4,11 +4,11 @@ namespace Sendportal\Base\Services\Workspaces; -use Sendportal\Base\Models\Workspace; -use Sendportal\Base\Models\User; -use Sendportal\Base\Repositories\WorkspacesRepository; use Exception; use Illuminate\Support\Facades\DB; +use Sendportal\Base\Models\User; +use Sendportal\Base\Models\Workspace; +use Sendportal\Base\Repositories\WorkspacesRepository; class CreateWorkspace { diff --git a/src/Services/Workspaces/RemoveUserFromWorkspace.php b/src/Services/Workspaces/RemoveUserFromWorkspace.php index 49e02169..467edbad 100644 --- a/src/Services/Workspaces/RemoveUserFromWorkspace.php +++ b/src/Services/Workspaces/RemoveUserFromWorkspace.php @@ -4,8 +4,8 @@ namespace Sendportal\Base\Services\Workspaces; -use Sendportal\Base\Models\Workspace; use Sendportal\Base\Models\User; +use Sendportal\Base\Models\Workspace; class RemoveUserFromWorkspace { diff --git a/src/Services/Workspaces/SendInvitation.php b/src/Services/Workspaces/SendInvitation.php index 88788384..5dc3055e 100644 --- a/src/Services/Workspaces/SendInvitation.php +++ b/src/Services/Workspaces/SendInvitation.php @@ -2,14 +2,14 @@ namespace Sendportal\Base\Services\Workspaces; -use Sendportal\Base\Models\Invitation; -use Sendportal\Base\Models\Workspace; -use Sendportal\Base\Models\User; use Exception; use Illuminate\Mail\Message; use Illuminate\Support\Facades\Mail; use Illuminate\Support\Str; use Ramsey\Uuid\Uuid; +use Sendportal\Base\Models\Invitation; +use Sendportal\Base\Models\User; +use Sendportal\Base\Models\Workspace; class SendInvitation { diff --git a/tests/Feature/API/SubscribersControllerTest.php b/tests/Feature/API/SubscribersControllerTest.php index 13aeb3f6..5fc68b35 100644 --- a/tests/Feature/API/SubscribersControllerTest.php +++ b/tests/Feature/API/SubscribersControllerTest.php @@ -130,7 +130,7 @@ public function a_subscriber_can_be_deleted_by_authorised_users() } /** @test */ - function a_subscriber_in_a_segment_can_be_deleted() + public function a_subscriber_in_a_segment_can_be_deleted() { // given $user = $this->createUserWithWorkspace(); diff --git a/tests/Feature/API/TemplatesControllerTest.php b/tests/Feature/API/TemplatesControllerTest.php index aeaf0c7d..32a9436f 100644 --- a/tests/Feature/API/TemplatesControllerTest.php +++ b/tests/Feature/API/TemplatesControllerTest.php @@ -149,7 +149,7 @@ public function a_template_can_be_deleted_by_authorised_users() } /** @test */ - function a_template_cannot_be_deleted_by_authorised_users_if_it_is_used() + public function a_template_cannot_be_deleted_by_authorised_users_if_it_is_used() { $user = $this->createUserWithWorkspace(); diff --git a/tests/Feature/API/WorkspacesControllerTest.php b/tests/Feature/API/WorkspacesControllerTest.php index e5a1dd70..2a147e3e 100644 --- a/tests/Feature/API/WorkspacesControllerTest.php +++ b/tests/Feature/API/WorkspacesControllerTest.php @@ -4,10 +4,10 @@ namespace Tests\Feature\API; -use Illuminate\Support\Arr; -use Sendportal\Base\Models\Workspace; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\WithFaker; +use Illuminate\Support\Arr; +use Sendportal\Base\Models\Workspace; use Tests\TestCase; class WorkspacesControllerTest extends TestCase @@ -16,7 +16,7 @@ class WorkspacesControllerTest extends TestCase WithFaker; /** @test */ - function can_retrieve_paginated_list_of_the_users_workspaces() + public function can_retrieve_paginated_list_of_the_users_workspaces() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -37,7 +37,7 @@ function can_retrieve_paginated_list_of_the_users_workspaces() } /** @test */ - function only_the_workspaces_for_the_current_user_are_retrieved() + public function only_the_workspaces_for_the_current_user_are_retrieved() { // given [$workspace, $user] = $this->createUserAndWorkspace(); diff --git a/tests/Feature/Auth/AuthConfigDisabledTest.php b/tests/Feature/Auth/AuthConfigDisabledTest.php index 58e6b239..0c8a2821 100644 --- a/tests/Feature/Auth/AuthConfigDisabledTest.php +++ b/tests/Feature/Auth/AuthConfigDisabledTest.php @@ -6,10 +6,6 @@ use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\WithFaker; -use Illuminate\Support\Str; -use Sendportal\Base\Models\Campaign; -use Sendportal\Base\Models\Provider; -use Sendportal\Base\Models\ProviderType; use Tests\TestCase; class AuthConfigDisabledTest extends TestCase @@ -26,7 +22,7 @@ public function setUp(): void } /** @test */ - function the_registration_routes_result_in_404() + public function the_registration_routes_result_in_404() { $this->get('/register')->assertNotFound(); $this->post('/register')->assertNotFound(); @@ -37,7 +33,7 @@ function the_registration_routes_result_in_404() } /** @test */ - function the_password_reset_routes_result_in_404() + public function the_password_reset_routes_result_in_404() { $this->get('password/reset')->assertNotFound(); $this->post('password/email')->assertNotFound(); diff --git a/tests/Feature/Auth/AuthConfigEnabledTest.php b/tests/Feature/Auth/AuthConfigEnabledTest.php index 08c65409..e2089e2c 100644 --- a/tests/Feature/Auth/AuthConfigEnabledTest.php +++ b/tests/Feature/Auth/AuthConfigEnabledTest.php @@ -6,10 +6,6 @@ use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\WithFaker; -use Illuminate\Support\Str; -use Sendportal\Base\Models\Campaign; -use Sendportal\Base\Models\Provider; -use Sendportal\Base\Models\ProviderType; use Tests\TestCase; class AuthConfigEnabledTest extends TestCase @@ -26,14 +22,14 @@ public function setUp(): void } /** @test */ - function the_registration_routes_result_in_200() + public function the_registration_routes_result_in_200() { $this->get('/register')->assertOk(); } /** @test */ - function the_password_reset_routes_result_in_200() + public function the_password_reset_routes_result_in_200() { $this->get('password/reset')->assertOk(); } -} \ No newline at end of file +} diff --git a/tests/Feature/Campaigns/CampaignControllerTest.php b/tests/Feature/Campaigns/CampaignControllerTest.php index 844fca36..33acb4a1 100644 --- a/tests/Feature/Campaigns/CampaignControllerTest.php +++ b/tests/Feature/Campaigns/CampaignControllerTest.php @@ -18,7 +18,7 @@ class CampaignControllerTest extends TestCase WithFaker; /** @test */ - function the_index_of_campaigns_is_accessible_to_authenticated_users() + public function the_index_of_campaigns_is_accessible_to_authenticated_users() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -35,7 +35,7 @@ function the_index_of_campaigns_is_accessible_to_authenticated_users() } /** @test */ - function the_campaign_creation_form_is_accessible_to_authenticated_users() + public function the_campaign_creation_form_is_accessible_to_authenticated_users() { // given $user = $this->createUserWithWorkspace(); @@ -48,7 +48,7 @@ function the_campaign_creation_form_is_accessible_to_authenticated_users() } /** @test */ - function new_campaigns_can_be_created_by_authenticated_users() + public function new_campaigns_can_be_created_by_authenticated_users() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -67,7 +67,7 @@ function new_campaigns_can_be_created_by_authenticated_users() } /** @test */ - function the_preview_view_is_accessible_by_authenticated_users() + public function the_preview_view_is_accessible_by_authenticated_users() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -81,7 +81,7 @@ function the_preview_view_is_accessible_by_authenticated_users() } /** @test */ - function the_edit_view_is_accessible_by_authenticated_users() + public function the_edit_view_is_accessible_by_authenticated_users() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -95,7 +95,7 @@ function the_edit_view_is_accessible_by_authenticated_users() } /** @test */ - function a_campaign_is_updateable_by_authenticated_users() + public function a_campaign_is_updateable_by_authenticated_users() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -125,7 +125,7 @@ function a_campaign_is_updateable_by_authenticated_users() } /** @test */ - function campaigns_can_be_set_to_not_track_opens() + public function campaigns_can_be_set_to_not_track_opens() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -145,7 +145,7 @@ function campaigns_can_be_set_to_not_track_opens() } /** @test */ - function campaigns_can_be_set_to_track_opens() + public function campaigns_can_be_set_to_track_opens() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -165,7 +165,7 @@ function campaigns_can_be_set_to_track_opens() } /** @test */ - function campaigns_can_be_set_to_not_track_clicks() + public function campaigns_can_be_set_to_not_track_clicks() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -185,7 +185,7 @@ function campaigns_can_be_set_to_not_track_clicks() } /** @test */ - function campaigns_can_be_set_to_track_clicks() + public function campaigns_can_be_set_to_track_clicks() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -205,7 +205,7 @@ function campaigns_can_be_set_to_track_clicks() } /** @test */ - function campaign_content_is_required_if_no_template_is_selected() + public function campaign_content_is_required_if_no_template_is_selected() { [$workspace, $user] = $this->createUserAndWorkspace(); @@ -221,7 +221,7 @@ function campaign_content_is_required_if_no_template_is_selected() } /** @test */ - function campaign_content_is_not_required_if_a_template_is_selected() + public function campaign_content_is_not_required_if_a_template_is_selected() { [$workspace, $user] = $this->createUserAndWorkspace(); diff --git a/tests/Feature/Campaigns/CampaignReportsControllerTest.php b/tests/Feature/Campaigns/CampaignReportsControllerTest.php index 3f840bb7..25ed7c4b 100644 --- a/tests/Feature/Campaigns/CampaignReportsControllerTest.php +++ b/tests/Feature/Campaigns/CampaignReportsControllerTest.php @@ -13,7 +13,7 @@ class CampaignReportsControllerTest extends TestCase use RefreshDatabase; /** @test */ - function a_sent_campaign_report_is_accessible_by_authenticated_users() + public function a_sent_campaign_report_is_accessible_by_authenticated_users() { // given [$campaign, $user] = $this->getCampaignAndUser(); @@ -28,7 +28,7 @@ function a_sent_campaign_report_is_accessible_by_authenticated_users() } /** @test */ - function sent_campaign_recipients_are_accessible_by_authenticated_users() + public function sent_campaign_recipients_are_accessible_by_authenticated_users() { // given [$campaign, $user] = $this->getCampaignAndUser(); @@ -41,7 +41,7 @@ function sent_campaign_recipients_are_accessible_by_authenticated_users() } /** @test */ - function sent_campaign_opens_are_accessible_by_authenticated_users() + public function sent_campaign_opens_are_accessible_by_authenticated_users() { // given [$campaign, $user] = $this->getCampaignAndUser(); @@ -54,7 +54,7 @@ function sent_campaign_opens_are_accessible_by_authenticated_users() } /** @test */ - function sent_campaign_clicks_are_accessible_by_authenticated_users() + public function sent_campaign_clicks_are_accessible_by_authenticated_users() { // given [$campaign, $user] = $this->getCampaignAndUser(); @@ -67,7 +67,7 @@ function sent_campaign_clicks_are_accessible_by_authenticated_users() } /** @test */ - function sent_campaign_bounces_are_accessible_by_authenticated_users() + public function sent_campaign_bounces_are_accessible_by_authenticated_users() { // given [$campaign, $user] = $this->getCampaignAndUser(); @@ -80,7 +80,7 @@ function sent_campaign_bounces_are_accessible_by_authenticated_users() } /** @test */ - function sent_campaign_unsubscribes_are_accessible_by_authenticated_users() + public function sent_campaign_unsubscribes_are_accessible_by_authenticated_users() { // given [$campaign, $user] = $this->getCampaignAndUser(); diff --git a/tests/Feature/Content/MergeContentTest.php b/tests/Feature/Content/MergeContentTest.php index 01a3471e..aea72fea 100644 --- a/tests/Feature/Content/MergeContentTest.php +++ b/tests/Feature/Content/MergeContentTest.php @@ -19,7 +19,7 @@ class MergeContentTest extends TestCase WithFaker; /** @test */ - function campaign_content_can_be_merged() + public function campaign_content_can_be_merged() { // given $content = $this->faker->sentence; @@ -37,7 +37,7 @@ function campaign_content_can_be_merged() } /** @test */ - function it_can_handle_a_null_value_for_campaign_content() + public function it_can_handle_a_null_value_for_campaign_content() { $content = null; $message = $this->generateCampaignMessage(null, '

Hello this is some {{content}}

'); @@ -84,7 +84,7 @@ private function mergeContent(Message $message): string } /** @test */ - function the_unsubscribe_url_tag_is_replaced_with_a_valid_unsubscribe_link() + public function the_unsubscribe_url_tag_is_replaced_with_a_valid_unsubscribe_link() { // given $message = $this->generateCampaignMessage('Unsubscribe Here'); @@ -103,7 +103,7 @@ function the_unsubscribe_url_tag_is_replaced_with_a_valid_unsubscribe_link() } /** @test */ - function the_email_tag_is_replaced_with_the_subscriber_email() + public function the_email_tag_is_replaced_with_the_subscriber_email() { // given $message = $this->generateCampaignMessage('Hi, {{ email }}'); @@ -120,7 +120,7 @@ function the_email_tag_is_replaced_with_the_subscriber_email() } /** @test */ - function the_first_name_tag_is_replaced_with_the_subscriber_first_name() + public function the_first_name_tag_is_replaced_with_the_subscriber_first_name() { // given $message = $this->generateCampaignMessage('Hi, {{ first_name }}'); @@ -137,7 +137,7 @@ function the_first_name_tag_is_replaced_with_the_subscriber_first_name() } /** @test */ - function the_last_name_tag_is_replaced_with_the_subscriber_last_name() + public function the_last_name_tag_is_replaced_with_the_subscriber_last_name() { // given /** @var Workspace $workspace */ diff --git a/tests/Feature/EmailServices/EmailServicesControllerTest.php b/tests/Feature/EmailServices/EmailServicesControllerTest.php index f4e67b5d..a21d2808 100644 --- a/tests/Feature/EmailServices/EmailServicesControllerTest.php +++ b/tests/Feature/EmailServices/EmailServicesControllerTest.php @@ -18,7 +18,7 @@ class EmailServicesControllerTest extends TestCase WithFaker; /** @test */ - function the_index_is_accessible_by_authenticated_users() + public function the_index_is_accessible_by_authenticated_users() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -33,7 +33,7 @@ function the_index_is_accessible_by_authenticated_users() } /** @test */ - function the_provider_create_form_is_accessible_to_authenticated_users() + public function the_provider_create_form_is_accessible_to_authenticated_users() { // given $user = $this->createUserWithWorkspace(); @@ -46,7 +46,7 @@ function the_provider_create_form_is_accessible_to_authenticated_users() } /** @test */ - function new_email_services_can_be_created_by_authenticated_users() + public function new_email_services_can_be_created_by_authenticated_users() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -73,7 +73,7 @@ function new_email_services_can_be_created_by_authenticated_users() } /** @test */ - function the_email_service_edit_view_is_accessible_by_authenticated_users() + public function the_email_service_edit_view_is_accessible_by_authenticated_users() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -87,7 +87,7 @@ function the_email_service_edit_view_is_accessible_by_authenticated_users() } /** @test */ - function an_email_service_is_updateable_by_an_authenticated_user() + public function an_email_service_is_updateable_by_an_authenticated_user() { $this->withoutExceptionHandling(); // given @@ -114,7 +114,7 @@ function an_email_service_is_updateable_by_an_authenticated_user() } /** @test */ - function an_email_service_can_be_deleted_by_an_authenticated_user() + public function an_email_service_can_be_deleted_by_an_authenticated_user() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -131,7 +131,7 @@ function an_email_service_can_be_deleted_by_an_authenticated_user() } /** @test */ - function email_services_require_the_correct_settings_to_be_saved() + public function email_services_require_the_correct_settings_to_be_saved() { // given $user = $this->createUserWithWorkspace(); @@ -151,7 +151,7 @@ function email_services_require_the_correct_settings_to_be_saved() } /** @test */ - function email_services_cannot_be_deleted_if_they_are_being_used() + public function email_services_cannot_be_deleted_if_they_are_being_used() { // given [$workspace, $user] = $this->createUserAndWorkspace(); diff --git a/tests/Feature/Invitations/ExistingUserInvitationTest.php b/tests/Feature/Invitations/ExistingUserInvitationTest.php index 639711db..ea19d553 100644 --- a/tests/Feature/Invitations/ExistingUserInvitationTest.php +++ b/tests/Feature/Invitations/ExistingUserInvitationTest.php @@ -4,11 +4,11 @@ namespace Tests\Feature\Invitations; -use Sendportal\Base\Models\Workspace; -use Sendportal\Base\Models\User; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Support\Str; use Ramsey\Uuid\Uuid; +use Sendportal\Base\Models\User; +use Sendportal\Base\Models\Workspace; use Tests\TestCase; class ExistingUserInvitationTest extends TestCase @@ -16,7 +16,7 @@ class ExistingUserInvitationTest extends TestCase use RefreshDatabase; /** @test */ - function a_user_can_see_their_invitations() + public function a_user_can_see_their_invitations() { // given $user = $this->createUserWithWorkspace(); @@ -42,7 +42,7 @@ function a_user_can_see_their_invitations() } /** @test */ - function a_user_cannot_see_another_users_invitations() + public function a_user_cannot_see_another_users_invitations() { // given $user = $this->createUserWithWorkspace(); @@ -67,7 +67,7 @@ function a_user_cannot_see_another_users_invitations() } /** @test */ - function a_user_can_accept_valid_invitations() + public function a_user_can_accept_valid_invitations() { // given $user = $this->createUserWithWorkspace(); @@ -93,7 +93,7 @@ function a_user_can_accept_valid_invitations() } /** @test */ - function a_user_can_reject_invitations() + public function a_user_can_reject_invitations() { // given $user = $this->createUserWithWorkspace(); @@ -123,7 +123,7 @@ function a_user_can_reject_invitations() } /** @test */ - function a_user_cannot_accept_an_expired_invitation() + public function a_user_cannot_accept_an_expired_invitation() { // given $user = $this->createUserWithWorkspace(); diff --git a/tests/Feature/Invitations/NewUserInvitationTest.php b/tests/Feature/Invitations/NewUserInvitationTest.php index d1969a79..d825aacc 100644 --- a/tests/Feature/Invitations/NewUserInvitationTest.php +++ b/tests/Feature/Invitations/NewUserInvitationTest.php @@ -25,7 +25,7 @@ public function setUp(): void } /** @test */ - function a_new_user_can_register_with_an_invitation_to_an_existing_workspace() + public function a_new_user_can_register_with_an_invitation_to_an_existing_workspace() { $this->withoutEvents(); @@ -63,7 +63,7 @@ function a_new_user_can_register_with_an_invitation_to_an_existing_workspace() } /** @test */ - function a_user_cannot_see_the_register_form_with_an_invalid_invitation() + public function a_user_cannot_see_the_register_form_with_an_invalid_invitation() { // when $response = $this->get(route('register') . '?invitation=invalid_invitation'); @@ -74,7 +74,7 @@ function a_user_cannot_see_the_register_form_with_an_invalid_invitation() } /** @test */ - function registrations_fail_validation_when_invitation_is_invalid() + public function registrations_fail_validation_when_invitation_is_invalid() { // given $postData = [ diff --git a/tests/Feature/Messages/MessagesControllerTest.php b/tests/Feature/Messages/MessagesControllerTest.php index 7513a573..b2e8333e 100644 --- a/tests/Feature/Messages/MessagesControllerTest.php +++ b/tests/Feature/Messages/MessagesControllerTest.php @@ -14,7 +14,7 @@ class MessagesControllerTest extends TestCase use RefreshDatabase; /** @test */ - function a_guest_cannot_see_the_index_of_messages() + public function a_guest_cannot_see_the_index_of_messages() { // given factory(Message::class, 3)->create(['sent_at' => now()]); @@ -27,7 +27,7 @@ function a_guest_cannot_see_the_index_of_messages() } /** @test */ - function the_index_of_sent_messages_is_accessible_to_an_authenticated_user() + public function the_index_of_sent_messages_is_accessible_to_an_authenticated_user() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -43,7 +43,7 @@ function the_index_of_sent_messages_is_accessible_to_an_authenticated_user() } /** @test */ - function the_index_of_draft_messages_is_accessible_to_an_authenticated_user() + public function the_index_of_draft_messages_is_accessible_to_an_authenticated_user() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -59,7 +59,7 @@ function the_index_of_draft_messages_is_accessible_to_an_authenticated_user() } /** @test */ - function a_draft_message_can_be_viewed_by_an_authenticated_user() + public function a_draft_message_can_be_viewed_by_an_authenticated_user() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -80,6 +80,4 @@ function a_draft_message_can_be_viewed_by_an_authenticated_user() // then $response->assertOk(); } - - } diff --git a/tests/Feature/Segments/SegmentsControllerTest.php b/tests/Feature/Segments/SegmentsControllerTest.php index 006f687c..15726c25 100644 --- a/tests/Feature/Segments/SegmentsControllerTest.php +++ b/tests/Feature/Segments/SegmentsControllerTest.php @@ -15,7 +15,7 @@ class SegmentsControllerTest extends TestCase WithFaker; /** @test */ - function the_index_of_segments_is_accessible_to_authenticated_users() + public function the_index_of_segments_is_accessible_to_authenticated_users() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -30,7 +30,7 @@ function the_index_of_segments_is_accessible_to_authenticated_users() } /** @test */ - function the_segment_create_form_is_accessible_to_authenticated_users() + public function the_segment_create_form_is_accessible_to_authenticated_users() { // given $user = $this->createUserWithWorkspace(); @@ -43,7 +43,7 @@ function the_segment_create_form_is_accessible_to_authenticated_users() } /** @test */ - function new_segments_can_be_created_by_authenticated_users() + public function new_segments_can_be_created_by_authenticated_users() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -65,7 +65,7 @@ function new_segments_can_be_created_by_authenticated_users() } /** @test */ - function the_segment_edit_view_is_accessible_by_authenticated_users() + public function the_segment_edit_view_is_accessible_by_authenticated_users() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -79,7 +79,7 @@ function the_segment_edit_view_is_accessible_by_authenticated_users() } /** @test */ - function a_segment_is_updateable_by_an_authenticated_user() + public function a_segment_is_updateable_by_an_authenticated_user() { // given [$workspace, $user] = $this->createUserAndWorkspace(); diff --git a/tests/Feature/Subscribers/SubscribersControllerTest.php b/tests/Feature/Subscribers/SubscribersControllerTest.php index ecb4b713..a8c47f69 100644 --- a/tests/Feature/Subscribers/SubscribersControllerTest.php +++ b/tests/Feature/Subscribers/SubscribersControllerTest.php @@ -15,7 +15,7 @@ class SubscribersControllerTest extends TestCase WithFaker; /** @test */ - function the_index_of_subscribers_is_accessible_to_authenticated_users() + public function the_index_of_subscribers_is_accessible_to_authenticated_users() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -30,7 +30,7 @@ function the_index_of_subscribers_is_accessible_to_authenticated_users() } /** @test */ - function the_subscriber_create_form_is_accessilbe_to_authenticated_users() + public function the_subscriber_create_form_is_accessilbe_to_authenticated_users() { // given $user = $this->createUserWithWorkspace(); @@ -43,7 +43,7 @@ function the_subscriber_create_form_is_accessilbe_to_authenticated_users() } /** @test */ - function new_subscribers_can_be_created_by_authenticated_users() + public function new_subscribers_can_be_created_by_authenticated_users() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -67,7 +67,7 @@ function new_subscribers_can_be_created_by_authenticated_users() } /** @test */ - function the_edit_view_is_accessible_by_authenticated_users() + public function the_edit_view_is_accessible_by_authenticated_users() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -81,7 +81,7 @@ function the_edit_view_is_accessible_by_authenticated_users() } /** @test */ - function a_subscriber_is_updateable_by_an_authenticated_user() + public function a_subscriber_is_updateable_by_an_authenticated_user() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -108,7 +108,7 @@ function a_subscriber_is_updateable_by_an_authenticated_user() } /** @test */ - function the_show_view_is_accessible_by_an_authenticated_user() + public function the_show_view_is_accessible_by_an_authenticated_user() { // given [$workspace, $user] = $this->createUserAndWorkspace(); diff --git a/tests/Feature/Templates/TemplatesControllerTest.php b/tests/Feature/Templates/TemplatesControllerTest.php index 6f83a3b9..f83ff4ea 100644 --- a/tests/Feature/Templates/TemplatesControllerTest.php +++ b/tests/Feature/Templates/TemplatesControllerTest.php @@ -21,7 +21,7 @@ protected function setUp(): void // Index. /** @test */ - function a_guest_cannot_see_the_index() + public function a_guest_cannot_see_the_index() { $response = $this->get(route('sendportal.templates.index')); @@ -29,7 +29,7 @@ function a_guest_cannot_see_the_index() } /** @test */ - function a_logged_in_user_can_see_template_index() + public function a_logged_in_user_can_see_template_index() { $user = $this->createUserWithWorkspace(); $this->loginUser($user); @@ -40,7 +40,7 @@ function a_logged_in_user_can_see_template_index() } /** @test */ - function the_index_lists_existing_templates() + public function the_index_lists_existing_templates() { $user = $this->createUserWithWorkspace(); $this->loginUser($user); @@ -58,7 +58,7 @@ function the_index_lists_existing_templates() // Create. /** @test */ - function a_guest_cannot_see_the_create_form() + public function a_guest_cannot_see_the_create_form() { $response = $this->get(route('sendportal.templates.create')); @@ -66,7 +66,7 @@ function a_guest_cannot_see_the_create_form() } /** @test */ - function a_logged_in_user_can_see_the_create_form() + public function a_logged_in_user_can_see_the_create_form() { $user = $this->createUserWithWorkspace(); $this->loginUser($user); @@ -82,7 +82,7 @@ function a_logged_in_user_can_see_the_create_form() // Store. /** @test */ - function a_guest_cannot_store_a_new_template() + public function a_guest_cannot_store_a_new_template() { $data = [ 'name' => $this->faker->name, @@ -100,7 +100,7 @@ function a_guest_cannot_store_a_new_template() } /** @test */ - function a_logged_in_user_can_store_a_new_template() + public function a_logged_in_user_can_store_a_new_template() { $user = $this->createUserWithWorkspace(); $this->loginUser($user); @@ -122,7 +122,7 @@ function a_logged_in_user_can_store_a_new_template() } /** @test */ - function storing_is_validated() + public function storing_is_validated() { $user = $this->createUserWithWorkspace(); $this->loginUser($user); @@ -147,7 +147,7 @@ function storing_is_validated() // Edit. /** @test */ - function a_guest_cannot_see_the_edit_form() + public function a_guest_cannot_see_the_edit_form() { $template = factory(Template::class)->create(); @@ -157,7 +157,7 @@ function a_guest_cannot_see_the_edit_form() } /** @test */ - function a_logged_in_user_can_see_the_edit_form() + public function a_logged_in_user_can_see_the_edit_form() { $user = $this->createUserWithWorkspace(); $this->loginUser($user); @@ -177,7 +177,7 @@ function a_logged_in_user_can_see_the_edit_form() // Update. /** @test */ - function a_guest_cannot_update_a_template() + public function a_guest_cannot_update_a_template() { $template = factory(Template::class)->create(); @@ -200,7 +200,7 @@ function a_guest_cannot_update_a_template() } /** @test */ - function a_logged_in_user_can_update_a_template() + public function a_logged_in_user_can_update_a_template() { $user = $this->createUserWithWorkspace(); $this->loginUser($user); @@ -227,7 +227,7 @@ function a_logged_in_user_can_update_a_template() } /** @test */ - function updates_are_validated() + public function updates_are_validated() { $user = $this->createUserWithWorkspace(); $this->loginUser($user); @@ -256,7 +256,7 @@ function updates_are_validated() // Destroy. /** @test */ - function a_logged_in_user_can_delete_a_template() + public function a_logged_in_user_can_delete_a_template() { $user = $this->createUserWithWorkspace(); $this->loginUser($user); @@ -276,7 +276,7 @@ function a_logged_in_user_can_delete_a_template() } /** @test */ - function a_logged_in_user_cannot_delete_a_template_if_it_is_used() + public function a_logged_in_user_cannot_delete_a_template_if_it_is_used() { $user = $this->createUserWithWorkspace(); $this->loginUser($user); diff --git a/tests/Feature/Webhooks/MailgunWebhooksTest.php b/tests/Feature/Webhooks/MailgunWebhooksTest.php index 02c31ffc..7463df6e 100644 --- a/tests/Feature/Webhooks/MailgunWebhooksTest.php +++ b/tests/Feature/Webhooks/MailgunWebhooksTest.php @@ -6,9 +6,9 @@ use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Str; use Sendportal\Base\Models\Campaign; -use Sendportal\Base\Models\Message; use Sendportal\Base\Models\EmailService; use Sendportal\Base\Models\EmailServiceType; +use Sendportal\Base\Models\Message; use Tests\TestCase; class MailgunWebhooksTest extends TestCase diff --git a/tests/Feature/Webview/WebviewControllerTest.php b/tests/Feature/Webview/WebviewControllerTest.php index 51ed3477..bf81ae0c 100644 --- a/tests/Feature/Webview/WebviewControllerTest.php +++ b/tests/Feature/Webview/WebviewControllerTest.php @@ -15,7 +15,7 @@ class WebviewControllerTest extends TestCase use RefreshDatabase; /** @test */ - function a_message_can_be_seen_in_the_webview() + public function a_message_can_be_seen_in_the_webview() { // given $workspace = factory(Workspace::class)->create(); diff --git a/tests/Feature/Workspaces/SwitchWorkspaceTest.php b/tests/Feature/Workspaces/SwitchWorkspaceTest.php index 329dad13..62fb9048 100644 --- a/tests/Feature/Workspaces/SwitchWorkspaceTest.php +++ b/tests/Feature/Workspaces/SwitchWorkspaceTest.php @@ -4,9 +4,9 @@ namespace Tests\Feature\Workspaces; +use Illuminate\Foundation\Testing\RefreshDatabase; use Sendportal\Base\Models\Workspace; use Sendportal\Base\Services\Workspaces\AddWorkspaceMember; -use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; class SwitchWorkspaceTest extends TestCase @@ -14,7 +14,7 @@ class SwitchWorkspaceTest extends TestCase use RefreshDatabase; /** @test */ - function a_user_can_switch_between_workspaces() + public function a_user_can_switch_between_workspaces() { // given $user = $this->createUserWithWorkspace(); @@ -34,7 +34,7 @@ function a_user_can_switch_between_workspaces() } /** @test */ - function a_user_cannot_switch_to_a_workspace_they_do_not_belong_to() + public function a_user_cannot_switch_to_a_workspace_they_do_not_belong_to() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -52,7 +52,7 @@ function a_user_cannot_switch_to_a_workspace_they_do_not_belong_to() } /** @test */ - function a_guest_cannot_switch_workspaces() + public function a_guest_cannot_switch_workspaces() { // given $user = $this->createUserWithWorkspace(); diff --git a/tests/Feature/Workspaces/WorkspaceInvitationsControllerTest.php b/tests/Feature/Workspaces/WorkspaceInvitationsControllerTest.php index 18eb9288..bedc5aec 100644 --- a/tests/Feature/Workspaces/WorkspaceInvitationsControllerTest.php +++ b/tests/Feature/Workspaces/WorkspaceInvitationsControllerTest.php @@ -8,8 +8,8 @@ use Illuminate\Foundation\Testing\WithFaker; use Illuminate\Support\Facades\Mail; use Sendportal\Base\Models\Invitation; -use Sendportal\Base\Models\Workspace; use Sendportal\Base\Models\User; +use Sendportal\Base\Models\Workspace; use Sendportal\Base\Services\Workspaces\AddWorkspaceMember; use Tests\TestCase; @@ -19,7 +19,7 @@ class WorkspaceInvitationsControllerTest extends TestCase WithFaker; /** @test */ - function an_invitation_can_be_sent_to_a_new_user() + public function an_invitation_can_be_sent_to_a_new_user() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -45,7 +45,7 @@ function an_invitation_can_be_sent_to_a_new_user() } /** @test */ - function an_invitation_can_be_sent_to_an_existing_user() + public function an_invitation_can_be_sent_to_an_existing_user() { // given [$workspace, $user] = $this->createUserAndWorkspace(); @@ -71,7 +71,7 @@ function an_invitation_can_be_sent_to_an_existing_user() } /** @test */ - function non_owners_cannot_invite_new_members() + public function non_owners_cannot_invite_new_members() { // given $user = factory(User::class)->create(); @@ -99,7 +99,7 @@ function non_owners_cannot_invite_new_members() } /** @test */ - function invitations_can_be_retracted() + public function invitations_can_be_retracted() { // given [$workspace, $user] = $this->createUserAndWorkspace(); diff --git a/tests/Feature/Workspaces/WorkspaceUserControllerTest.php b/tests/Feature/Workspaces/WorkspaceUserControllerTest.php index abbb94a0..fb638290 100644 --- a/tests/Feature/Workspaces/WorkspaceUserControllerTest.php +++ b/tests/Feature/Workspaces/WorkspaceUserControllerTest.php @@ -15,7 +15,7 @@ class WorkspaceUserControllerTest extends TestCase * @test * @group workspace_user_test */ - function an_unauthenticated_user_cannot_view_the_workspace_user_index() + public function an_unauthenticated_user_cannot_view_the_workspace_user_index() { $response = $this->get(route('sendportal.users.index')); @@ -27,7 +27,7 @@ function an_unauthenticated_user_cannot_view_the_workspace_user_index() * @test * @group workspace_user_test */ - function users_cannot_view_workspace_users_for_a_workspace_they_do_not_own() + public function users_cannot_view_workspace_users_for_a_workspace_they_do_not_own() { $this->createUserAndLogin(['workspace-member']); @@ -40,7 +40,7 @@ function users_cannot_view_workspace_users_for_a_workspace_they_do_not_own() * @test * @group workspace_user_test */ - function users_can_view_workspace_users_for_a_workspace_they_do_own() + public function users_can_view_workspace_users_for_a_workspace_they_do_own() { $user = $this->createUserWithWorkspace(); @@ -55,7 +55,7 @@ function users_can_view_workspace_users_for_a_workspace_they_do_own() * @test * @group workspace_user_test */ - function workspace_owners_can_remove_users_from_their_workspace() + public function workspace_owners_can_remove_users_from_their_workspace() { $user = $this->createUserWithWorkspace(); $workspace = $user->currentWorkspace(); @@ -74,7 +74,7 @@ function workspace_owners_can_remove_users_from_their_workspace() * @test * @group workspace_user_test */ - function workspace_owners_cannot_remove_themselves_from_their_workspace() + public function workspace_owners_cannot_remove_themselves_from_their_workspace() { [$workspace, $user] = $this->createUserAndWorkspace(); @@ -90,7 +90,7 @@ function workspace_owners_cannot_remove_themselves_from_their_workspace() * @test * @group workspace_user_test */ - function only_workspace_owners_can_remove_users_from_a_workspace() + public function only_workspace_owners_can_remove_users_from_a_workspace() { $user = $this->createUserAndLogin(['workspace-member']); @@ -102,5 +102,4 @@ function only_workspace_owners_can_remove_users_from_a_workspace() $response->assertStatus(404); } - } diff --git a/tests/Feature/Workspaces/WorkspacesControllerTest.php b/tests/Feature/Workspaces/WorkspacesControllerTest.php index d7d06be9..9f724db8 100644 --- a/tests/Feature/Workspaces/WorkspacesControllerTest.php +++ b/tests/Feature/Workspaces/WorkspacesControllerTest.php @@ -4,11 +4,11 @@ namespace Tests\Feature\Workspaces; -use Sendportal\Base\Models\Workspace; -use Sendportal\Base\Models\User; -use Sendportal\Base\Services\Workspaces\AddWorkspaceMember; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Foundation\Testing\WithFaker; +use Sendportal\Base\Models\User; +use Sendportal\Base\Models\Workspace; +use Sendportal\Base\Services\Workspaces\AddWorkspaceMember; use Tests\TestCase; class WorkspacesControllerTest extends TestCase @@ -17,7 +17,7 @@ class WorkspacesControllerTest extends TestCase WithFaker; /** @test */ - function a_user_can_see_an_index_of_their_workspaces() + public function a_user_can_see_an_index_of_their_workspaces() { // given $user = factory(User::class)->create(); @@ -39,7 +39,7 @@ function a_user_can_see_an_index_of_their_workspaces() } /** @test */ - function a_user_can_create_a_new_workspace() + public function a_user_can_create_a_new_workspace() { // given $user = $this->createUserWithWorkspace(); diff --git a/tests/SendportalTestSupportTrait.php b/tests/SendportalTestSupportTrait.php index e6cea9bc..8fd346ea 100644 --- a/tests/SendportalTestSupportTrait.php +++ b/tests/SendportalTestSupportTrait.php @@ -10,7 +10,8 @@ use Sendportal\Base\Models\User; use Sendportal\Base\Models\Workspace; -trait SendportalTestSupportTrait { +trait SendportalTestSupportTrait +{ /** * Create a user with attached workspace. diff --git a/tests/TestCase.php b/tests/TestCase.php index e18e749b..a1fa8b91 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -4,8 +4,8 @@ use Collective\Html\FormFacade; use Laravel\Ui\UiServiceProvider; -use Sendportal\Base\Models\User; use Orchestra\Testbench\TestCase as BaseTestCase; +use Sendportal\Base\Models\User; use Sendportal\Base\SendportalBaseServiceProvider; abstract class TestCase extends BaseTestCase diff --git a/tests/Unit/Factories/MailAdapterFactoryTest.php b/tests/Unit/Factories/MailAdapterFactoryTest.php index 422f4425..d7c2fa24 100644 --- a/tests/Unit/Factories/MailAdapterFactoryTest.php +++ b/tests/Unit/Factories/MailAdapterFactoryTest.php @@ -4,6 +4,7 @@ namespace Tests\Unit\Factories; +use InvalidArgumentException; use Sendportal\Base\Adapters\MailgunMailAdapter; use Sendportal\Base\Adapters\PostmarkMailAdapter; use Sendportal\Base\Adapters\SendgridMailAdapter; @@ -11,13 +12,12 @@ use Sendportal\Base\Factories\MailAdapterFactory; use Sendportal\Base\Models\EmailService; use Sendportal\Base\Models\EmailServiceType; -use InvalidArgumentException; use Tests\TestCase; class MailAdapterFactoryTest extends TestCase { /** @test */ - function can_build_a_mailgun_adapter() + public function can_build_a_mailgun_adapter() { // given $emailService = factory(EmailService::class)->make(['workspace_id' => null, 'type_id' => EmailServiceType::MAILGUN]); @@ -31,7 +31,7 @@ function can_build_a_mailgun_adapter() } /** @test */ - function can_build_a_sendgrid_adapter() + public function can_build_a_sendgrid_adapter() { // given $emailService = factory(EmailService::class)->make(['workspace_id' => null, 'type_id' => EmailServiceType::SENDGRID]); @@ -45,7 +45,7 @@ function can_build_a_sendgrid_adapter() } /** @test */ - function can_build_a_postmark_adapter() + public function can_build_a_postmark_adapter() { // given $emailService = factory(EmailService::class)->make(['workspace_id' => null, 'type_id' => EmailServiceType::POSTMARK]); @@ -59,7 +59,7 @@ function can_build_a_postmark_adapter() } /** @test */ - function can_build_an_ses_adapter() + public function can_build_an_ses_adapter() { // given $emailService = factory(EmailService::class)->make(['workspace_id' => null, 'type_id' => EmailServiceType::SES]); @@ -73,7 +73,7 @@ function can_build_an_ses_adapter() } /** @test */ - function an_exception_is_thrown_when_building_an_unknown_adapater() + public function an_exception_is_thrown_when_building_an_unknown_adapater() { // given $emailService = factory(EmailService::class)->make(['workspace_id' => null, 'type_id' => 100]); diff --git a/tests/Unit/Models/CampaignTest.php b/tests/Unit/Models/CampaignTest.php index b97568ea..53d55f6c 100644 --- a/tests/Unit/Models/CampaignTest.php +++ b/tests/Unit/Models/CampaignTest.php @@ -2,13 +2,11 @@ namespace Tests\Unit\Models; +use Illuminate\Foundation\Testing\RefreshDatabase; use Sendportal\Base\Models\Campaign; use Sendportal\Base\Models\Message; -use Sendportal\Base\Models\EmailService; use Sendportal\Base\Models\Subscriber; use Sendportal\Base\Models\Workspace; -use Sendportal\Base\Models\User; -use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; class CampaignTest extends TestCase @@ -16,7 +14,7 @@ class CampaignTest extends TestCase use RefreshDatabase; /** @test */ - function it_has_many_opens() + public function it_has_many_opens() { [$workspace, $emailService] = $this->createUserWithWorkspaceAndEmailService(); $campaign = $this->createCampaign($workspace, $emailService); @@ -26,8 +24,7 @@ function it_has_many_opens() $opens = $campaign->opens; - $opens->each(function ($open) use ($openedMessages) - { + $opens->each(function ($open) use ($openedMessages) { $validMessages = $openedMessages->pluck('id')->toArray(); static::assertTrue(in_array($open->id, $validMessages)); @@ -36,7 +33,7 @@ function it_has_many_opens() } /** @test */ - function the_unique_open_count_attribute_returns_the_number_of_unique_opens_for_a_campaign() + public function the_unique_open_count_attribute_returns_the_number_of_unique_opens_for_a_campaign() { [$workspace, $emailService] = $this->createUserWithWorkspaceAndEmailService(); @@ -50,7 +47,7 @@ function the_unique_open_count_attribute_returns_the_number_of_unique_opens_for_ } /** @test */ - function the_total_open_count_attribute_returns_the_total_number_of_opens_for_a_campaign() + public function the_total_open_count_attribute_returns_the_total_number_of_opens_for_a_campaign() { [$workspace, $emailService] = $this->createUserWithWorkspaceAndEmailService(); @@ -63,7 +60,7 @@ function the_total_open_count_attribute_returns_the_total_number_of_opens_for_a_ } /** @test */ - function it_has_many_clicks() + public function it_has_many_clicks() { [$workspace, $emailService] = $this->createUserWithWorkspaceAndEmailService(); @@ -73,8 +70,7 @@ function it_has_many_clicks() $clicks = $campaign->clicks; - $clicks->each(function ($click) use ($clickedMessages) - { + $clicks->each(function ($click) use ($clickedMessages) { $validMessages = $clickedMessages->pluck('id')->toArray(); static::assertTrue(in_array($click->id, $validMessages)); @@ -83,7 +79,7 @@ function it_has_many_clicks() } /** @test */ - function the_unique_click_count_attribute_returns_the_number_of_unique_clicks_for_a_campaign() + public function the_unique_click_count_attribute_returns_the_number_of_unique_clicks_for_a_campaign() { [$workspace, $emailService] = $this->createUserWithWorkspaceAndEmailService(); @@ -94,7 +90,7 @@ function the_unique_click_count_attribute_returns_the_number_of_unique_clicks_fo } /** @test */ - function the_total_click_count_attribute_returns_the_total_number_of_clicks_for_a_campaign() + public function the_total_click_count_attribute_returns_the_total_number_of_clicks_for_a_campaign() { [$workspace, $emailService] = $this->createUserWithWorkspaceAndEmailService(); diff --git a/tests/Unit/Models/SubscriberTest.php b/tests/Unit/Models/SubscriberTest.php index d73b8844..e5d9a303 100644 --- a/tests/Unit/Models/SubscriberTest.php +++ b/tests/Unit/Models/SubscriberTest.php @@ -2,11 +2,11 @@ namespace Tests\Unit\Models; +use Illuminate\Database\Eloquent\Relations\HasMany; +use Illuminate\Foundation\Testing\RefreshDatabase; use Sendportal\Base\Models\Campaign; use Sendportal\Base\Models\Message; use Sendportal\Base\Models\Subscriber; -use Illuminate\Database\Eloquent\Relations\HasMany; -use Illuminate\Foundation\Testing\RefreshDatabase; use Tests\TestCase; class SubscriberTest extends TestCase @@ -14,7 +14,7 @@ class SubscriberTest extends TestCase use RefreshDatabase; /** @test */ - function it_has_many_messages() + public function it_has_many_messages() { $subscriber = factory(Subscriber::class)->create(); [$campaignOne, $messageOne] = $this->createCampaignAndMessage($subscriber); diff --git a/tests/Unit/Models/TemplateTest.php b/tests/Unit/Models/TemplateTest.php index 12a22a30..3927aabf 100644 --- a/tests/Unit/Models/TemplateTest.php +++ b/tests/Unit/Models/TemplateTest.php @@ -4,10 +4,7 @@ use Illuminate\Foundation\Testing\RefreshDatabase; use Sendportal\Base\Models\Campaign; -use Sendportal\Base\Models\Email; use Sendportal\Base\Models\Template; -use Sendportal\Base\Models\User; -use Sendportal\Base\Models\Workspace; use Tests\TestCase; class TemplateTest extends TestCase @@ -15,7 +12,7 @@ class TemplateTest extends TestCase use RefreshDatabase; /** @test */ - function the_template_is_in_use_if_it_has_at_least_one_campaign() + public function the_template_is_in_use_if_it_has_at_least_one_campaign() { $template = factory(Template::class)->create(); @@ -27,7 +24,7 @@ function the_template_is_in_use_if_it_has_at_least_one_campaign() } /** @test */ - function the_template_is_not_in_use_if_it_has_not_campaigns() + public function the_template_is_not_in_use_if_it_has_not_campaigns() { $template = factory(Template::class)->create(); diff --git a/tests/Unit/Repositories/CampaignTenantRepositoryTest.php b/tests/Unit/Repositories/CampaignTenantRepositoryTest.php index cd524e2f..f0cf5a16 100644 --- a/tests/Unit/Repositories/CampaignTenantRepositoryTest.php +++ b/tests/Unit/Repositories/CampaignTenantRepositoryTest.php @@ -4,8 +4,8 @@ use Illuminate\Foundation\Testing\RefreshDatabase; use Sendportal\Base\Models\Campaign; -use Sendportal\Base\Models\Message; use Sendportal\Base\Models\EmailService; +use Sendportal\Base\Models\Message; use Sendportal\Base\Models\Subscriber; use Sendportal\Base\Models\User; use Sendportal\Base\Models\Workspace; @@ -17,7 +17,7 @@ class CampaignTenantRepositoryTest extends TestCase use RefreshDatabase; /** @test */ - function the_get_average_time_to_open_method_returns_the_average_time_taken_to_open_a_campaigns_message() + public function the_get_average_time_to_open_method_returns_the_average_time_taken_to_open_a_campaigns_message() { [$workspace, $emailService] = $this->createUserWithWorkspaceAndEmailService(); $campaign = $this->createCampaign($workspace, $emailService); @@ -41,7 +41,7 @@ function the_get_average_time_to_open_method_returns_the_average_time_taken_to_o } /** @test */ - function the_get_average_time_to_open_method_returns_na_if_there_have_been_no_opens() + public function the_get_average_time_to_open_method_returns_na_if_there_have_been_no_opens() { [$workspace, $emailService] = $this->createUserWithWorkspaceAndEmailService(); $campaign = $this->createCampaign($workspace, $emailService); @@ -52,7 +52,7 @@ function the_get_average_time_to_open_method_returns_na_if_there_have_been_no_op } /** @test */ - function the_get_average_time_to_click_method_returns_the_average_time_taken_for_a_campaign_link_to_be_clicked_for_the_first_time() + public function the_get_average_time_to_click_method_returns_the_average_time_taken_for_a_campaign_link_to_be_clicked_for_the_first_time() { [$workspace, $emailService] = $this->createUserWithWorkspaceAndEmailService(); $campaign = $this->createCampaign($workspace, $emailService); @@ -75,7 +75,7 @@ function the_get_average_time_to_click_method_returns_the_average_time_taken_for } /** @test */ - function the_average_time_to_click_attribute_returns_na_if_there_have_been_no_clicks() + public function the_average_time_to_click_attribute_returns_na_if_there_have_been_no_clicks() { [$workspace, $emailService] = $this->createUserWithWorkspaceAndEmailService(); $campaign = $this->createCampaign($workspace, $emailService); diff --git a/tests/Unit/Repositories/MessageTenantRepositoryTest.php b/tests/Unit/Repositories/MessageTenantRepositoryTest.php index 028b5419..6319b5ab 100644 --- a/tests/Unit/Repositories/MessageTenantRepositoryTest.php +++ b/tests/Unit/Repositories/MessageTenantRepositoryTest.php @@ -12,7 +12,6 @@ use Sendportal\Base\Repositories\Messages\MessageTenantRepositoryInterface; use Sendportal\Base\Repositories\Messages\MySqlMessageTenantRepository; use Sendportal\Base\Repositories\Messages\PostgresMessageTenantRepository; -use Tests\SendportalTestSupportTrait; use Tests\TestCase; class MessageTenantRepositoryTest extends TestCase @@ -32,7 +31,7 @@ public function setUp(): void } /** @test */ - function it_should_not_count_messages_that_have_not_been_opened_yet() + public function it_should_not_count_messages_that_have_not_been_opened_yet() { $workspace = factory(Workspace::class)->create(); @@ -52,7 +51,7 @@ function it_should_not_count_messages_that_have_not_been_opened_yet() } /** @test */ - function it_should_count_messages_that_have_been_opened_grouped_by_day_period() + public function it_should_count_messages_that_have_been_opened_grouped_by_day_period() { $opened_at = CarbonImmutable::create(2020, 05, 9, 20); @@ -94,7 +93,7 @@ function it_should_count_messages_that_have_been_opened_grouped_by_day_period() } /** @test */ - function it_should_count_messages_that_have_been_opened_grouped_by_two_hours_period() + public function it_should_count_messages_that_have_been_opened_grouped_by_two_hours_period() { $opened_at = CarbonImmutable::create(2020, 05, 9, 20); @@ -143,7 +142,7 @@ function it_should_count_messages_that_have_been_opened_grouped_by_two_hours_per } /** @test */ - function it_should_count_messages_that_have_been_opened_grouped_by_hour_period() + public function it_should_count_messages_that_have_been_opened_grouped_by_hour_period() { $opened_at = CarbonImmutable::create(2020, 05, 9, 20); diff --git a/tests/Unit/Repositories/SubscriberTenantRepositoryTest.php b/tests/Unit/Repositories/SubscriberTenantRepositoryTest.php index befda37c..614be490 100644 --- a/tests/Unit/Repositories/SubscriberTenantRepositoryTest.php +++ b/tests/Unit/Repositories/SubscriberTenantRepositoryTest.php @@ -24,7 +24,7 @@ public function setUp(): void } /** @test */ - function it_should_get_the_grow_chart_data() + public function it_should_get_the_grow_chart_data() { $period = CarbonPeriod::create('2019-04-01', '2019-04-30'); @@ -38,7 +38,7 @@ function it_should_get_the_grow_chart_data() } /** @test */ - function it_should_get_the_total_number_of_subscribers_created_before_the_reference_period() + public function it_should_get_the_total_number_of_subscribers_created_before_the_reference_period() { $period = CarbonPeriod::create('2019-04-01', '2019-04-30'); diff --git a/tests/Unit/Services/Messages/MessageTrackingOptionsTest.php b/tests/Unit/Services/Messages/MessageTrackingOptionsTest.php index cf4b5143..86c67e72 100644 --- a/tests/Unit/Services/Messages/MessageTrackingOptionsTest.php +++ b/tests/Unit/Services/Messages/MessageTrackingOptionsTest.php @@ -12,7 +12,7 @@ class MessageTrackingOptionsTest extends TestCase { /** @test */ - function default_tracking_options_are_on() + public function default_tracking_options_are_on() { // given $trackingOptions = new MessageTrackingOptions(); @@ -23,7 +23,7 @@ function default_tracking_options_are_on() } /** @test */ - function open_tracking_can_be_turned_off() + public function open_tracking_can_be_turned_off() { // given $trackingOptions = (new MessageTrackingOptions)->setIsOpenTracking(false); @@ -33,7 +33,7 @@ function open_tracking_can_be_turned_off() } /** @test */ - function click_tracking_can_be_turned_off() + public function click_tracking_can_be_turned_off() { // given $trackingOptions = (new MessageTrackingOptions)->setIsClickTracking(false); @@ -43,7 +43,7 @@ function click_tracking_can_be_turned_off() } /** @test */ - function open_tracking_can_be_turned_off_from_a_campaign() + public function open_tracking_can_be_turned_off_from_a_campaign() { // given $campaign = factory(Campaign::class)->state('withoutOpenTracking')->make(); @@ -57,7 +57,7 @@ function open_tracking_can_be_turned_off_from_a_campaign() } /** @test */ - function click_tracking_can_be_turned_off_from_a_campaign() + public function click_tracking_can_be_turned_off_from_a_campaign() { // given $campaign = factory(Campaign::class)->state('withoutClickTracking')->make(); @@ -71,7 +71,7 @@ function click_tracking_can_be_turned_off_from_a_campaign() } /** @test */ - function open_tracking_can_be_turned_off_from_a_message() + public function open_tracking_can_be_turned_off_from_a_message() { // given $campaign = factory(Campaign::class)->state('withoutOpenTracking')->make(); @@ -87,7 +87,7 @@ function open_tracking_can_be_turned_off_from_a_message() } /** @test */ - function click_tracking_can_be_turned_off_from_a_message() + public function click_tracking_can_be_turned_off_from_a_message() { // given $campaign = factory(Campaign::class)->state('withoutClickTracking')->make(); From 5918e2b9efb14b70516904701e2de5bbcdbe6986 Mon Sep 17 00:00:00 2001 From: joshuafranks Date: Fri, 14 Aug 2020 09:25:18 +0000 Subject: [PATCH 3/4] Apply php-cs-fixer changes --- .php_cs.cache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.php_cs.cache b/.php_cs.cache index f22f60d0..033d682b 100644 --- a/.php_cs.cache +++ b/.php_cs.cache @@ -1 +1 @@ -{"php":"7.4.7","version":"2.16.4","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces":true,"class_definition":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"ordered_imports":{"sortAlgorithm":"alpha"},"no_unused_imports":true},"hashes":{"tests\/Feature\/Webview\/WebviewControllerTest.php":2535759113,"tests\/Feature\/API\/SubscribersControllerTest.php":2793740894,"tests\/Feature\/API\/SegmentsControllerTest.php":237579380,"tests\/Feature\/API\/CampaignsControllerTest.php":2986507470,"tests\/Feature\/API\/SegmentSubscribersControllerTest.php":90654729,"tests\/Feature\/API\/TemplatesControllerTest.php":1464508170,"tests\/Feature\/API\/CampaignDispatchControllerTest.php":1815088962,"tests\/Feature\/API\/SubscriberSegmentsControllerTest.php":2045771091,"tests\/Feature\/API\/WorkspacesControllerTest.php":3695478411,"tests\/Feature\/Workspaces\/WorkspaceUserControllerTest.php":4194838600,"tests\/Feature\/Workspaces\/WorkspaceInvitationsControllerTest.php":1686923043,"tests\/Feature\/Workspaces\/SwitchWorkspaceTest.php":3132868480,"tests\/Feature\/Workspaces\/WorkspacesControllerTest.php":4117964831,"tests\/Feature\/Auth\/AuthConfigDisabledTest.php":2712218786,"tests\/Feature\/Auth\/AuthConfigEnabledTest.php":2050691960,"tests\/Feature\/Messages\/MessagesControllerTest.php":2262982461,"tests\/Feature\/Webhooks\/PostmarkWebhooksTest.php":2588822427,"tests\/Feature\/Webhooks\/SendgridWebhooksTest.php":4249665791,"tests\/Feature\/Webhooks\/MailgunWebhooksTest.php":3791954128,"tests\/Feature\/Webhooks\/AwsWebhooksTest.php":3493563250,"tests\/Feature\/Subscribers\/SubscribersControllerTest.php":1037559540,"tests\/Feature\/Segments\/SegmentsControllerTest.php":2325615301,"tests\/Feature\/EmailServices\/EmailServicesControllerTest.php":725788716,"tests\/Feature\/Campaigns\/CampaignReportsControllerTest.php":1350626890,"tests\/Feature\/Campaigns\/CampaignControllerTest.php":596263424,"tests\/Feature\/Content\/MergeContentTest.php":534700073,"tests\/Feature\/Templates\/TemplatesControllerTest.php":3203633291,"tests\/Feature\/Invitations\/NewUserInvitationTest.php":2719907928,"tests\/Feature\/Invitations\/ExistingUserInvitationTest.php":240790849,"tests\/TestCase.php":3795584197,"tests\/SendportalTestSupportTrait.php":551796750,"tests\/Unit\/Repositories\/CampaignTenantRepositoryTest.php":2402313543,"tests\/Unit\/Repositories\/MessageTenantRepositoryTest.php":3623740779,"tests\/Unit\/Repositories\/SubscriberTenantRepositoryTest.php":898571096,"tests\/Unit\/Services\/Messages\/MessageTrackingOptionsTest.php":46944835,"tests\/Unit\/Factories\/MailAdapterFactoryTest.php":3399406624,"tests\/Unit\/Models\/CampaignTest.php":870437449,"tests\/Unit\/Models\/TemplateTest.php":79881901,"tests\/Unit\/Models\/SubscriberTest.php":3142694578,"routes\/api.php":1150129286,"routes\/web.php":2837450997,"src\/Adapters\/BaseMailAdapter.php":2529230802,"src\/Adapters\/SendgridMailAdapter.php":4277132130,"src\/Adapters\/MailgunMailAdapter.php":1483562893,"src\/Adapters\/SesMailAdapter.php":3730945172,"src\/Adapters\/PostmarkMailAdapter.php":538078784,"src\/Http\/Requests\/CampaignDeleteRequest.php":368609726,"src\/Http\/Requests\/Api\/SegmentSubscriberStoreRequest.php":3248423559,"src\/Http\/Requests\/Api\/TemplateUpdateRequest.php":687342421,"src\/Http\/Requests\/Api\/SegmentSubscriberUpdateRequest.php":942935001,"src\/Http\/Requests\/Api\/SegmentSubscriberDestroyRequest.php":466145461,"src\/Http\/Requests\/Api\/SubscriberUpdateRequest.php":4219924558,"src\/Http\/Requests\/Api\/CampaignDispatchRequest.php":288916051,"src\/Http\/Requests\/Api\/SubscriberSegmentUpdateRequest.php":678637663,"src\/Http\/Requests\/Api\/CampaignStoreRequest.php":3290281303,"src\/Http\/Requests\/Api\/SegmentStoreRequest.php":2456712749,"src\/Http\/Requests\/Api\/SubscriberSegmentStoreRequest.php":1536255200,"src\/Http\/Requests\/Api\/TemplateStoreRequest.php":1142475105,"src\/Http\/Requests\/Api\/SegmentUpdateRequest.php":1514958860,"src\/Http\/Requests\/Api\/SubscriberSegmentDestroyRequest.php":3287356123,"src\/Http\/Requests\/Api\/SubscriberStoreRequest.php":3612893729,"src\/Http\/Requests\/TemplateUpdateRequest.php":3503722152,"src\/Http\/Requests\/SubscriptionToggleRequest.php":3726657740,"src\/Http\/Requests\/Workspaces\/WorkspaceUpdateRequest.php":1321366471,"src\/Http\/Requests\/Workspaces\/WorkspaceInvitationStoreRequest.php":2630595037,"src\/Http\/Requests\/Workspaces\/CreateWorkspaceRequest.php":3431339599,"src\/Http\/Requests\/Workspaces\/WorkspaceStoreRequest.php":3537047411,"src\/Http\/Requests\/CampaignDispatchRequest.php":1281664598,"src\/Http\/Requests\/CampaignStoreRequest.php":3645991413,"src\/Http\/Requests\/CampaignTestRequest.php":4235293899,"src\/Http\/Requests\/SubscriberRequest.php":192801441,"src\/Http\/Requests\/SegmentRequest.php":4283208938,"src\/Http\/Requests\/EmailServiceStoreRequest.php":1247658478,"src\/Http\/Requests\/CampaignContentRequest.php":1232189474,"src\/Http\/Requests\/ProfileUpdateRequest.php":2459854388,"src\/Http\/Requests\/CampaignTemplateUpdateRequest.php":120478771,"src\/Http\/Requests\/EmailServiceUpdateRequest.php":2689607115,"src\/Http\/Requests\/TemplateStoreRequest.php":1415487707,"src\/Http\/Requests\/SubscribersImportRequest.php":3691588349,"src\/Http\/Controllers\/Subscriptions\/SubscriptionsController.php":974643272,"src\/Http\/Controllers\/Api\/SegmentSubscribersController.php":2600232672,"src\/Http\/Controllers\/Api\/CampaignsController.php":1735125716,"src\/Http\/Controllers\/Api\/SegmentsController.php":1362180760,"src\/Http\/Controllers\/Api\/Webhooks\/SesWebhooksController.php":3278766678,"src\/Http\/Controllers\/Api\/Webhooks\/SendgridWebhooksController.php":308336950,"src\/Http\/Controllers\/Api\/Webhooks\/PostmarkWebhooksController.php":2649888651,"src\/Http\/Controllers\/Api\/Webhooks\/MailgunWebhooksController.php":1388261497,"src\/Http\/Controllers\/Api\/CampaignDispatchController.php":1190800482,"src\/Http\/Controllers\/Api\/SubscribersController.php":2129517280,"src\/Http\/Controllers\/Api\/WorkspacesController.php":4223646033,"src\/Http\/Controllers\/Api\/TemplatesController.php":2851414694,"src\/Http\/Controllers\/Api\/SubscriberSegmentsController.php":305668822,"src\/Http\/Controllers\/Webview\/WebviewController.php":3714420626,"src\/Http\/Controllers\/Workspaces\/PendingInvitationController.php":3832725633,"src\/Http\/Controllers\/Workspaces\/WorkspaceUsersController.php":884123219,"src\/Http\/Controllers\/Workspaces\/WorkspacesController.php":2433208414,"src\/Http\/Controllers\/Workspaces\/WorkspaceInvitationsController.php":587975813,"src\/Http\/Controllers\/Workspaces\/SwitchWorkspaceController.php":1038632863,"src\/Http\/Controllers\/Auth\/RegisterController.php":2992468056,"src\/Http\/Controllers\/Auth\/VerificationController.php":3586878139,"src\/Http\/Controllers\/Auth\/ResetPasswordController.php":2095143753,"src\/Http\/Controllers\/Auth\/LoginController.php":626790338,"src\/Http\/Controllers\/Auth\/ForgotPasswordController.php":1596906878,"src\/Http\/Controllers\/Auth\/ConfirmPasswordController.php":3132239200,"src\/Http\/Controllers\/Auth\/ProfileController.php":2127456338,"src\/Http\/Controllers\/Ajax\/SegmentsController.php":3641837735,"src\/Http\/Controllers\/Subscribers\/SubscribersImportController.php":2185379622,"src\/Http\/Controllers\/Subscribers\/SubscribersController.php":641038576,"src\/Http\/Controllers\/Segments\/SegmentsController.php":1140188137,"src\/Http\/Controllers\/EmailServices\/EmailServicesController.php":2627691162,"src\/Http\/Controllers\/MessagesController.php":2429663066,"src\/Http\/Controllers\/Campaigns\/CampaignReportsController.php":1746840511,"src\/Http\/Controllers\/Campaigns\/CampaignTestController.php":1673734283,"src\/Http\/Controllers\/Campaigns\/CampaignsController.php":2955818422,"src\/Http\/Controllers\/Campaigns\/CampaignDispatchController.php":2047400719,"src\/Http\/Controllers\/Campaigns\/CampaignDeleteController.php":1879365339,"src\/Http\/Controllers\/Campaigns\/CampaignDuplicateController.php":84112401,"src\/Http\/Controllers\/DashboardController.php":4165878695,"src\/Http\/Controllers\/Controller.php":153774118,"src\/Http\/Controllers\/TemplatesController.php":3671674407,"src\/Http\/Middleware\/Authenticate.php":1835928171,"src\/Http\/Middleware\/RedirectIfAuthenticated.php":640989464,"src\/Http\/Middleware\/LocaleMiddleware.php":4107854528,"src\/Http\/Middleware\/TrustProxies.php":1757267858,"src\/Http\/Middleware\/VerifyCsrfToken.php":1775469156,"src\/Http\/Middleware\/OwnsRequestedWorkspace.php":2914479210,"src\/Http\/Middleware\/TrimStrings.php":2385018901,"src\/Http\/Middleware\/OwnsCurrentWorkspace.php":3501720709,"src\/Http\/Middleware\/CheckForMaintenanceMode.php":259153984,"src\/Http\/Middleware\/EncryptCookies.php":3774761695,"src\/Http\/Middleware\/VerifyUserOnWorkspace.php":2687531141,"src\/Http\/Resources\/Workspace.php":4013160935,"src\/Http\/Resources\/Subscriber.php":1824029385,"src\/Http\/Resources\/Template.php":3600632339,"src\/Http\/Resources\/Segment.php":213263096,"src\/Http\/Resources\/Campaign.php":463656753,"src\/SendportalBaseServiceProvider.php":2864458849,"src\/Pipelines\/Campaigns\/CreateMessages.php":605678265,"src\/Pipelines\/Campaigns\/CompleteCampaign.php":3051555738,"src\/Pipelines\/Campaigns\/StartCampaign.php":4264567283,"src\/Interfaces\/QuotaServiceInterface.php":3710829468,"src\/Interfaces\/BaseEloquentInterface.php":2679968441,"src\/Interfaces\/BaseTenantInterface.php":1039061782,"src\/Interfaces\/MailAdapterInterface.php":2744397698,"src\/Console\/Kernel.php":753701322,"src\/Console\/Commands\/SetupProduction.php":289982368,"src\/Console\/Commands\/CampaignDispatchCommand.php":1955564877,"src\/Console\/Commands\/GenerateTestSubscribers.php":972254575,"src\/Presenters\/CampaignReportPresenter.php":163420074,"src\/Repositories\/BaseEloquentRepository.php":2158650621,"src\/Repositories\/Messages\/PostgresMessageTenantRepository.php":1122750600,"src\/Repositories\/Messages\/MySqlMessageTenantRepository.php":3090359210,"src\/Repositories\/Messages\/SqliteMessageTenantRepository.php":997597262,"src\/Repositories\/Messages\/MessageTenantRepositoryInterface.php":1440401593,"src\/Repositories\/Messages\/BaseMessageTenantRepository.php":2009232862,"src\/Repositories\/TemplateTenantRepository.php":1819072745,"src\/Repositories\/WorkspacesRepository.php":584366456,"src\/Repositories\/EmailServiceTenantRepository.php":1345639575,"src\/Repositories\/Subscribers\/MySqlSubscriberTenantRepository.php":3625049486,"src\/Repositories\/Subscribers\/SubscriberTenantRepositoryInterface.php":2399497237,"src\/Repositories\/Subscribers\/PostgresSubscriberTenantRepository.php":1695259078,"src\/Repositories\/Subscribers\/SqliteSubscriberTenantRepository.php":2448479769,"src\/Repositories\/Subscribers\/BaseSubscriberTenantRepository.php":2182538747,"src\/Repositories\/SegmentTenantRepository.php":1787839002,"src\/Repositories\/Campaigns\/PostgresCampaignTenantRepository.php":687676756,"src\/Repositories\/Campaigns\/BaseCampaignTenantRepository.php":3322151715,"src\/Repositories\/Campaigns\/MySqlCampaignTenantRepository.php":3211702238,"src\/Repositories\/Campaigns\/CampaignTenantRepositoryInterface.php":3044258004,"src\/Repositories\/Campaigns\/SqliteCampaignTenantRepository.php":752618084,"src\/Repositories\/MessageUrlRepository.php":520332968,"src\/Repositories\/BaseTenantRepository.php":3464483901,"src\/Listeners\/Webhooks\/HandleMailgunWebhook.php":508480186,"src\/Listeners\/Webhooks\/HandleSendgridWebhook.php":2195241036,"src\/Listeners\/Webhooks\/HandleSesWebhook.php":1514930979,"src\/Listeners\/Webhooks\/HandlePostmarkWebhook.php":1633073198,"src\/Listeners\/MessageDispatchHandler.php":3514540013,"src\/Services\/QuotaService.php":151482878,"src\/Services\/Workspaces\/SendInvitation.php":3173336885,"src\/Services\/Workspaces\/AddWorkspaceMember.php":2951754652,"src\/Services\/Workspaces\/RemoveUserFromWorkspace.php":1894874548,"src\/Services\/Workspaces\/CreateWorkspace.php":3676529903,"src\/Services\/Workspaces\/AcceptInvitation.php":3970362876,"src\/Services\/Messages\/DispatchTestMessage.php":3794709464,"src\/Services\/Messages\/MarkAsSent.php":3611214529,"src\/Services\/Messages\/ResolveEmailService.php":3697855227,"src\/Services\/Messages\/MessageTrackingOptions.php":4038519324,"src\/Services\/Messages\/RelayMessage.php":943777897,"src\/Services\/Messages\/DispatchMessage.php":4098833346,"src\/Services\/Messages\/MessageOptions.php":2820793114,"src\/Services\/Webhooks\/EmailWebhookService.php":4148027466,"src\/Services\/Webhooks\/Mailgun\/WebhookVerifier.php":1769120066,"src\/Services\/Subscribers\/ApiSubscriberService.php":378793899,"src\/Services\/Subscribers\/ImportSubscriberService.php":3839923391,"src\/Services\/Subscribers\/Segments\/ApiSubscriberSegmentService.php":3998235018,"src\/Services\/Segments\/ApiSegmentSubscriberService.php":2982311498,"src\/Services\/Segments\/ApiSegmentService.php":4098631072,"src\/Services\/Campaigns\/CampaignDispatchService.php":1513872021,"src\/Services\/Campaigns\/CampaignStatisticsService.php":2101873625,"src\/Services\/Content\/MergeContent.php":3812284428,"src\/Services\/Helper.php":3273682296,"src\/Services\/Templates\/TemplateService.php":2140165200,"src\/Factories\/MailAdapterFactory.php":1275052413,"src\/Models\/CampaignStatus.php":3579786638,"src\/Models\/EmailServiceType.php":130851654,"src\/Models\/Workspace.php":2656358466,"src\/Models\/EmailService.php":597585726,"src\/Models\/User.php":3658292469,"src\/Models\/Subscriber.php":2469698271,"src\/Models\/UnsubscribeEventType.php":1462800983,"src\/Models\/Invitation.php":690254896,"src\/Models\/BaseModel.php":4169817253,"src\/Models\/Template.php":806389561,"src\/Models\/Segment.php":4146847716,"src\/Models\/Subscription.php":2794321122,"src\/Models\/MessageFailure.php":1302806817,"src\/Models\/MessageUrl.php":2259379933,"src\/Models\/Message.php":760476053,"src\/Models\/Campaign.php":1442081003,"src\/Exceptions\/Handler.php":2905627596,"src\/Events\/MessageDispatchEvent.php":301345637,"src\/Events\/Webhooks\/MailgunWebhookReceived.php":3881941755,"src\/Events\/Webhooks\/PostmarkWebhookReceived.php":3896170533,"src\/Events\/Webhooks\/SesWebhookReceived.php":743580678,"src\/Events\/Webhooks\/SendgridWebhookReceived.php":641948760,"src\/Events\/SubscriberAddedEvent.php":2226178055,"src\/Rules\/CanAccessSubscriber.php":1821529708,"src\/Rules\/CanAccessSegment.php":2886742344,"src\/Rules\/ValidInvitation.php":1919343115,"src\/Rules\/NotEmpty.php":881473860,"src\/Providers\/RouteServiceProvider.php":478969985,"src\/Providers\/EventServiceProvider.php":98020599,"src\/Providers\/FormServiceProvider.php":1015303618,"src\/Providers\/SendportalAppServiceProvider.php":4286129681,"src\/Facades\/Helper.php":4106765437,"src\/Traits\/SecondsToHms.php":1549572817,"src\/Traits\/ResolvesDatabaseDriver.php":2784887599,"src\/Traits\/NormalizeTags.php":3993386615,"src\/Traits\/ThrottlesSending.php":1616950802,"src\/Traits\/HasWorkspaces.php":959401559,"src\/Traits\/ScheduledAt.php":4210545466,"src\/Traits\/ChecksInvitations.php":1292936512,"src\/Traits\/Uuid.php":1070796280,"config\/config.php":3284073876,"database\/factories\/EmailServiceFactory.php":98771028,"database\/factories\/InvitationFactory.php":87011664,"database\/factories\/UserFactory.php":462382854,"database\/factories\/MessageFactory.php":1438262214,"database\/factories\/SegmentFactory.php":3001303380,"database\/factories\/CampaignFactory.php":292229003,"database\/factories\/SubscriberFactory.php":736716877,"database\/factories\/TemplateFactory.php":3401919933,"database\/factories\/WorkspaceFactory.php":2487381381,"database\/migrations\/2017_04_11_133343_create_email_service_tables.php":131230242,"database\/migrations\/2019_07_30_153117_create_message_urls_table.php":375655402,"database\/migrations\/2017_04_28_223915_create_campaigns_table.php":3706508056,"database\/migrations\/2017_04_28_223840_create_subscribers_table.php":467982134,"database\/migrations\/2019_08_19_000000_create_failed_jobs_table.php":1910101684,"database\/migrations\/2017_04_11_000000_create_workspaces_table.php":167376516,"database\/migrations\/2019_08_24_114758_adjust_users_table.php":844901304,"database\/migrations\/2019_07_10_194325_create_messages_table.php":748935844,"database\/migrations\/2017_04_28_223029_create_campaign_statuses_table.php":64947054,"database\/migrations\/2020_06_16_072116_adjust_campaign_content.php":3013201675,"database\/migrations\/2017_04_28_223854_create_segment_subscriber_table.php":1648290932,"database\/migrations\/2020_01_23_153845_create_message_failures_table.php":2300201577,"database\/migrations\/2017_04_12_6000_create_unsubscribed_table.php":2234240014,"database\/migrations\/2020_06_16_072137_adjust_template_content.php":869559510,"database\/migrations\/2017_04_28_223844_create_segments_table.php":1418574083,"database\/migrations\/2014_10_12_000000_create_users_table.php":2307441707,"database\/migrations\/2017_05_02_104440_create_campaign_segment_table.php":2739174255,"database\/migrations\/2014_10_12_100000_create_password_resets_table.php":2899799885,"database\/migrations\/2017_04_11_100000_create_invitations_table.php":1137353567,"database\/migrations\/2017_04_28_223906_create_templates_table.php":2287907578}} \ No newline at end of file +{"php":"7.4.7","version":"2.16.4","indent":" ","lineEnding":"\n","rules":{"blank_line_after_namespace":true,"braces":true,"class_definition":true,"constant_case":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_spaces_after_function_name":true,"no_spaces_inside_parenthesis":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":true,"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"ordered_imports":{"sortAlgorithm":"alpha"},"no_unused_imports":true},"hashes":{"tests\/Feature\/Webview\/WebviewControllerTest.php":2535759113,"tests\/Feature\/API\/SubscribersControllerTest.php":2793740894,"tests\/Feature\/API\/SegmentsControllerTest.php":237579380,"tests\/Feature\/API\/CampaignsControllerTest.php":1712743459,"tests\/Feature\/API\/SegmentSubscribersControllerTest.php":90654729,"tests\/Feature\/API\/TemplatesControllerTest.php":1464508170,"tests\/Feature\/API\/CampaignDispatchControllerTest.php":1815088962,"tests\/Feature\/API\/SubscriberSegmentsControllerTest.php":2045771091,"tests\/Feature\/API\/WorkspacesControllerTest.php":3695478411,"tests\/Feature\/Workspaces\/WorkspaceUserControllerTest.php":4194838600,"tests\/Feature\/Workspaces\/WorkspaceInvitationsControllerTest.php":1686923043,"tests\/Feature\/Workspaces\/SwitchWorkspaceTest.php":3132868480,"tests\/Feature\/Workspaces\/WorkspacesControllerTest.php":4117964831,"tests\/Feature\/Auth\/AuthConfigDisabledTest.php":2712218786,"tests\/Feature\/Auth\/AuthConfigEnabledTest.php":2050691960,"tests\/Feature\/Messages\/MessagesControllerTest.php":2262982461,"tests\/Feature\/Webhooks\/PostmarkWebhooksTest.php":2588822427,"tests\/Feature\/Webhooks\/SendgridWebhooksTest.php":4249665791,"tests\/Feature\/Webhooks\/MailgunWebhooksTest.php":3791954128,"tests\/Feature\/Webhooks\/AwsWebhooksTest.php":3493563250,"tests\/Feature\/Subscribers\/SubscribersControllerTest.php":1037559540,"tests\/Feature\/Segments\/SegmentsControllerTest.php":2325615301,"tests\/Feature\/EmailServices\/EmailServicesControllerTest.php":725788716,"tests\/Feature\/Campaigns\/CampaignReportsControllerTest.php":1350626890,"tests\/Feature\/Campaigns\/CampaignControllerTest.php":596263424,"tests\/Feature\/Content\/MergeContentTest.php":534700073,"tests\/Feature\/Templates\/TemplatesControllerTest.php":3203633291,"tests\/Feature\/Invitations\/NewUserInvitationTest.php":2719907928,"tests\/Feature\/Invitations\/ExistingUserInvitationTest.php":240790849,"tests\/TestCase.php":3795584197,"tests\/SendportalTestSupportTrait.php":551796750,"tests\/Unit\/Repositories\/CampaignTenantRepositoryTest.php":2402313543,"tests\/Unit\/Repositories\/MessageTenantRepositoryTest.php":3623740779,"tests\/Unit\/Repositories\/SubscriberTenantRepositoryTest.php":898571096,"tests\/Unit\/Services\/Messages\/MessageTrackingOptionsTest.php":46944835,"tests\/Unit\/Factories\/MailAdapterFactoryTest.php":3399406624,"tests\/Unit\/Models\/CampaignTest.php":870437449,"tests\/Unit\/Models\/TemplateTest.php":79881901,"tests\/Unit\/Models\/SubscriberTest.php":3142694578,"routes\/api.php":1044372319,"routes\/web.php":2837450997,"src\/Adapters\/BaseMailAdapter.php":2529230802,"src\/Adapters\/SendgridMailAdapter.php":4277132130,"src\/Adapters\/MailgunMailAdapter.php":1483562893,"src\/Adapters\/SesMailAdapter.php":3730945172,"src\/Adapters\/PostmarkMailAdapter.php":538078784,"src\/Http\/Requests\/CampaignDeleteRequest.php":368609726,"src\/Http\/Requests\/Api\/SegmentSubscriberStoreRequest.php":3248423559,"src\/Http\/Requests\/Api\/TemplateUpdateRequest.php":687342421,"src\/Http\/Requests\/Api\/SegmentSubscriberUpdateRequest.php":942935001,"src\/Http\/Requests\/Api\/SegmentSubscriberDestroyRequest.php":466145461,"src\/Http\/Requests\/Api\/SubscriberUpdateRequest.php":4219924558,"src\/Http\/Requests\/Api\/CampaignDispatchRequest.php":288916051,"src\/Http\/Requests\/Api\/SubscriberSegmentUpdateRequest.php":678637663,"src\/Http\/Requests\/Api\/CampaignStoreRequest.php":3290281303,"src\/Http\/Requests\/Api\/SegmentStoreRequest.php":2456712749,"src\/Http\/Requests\/Api\/SubscriberSegmentStoreRequest.php":1536255200,"src\/Http\/Requests\/Api\/TemplateStoreRequest.php":1142475105,"src\/Http\/Requests\/Api\/SegmentUpdateRequest.php":1514958860,"src\/Http\/Requests\/Api\/SubscriberSegmentDestroyRequest.php":3287356123,"src\/Http\/Requests\/Api\/SubscriberStoreRequest.php":3612893729,"src\/Http\/Requests\/TemplateUpdateRequest.php":3503722152,"src\/Http\/Requests\/SubscriptionToggleRequest.php":3726657740,"src\/Http\/Requests\/Workspaces\/WorkspaceUpdateRequest.php":1321366471,"src\/Http\/Requests\/Workspaces\/WorkspaceInvitationStoreRequest.php":2630595037,"src\/Http\/Requests\/Workspaces\/CreateWorkspaceRequest.php":3431339599,"src\/Http\/Requests\/Workspaces\/WorkspaceStoreRequest.php":3537047411,"src\/Http\/Requests\/CampaignDispatchRequest.php":1281664598,"src\/Http\/Requests\/CampaignStoreRequest.php":3645991413,"src\/Http\/Requests\/CampaignTestRequest.php":4235293899,"src\/Http\/Requests\/SubscriberRequest.php":192801441,"src\/Http\/Requests\/SegmentRequest.php":4283208938,"src\/Http\/Requests\/EmailServiceStoreRequest.php":1247658478,"src\/Http\/Requests\/CampaignContentRequest.php":1232189474,"src\/Http\/Requests\/ProfileUpdateRequest.php":2459854388,"src\/Http\/Requests\/CampaignTemplateUpdateRequest.php":120478771,"src\/Http\/Requests\/EmailServiceUpdateRequest.php":2689607115,"src\/Http\/Requests\/TemplateStoreRequest.php":1415487707,"src\/Http\/Requests\/SubscribersImportRequest.php":3691588349,"src\/Http\/Controllers\/Subscriptions\/SubscriptionsController.php":974643272,"src\/Http\/Controllers\/Api\/SegmentSubscribersController.php":2600232672,"src\/Http\/Controllers\/Api\/CampaignsController.php":1735125716,"src\/Http\/Controllers\/Api\/SegmentsController.php":1362180760,"src\/Http\/Controllers\/Api\/Webhooks\/SesWebhooksController.php":3278766678,"src\/Http\/Controllers\/Api\/Webhooks\/SendgridWebhooksController.php":308336950,"src\/Http\/Controllers\/Api\/Webhooks\/PostmarkWebhooksController.php":2649888651,"src\/Http\/Controllers\/Api\/Webhooks\/MailgunWebhooksController.php":1388261497,"src\/Http\/Controllers\/Api\/CampaignDispatchController.php":1190800482,"src\/Http\/Controllers\/Api\/SubscribersController.php":2129517280,"src\/Http\/Controllers\/Api\/WorkspacesController.php":4223646033,"src\/Http\/Controllers\/Api\/TemplatesController.php":2851414694,"src\/Http\/Controllers\/Api\/SubscriberSegmentsController.php":305668822,"src\/Http\/Controllers\/Webview\/WebviewController.php":3714420626,"src\/Http\/Controllers\/Workspaces\/PendingInvitationController.php":3832725633,"src\/Http\/Controllers\/Workspaces\/WorkspaceUsersController.php":884123219,"src\/Http\/Controllers\/Workspaces\/WorkspacesController.php":2433208414,"src\/Http\/Controllers\/Workspaces\/WorkspaceInvitationsController.php":587975813,"src\/Http\/Controllers\/Workspaces\/SwitchWorkspaceController.php":1038632863,"src\/Http\/Controllers\/Auth\/RegisterController.php":2992468056,"src\/Http\/Controllers\/Auth\/VerificationController.php":3586878139,"src\/Http\/Controllers\/Auth\/ResetPasswordController.php":2095143753,"src\/Http\/Controllers\/Auth\/LoginController.php":626790338,"src\/Http\/Controllers\/Auth\/ForgotPasswordController.php":1596906878,"src\/Http\/Controllers\/Auth\/ConfirmPasswordController.php":3132239200,"src\/Http\/Controllers\/Auth\/ProfileController.php":2127456338,"src\/Http\/Controllers\/Ajax\/SegmentsController.php":3641837735,"src\/Http\/Controllers\/Subscribers\/SubscribersImportController.php":2185379622,"src\/Http\/Controllers\/Subscribers\/SubscribersController.php":641038576,"src\/Http\/Controllers\/Segments\/SegmentsController.php":1140188137,"src\/Http\/Controllers\/EmailServices\/EmailServicesController.php":982020954,"src\/Http\/Controllers\/MessagesController.php":2429663066,"src\/Http\/Controllers\/Campaigns\/CampaignReportsController.php":1746840511,"src\/Http\/Controllers\/Campaigns\/CampaignTestController.php":1673734283,"src\/Http\/Controllers\/Campaigns\/CampaignsController.php":2955818422,"src\/Http\/Controllers\/Campaigns\/CampaignDispatchController.php":2047400719,"src\/Http\/Controllers\/Campaigns\/CampaignDeleteController.php":1879365339,"src\/Http\/Controllers\/Campaigns\/CampaignDuplicateController.php":84112401,"src\/Http\/Controllers\/DashboardController.php":4165878695,"src\/Http\/Controllers\/Controller.php":153774118,"src\/Http\/Controllers\/TemplatesController.php":3671674407,"src\/Http\/Middleware\/Authenticate.php":1835928171,"src\/Http\/Middleware\/RedirectIfAuthenticated.php":640989464,"src\/Http\/Middleware\/LocaleMiddleware.php":4107854528,"src\/Http\/Middleware\/TrustProxies.php":1757267858,"src\/Http\/Middleware\/VerifyCsrfToken.php":1775469156,"src\/Http\/Middleware\/OwnsRequestedWorkspace.php":2914479210,"src\/Http\/Middleware\/TrimStrings.php":2385018901,"src\/Http\/Middleware\/OwnsCurrentWorkspace.php":3501720709,"src\/Http\/Middleware\/CheckForMaintenanceMode.php":259153984,"src\/Http\/Middleware\/EncryptCookies.php":3774761695,"src\/Http\/Middleware\/VerifyUserOnWorkspace.php":2687531141,"src\/Http\/Resources\/Workspace.php":4013160935,"src\/Http\/Resources\/Subscriber.php":1824029385,"src\/Http\/Resources\/Template.php":3600632339,"src\/Http\/Resources\/Segment.php":213263096,"src\/Http\/Resources\/Campaign.php":463656753,"src\/SendportalBaseServiceProvider.php":2864458849,"src\/Pipelines\/Campaigns\/CreateMessages.php":605678265,"src\/Pipelines\/Campaigns\/CompleteCampaign.php":3051555738,"src\/Pipelines\/Campaigns\/StartCampaign.php":4264567283,"src\/Interfaces\/QuotaServiceInterface.php":3710829468,"src\/Interfaces\/BaseEloquentInterface.php":2679968441,"src\/Interfaces\/BaseTenantInterface.php":1039061782,"src\/Interfaces\/MailAdapterInterface.php":2744397698,"src\/Console\/Kernel.php":753701322,"src\/Console\/Commands\/SetupProduction.php":289982368,"src\/Console\/Commands\/CampaignDispatchCommand.php":1955564877,"src\/Console\/Commands\/GenerateTestSubscribers.php":972254575,"src\/Presenters\/CampaignReportPresenter.php":163420074,"src\/Repositories\/BaseEloquentRepository.php":2158650621,"src\/Repositories\/Messages\/PostgresMessageTenantRepository.php":1122750600,"src\/Repositories\/Messages\/MySqlMessageTenantRepository.php":3090359210,"src\/Repositories\/Messages\/SqliteMessageTenantRepository.php":997597262,"src\/Repositories\/Messages\/MessageTenantRepositoryInterface.php":1440401593,"src\/Repositories\/Messages\/BaseMessageTenantRepository.php":2009232862,"src\/Repositories\/TemplateTenantRepository.php":1819072745,"src\/Repositories\/WorkspacesRepository.php":584366456,"src\/Repositories\/EmailServiceTenantRepository.php":1345639575,"src\/Repositories\/Subscribers\/MySqlSubscriberTenantRepository.php":3625049486,"src\/Repositories\/Subscribers\/SubscriberTenantRepositoryInterface.php":2399497237,"src\/Repositories\/Subscribers\/PostgresSubscriberTenantRepository.php":1695259078,"src\/Repositories\/Subscribers\/SqliteSubscriberTenantRepository.php":2448479769,"src\/Repositories\/Subscribers\/BaseSubscriberTenantRepository.php":2182538747,"src\/Repositories\/SegmentTenantRepository.php":1787839002,"src\/Repositories\/Campaigns\/PostgresCampaignTenantRepository.php":687676756,"src\/Repositories\/Campaigns\/BaseCampaignTenantRepository.php":3322151715,"src\/Repositories\/Campaigns\/MySqlCampaignTenantRepository.php":3211702238,"src\/Repositories\/Campaigns\/CampaignTenantRepositoryInterface.php":3044258004,"src\/Repositories\/Campaigns\/SqliteCampaignTenantRepository.php":752618084,"src\/Repositories\/MessageUrlRepository.php":520332968,"src\/Repositories\/BaseTenantRepository.php":3464483901,"src\/Listeners\/Webhooks\/HandleMailgunWebhook.php":508480186,"src\/Listeners\/Webhooks\/HandleSendgridWebhook.php":2195241036,"src\/Listeners\/Webhooks\/HandleSesWebhook.php":1514930979,"src\/Listeners\/Webhooks\/HandlePostmarkWebhook.php":1633073198,"src\/Listeners\/MessageDispatchHandler.php":3514540013,"src\/Services\/QuotaService.php":3720582295,"src\/Services\/Workspaces\/SendInvitation.php":3173336885,"src\/Services\/Workspaces\/AddWorkspaceMember.php":2951754652,"src\/Services\/Workspaces\/RemoveUserFromWorkspace.php":1894874548,"src\/Services\/Workspaces\/CreateWorkspace.php":3676529903,"src\/Services\/Workspaces\/AcceptInvitation.php":3970362876,"src\/Services\/Messages\/DispatchTestMessage.php":3794709464,"src\/Services\/Messages\/MarkAsSent.php":3611214529,"src\/Services\/Messages\/ResolveEmailService.php":3697855227,"src\/Services\/Messages\/MessageTrackingOptions.php":4038519324,"src\/Services\/Messages\/RelayMessage.php":943777897,"src\/Services\/Messages\/DispatchMessage.php":4098833346,"src\/Services\/Messages\/MessageOptions.php":2820793114,"src\/Services\/Webhooks\/EmailWebhookService.php":4148027466,"src\/Services\/Webhooks\/Mailgun\/WebhookVerifier.php":1769120066,"src\/Services\/Subscribers\/ApiSubscriberService.php":378793899,"src\/Services\/Subscribers\/ImportSubscriberService.php":3839923391,"src\/Services\/Subscribers\/Segments\/ApiSubscriberSegmentService.php":3998235018,"src\/Services\/Segments\/ApiSegmentSubscriberService.php":2982311498,"src\/Services\/Segments\/ApiSegmentService.php":4098631072,"src\/Services\/Campaigns\/CampaignDispatchService.php":1513872021,"src\/Services\/Campaigns\/CampaignStatisticsService.php":2101873625,"src\/Services\/Content\/MergeContent.php":3812284428,"src\/Services\/Helper.php":3273682296,"src\/Services\/Templates\/TemplateService.php":2140165200,"src\/Factories\/MailAdapterFactory.php":2655495567,"src\/Models\/CampaignStatus.php":3579786638,"src\/Models\/EmailServiceType.php":4191611666,"src\/Models\/Workspace.php":2656358466,"src\/Models\/EmailService.php":597585726,"src\/Models\/User.php":3658292469,"src\/Models\/Subscriber.php":2469698271,"src\/Models\/UnsubscribeEventType.php":1462800983,"src\/Models\/Invitation.php":690254896,"src\/Models\/BaseModel.php":4169817253,"src\/Models\/Template.php":806389561,"src\/Models\/Segment.php":4146847716,"src\/Models\/Subscription.php":2794321122,"src\/Models\/MessageFailure.php":1302806817,"src\/Models\/MessageUrl.php":2259379933,"src\/Models\/Message.php":1715070373,"src\/Models\/Campaign.php":1442081003,"src\/Exceptions\/Handler.php":2905627596,"src\/Events\/MessageDispatchEvent.php":301345637,"src\/Events\/Webhooks\/MailgunWebhookReceived.php":3881941755,"src\/Events\/Webhooks\/PostmarkWebhookReceived.php":3896170533,"src\/Events\/Webhooks\/SesWebhookReceived.php":743580678,"src\/Events\/Webhooks\/SendgridWebhookReceived.php":641948760,"src\/Events\/SubscriberAddedEvent.php":2226178055,"src\/Rules\/CanAccessSubscriber.php":1821529708,"src\/Rules\/CanAccessSegment.php":2886742344,"src\/Rules\/ValidInvitation.php":1919343115,"src\/Rules\/NotEmpty.php":881473860,"src\/Providers\/RouteServiceProvider.php":478969985,"src\/Providers\/EventServiceProvider.php":1209388468,"src\/Providers\/FormServiceProvider.php":1015303618,"src\/Providers\/SendportalAppServiceProvider.php":4286129681,"src\/Facades\/Helper.php":4106765437,"src\/Traits\/SecondsToHms.php":1549572817,"src\/Traits\/ResolvesDatabaseDriver.php":2784887599,"src\/Traits\/NormalizeTags.php":3993386615,"src\/Traits\/ThrottlesSending.php":1616950802,"src\/Traits\/HasWorkspaces.php":959401559,"src\/Traits\/ScheduledAt.php":4210545466,"src\/Traits\/ChecksInvitations.php":1292936512,"src\/Traits\/Uuid.php":1070796280,"config\/config.php":3284073876,"database\/factories\/EmailServiceFactory.php":98771028,"database\/factories\/InvitationFactory.php":87011664,"database\/factories\/UserFactory.php":462382854,"database\/factories\/MessageFactory.php":1438262214,"database\/factories\/SegmentFactory.php":3001303380,"database\/factories\/CampaignFactory.php":292229003,"database\/factories\/SubscriberFactory.php":736716877,"database\/factories\/TemplateFactory.php":3401919933,"database\/factories\/WorkspaceFactory.php":2487381381,"database\/migrations\/2017_04_11_133343_create_email_service_tables.php":131230242,"database\/migrations\/2019_07_30_153117_create_message_urls_table.php":375655402,"database\/migrations\/2017_04_28_223915_create_campaigns_table.php":3706508056,"database\/migrations\/2017_04_28_223840_create_subscribers_table.php":467982134,"database\/migrations\/2019_08_19_000000_create_failed_jobs_table.php":1910101684,"database\/migrations\/2017_04_11_000000_create_workspaces_table.php":167376516,"database\/migrations\/2019_08_24_114758_adjust_users_table.php":844901304,"database\/migrations\/2019_07_10_194325_create_messages_table.php":748935844,"database\/migrations\/2017_04_28_223029_create_campaign_statuses_table.php":64947054,"database\/migrations\/2020_06_16_072116_adjust_campaign_content.php":3013201675,"database\/migrations\/2017_04_28_223854_create_segment_subscriber_table.php":1648290932,"database\/migrations\/2020_01_23_153845_create_message_failures_table.php":2300201577,"database\/migrations\/2017_04_12_6000_create_unsubscribed_table.php":2234240014,"database\/migrations\/2020_06_16_072137_adjust_template_content.php":869559510,"database\/migrations\/2017_04_28_223844_create_segments_table.php":1418574083,"database\/migrations\/2014_10_12_000000_create_users_table.php":2307441707,"database\/migrations\/2017_05_02_104440_create_campaign_segment_table.php":2739174255,"database\/migrations\/2014_10_12_100000_create_password_resets_table.php":2899799885,"database\/migrations\/2017_04_11_100000_create_invitations_table.php":1137353567,"database\/migrations\/2017_04_28_223906_create_templates_table.php":2287907578,"tests\/Feature\/Webhooks\/MailjetWebhooksTest.php":1071702843,"tests\/Unit\/Http\/Requests\/EmailServiceRequestTest.php":3585395267,"src\/Adapters\/MailjetAdapter.php":955812295,"src\/Http\/Requests\/EmailServiceRequest.php":1802382918,"src\/Http\/Controllers\/Api\/Webhooks\/MailjetWebhooksController.php":2105386302,"src\/Listeners\/Webhooks\/HandleMailjetWebhook.php":1085085614,"src\/Events\/Webhooks\/MailjetWebhookReceived.php":4190624551,"database\/migrations\/2020_08_04_085127_add_mailjet_email_service.php":2434307927}} \ No newline at end of file From ee61b601fc64ced27c4da8f8136522b4db69f477 Mon Sep 17 00:00:00 2001 From: Joshua Franks Date: Fri, 14 Aug 2020 11:10:12 +0100 Subject: [PATCH 4/4] js --- resources/views/subscribers/index.blade.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/resources/views/subscribers/index.blade.php b/resources/views/subscribers/index.blade.php index e97a2a12..efb8888e 100644 --- a/resources/views/subscribers/index.blade.php +++ b/resources/views/subscribers/index.blade.php @@ -95,7 +95,7 @@ class="btn btn-md btn-light">{{ __('Clear') }} @method('DELETE') {{ __('Edit') }} - + @@ -113,4 +113,20 @@ class="btn btn-xs btn-light">{{ __('Edit') }} @include('sendportal::layouts.partials.pagination', ['records' => $subscribers]) + + @endsection