Skip to content

Commit

Permalink
Apply fixes from StyleCI (#95)
Browse files Browse the repository at this point in the history
Co-authored-by: StyleCI Bot <bot@styleci.io>
  • Loading branch information
Crypta-Eve and StyleCIBot authored Jan 4, 2024
1 parent ff97f59 commit 3a1952e
Show file tree
Hide file tree
Showing 47 changed files with 585 additions and 569 deletions.
2 changes: 1 addition & 1 deletion src/Config/Permissions/notifications.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

return [
'setup' => [
'label' => 'notifications::notifications.setup_label',
'label' => 'notifications::notifications.setup_label',
'description' => 'notifications::notifications.setup_description',
],
];
66 changes: 33 additions & 33 deletions src/Config/notifications.alerts.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,233 +86,233 @@
// Esi Character Notifications
//
'AllAnchoringMsg' => [
'label' => 'notifications::alerts.alliance_anchoring',
'label' => 'notifications::alerts.alliance_anchoring',
'handlers' => [
'slack' => \Seat\Notifications\Notifications\Structures\Slack\AllAnchoringMsg::class,
'discord' => \Seat\Notifications\Notifications\Structures\Discord\AllAnchoringMsg::class,
],
],
'AllWarDeclaredMsg' => [
'label' => 'notifications::alerts.alliance_war_declared',
'label' => 'notifications::alerts.alliance_war_declared',
'handlers' => [
'discord' => \Seat\Notifications\Notifications\Wars\Discord\AllWarDeclaredMsg::class,
'slack' => \Seat\Notifications\Notifications\Wars\Slack\AllWarDeclaredMsg::class,
],
],
'AllWarInvalidatedMsg' => [
'label' => 'notifications::alerts.alliance_war_invalidated',
'label' => 'notifications::alerts.alliance_war_invalidated',
'handlers' => [
'discord' => \Seat\Notifications\Notifications\Wars\Discord\AllWarInvalidatedMsg::class,
'slack' => \Seat\Notifications\Notifications\Wars\Slack\AllWarInvalidatedMsg::class,
],
],
'AllianceCapitalChanged' => [
'label' => 'notifications::alerts.alliance_capital_changed',
'label' => 'notifications::alerts.alliance_capital_changed',
'handlers' => [
'discord' => \Seat\Notifications\Notifications\Alliances\Discord\AllianceCapitalChanged::class,
'slack' => \Seat\Notifications\Notifications\Alliances\Slack\AllianceCapitalChanged::class,
],
],
'AllyJoinedWarAggressorMsg' => [
'label' => 'notifications::alerts.ally_joined_war_aggressor',
'label' => 'notifications::alerts.ally_joined_war_aggressor',
'handlers' => [
'discord' => \Seat\Notifications\Notifications\Wars\Discord\AllyJoinedWarAggressorMsg::class,
'slack' => \Seat\Notifications\Notifications\Wars\Slack\AllyJoinedWarAggressorMsg::class,
],
],
'AllyJoinedWarAllyMsg' => [
'label' => 'notifications::alerts.ally_joined_war_ally',
'label' => 'notifications::alerts.ally_joined_war_ally',
'handlers' => [
'discord' => \Seat\Notifications\Notifications\Wars\Discord\AllyJoinedWarAllyMsg::class,
'slack' => \Seat\Notifications\Notifications\Wars\Slack\AllyJoinedWarAllyMsg::class,
],
],
'AllyJoinedWarDefenderMsg' => [
'label' => 'notifications::alerts.ally_joined_war_defender',
'label' => 'notifications::alerts.ally_joined_war_defender',
'handlers' => [
'discord' => \Seat\Notifications\Notifications\Wars\Discord\AllyJoinedWarDefenderMsg::class,
'slack' => \Seat\Notifications\Notifications\Wars\Slack\AllyJoinedWarDefenderMsg::class,
],
],
'BillPaidCorpAllMsg' => [
'label' => 'notifications::alerts.bill_paid_corporation_alliance',
'label' => 'notifications::alerts.bill_paid_corporation_alliance',
'handlers' => [
'discord' => \Seat\Notifications\Notifications\Corporations\Discord\BillPaidCorpAllMsg::class,
'slack' => \Seat\Notifications\Notifications\Corporations\Slack\BillPaidCorpAllMsg::class,
],
],
'CharLeftCorpMsg' => [
'label' => 'notifications::alerts.character_left_corporation',
'label' => 'notifications::alerts.character_left_corporation',
'handlers' => [
'discord' => \Seat\Notifications\Notifications\Corporations\Discord\CharLeftCorpMsg::class,
'mail' => \Seat\Notifications\Notifications\Corporations\Mail\CharLeftCorpMsg::class,
'slack' => \Seat\Notifications\Notifications\Corporations\Slack\CharLeftCorpMsg::class,
],
],
'CorpAllBillMsg' => [
'label' => 'notifications::alerts.corporation_alliance_bill',
'label' => 'notifications::alerts.corporation_alliance_bill',
'handlers' => [
'discord' => \Seat\Notifications\Notifications\Corporations\Discord\CorpAllBillMsg::class,
'mail' => \Seat\Notifications\Notifications\Corporations\Mail\CorpAllBillMsg::class,
'slack' => \Seat\Notifications\Notifications\Corporations\Slack\CorpAllBillMsg::class,
],
],
'CorpAppNewMsg' => [
'label' => 'notifications::alerts.corporation_application_new',
'label' => 'notifications::alerts.corporation_application_new',
'handlers' => [
'discord' => \Seat\Notifications\Notifications\Corporations\Discord\CorpAppNewMsg::class,
'slack' => \Seat\Notifications\Notifications\Corporations\Slack\CorpAppNewMsg::class,
],
],
'MoonminingExtractionFinished' => [
'label' => 'notifications::alerts.moon_mining_extraction_finished',
'label' => 'notifications::alerts.moon_mining_extraction_finished',
'handlers' => [
'mail' => \Seat\Notifications\Notifications\Structures\Mail\MoonMiningExtractionFinished::class,
'slack' => \Seat\Notifications\Notifications\Structures\Slack\MoonMiningExtractionFinished::class,
'discord' => \Seat\Notifications\Notifications\Structures\Discord\MoonMiningExtractionFinished::class,
],
],
'MoonminingExtractionStarted' => [
'label' => 'notifications::alerts.moon_mining_extraction_started',
'label' => 'notifications::alerts.moon_mining_extraction_started',
'handlers' => [
'mail' => \Seat\Notifications\Notifications\Structures\Mail\MoonMiningExtractionStarted::class,
'slack' => \Seat\Notifications\Notifications\Structures\Slack\MoonMiningExtractionStarted::class,
'discord' => \Seat\Notifications\Notifications\Structures\Discord\MoonMiningExtractionStarted::class,
],
],
'OrbitalAttacked' => [
'label' => 'notifications::alerts.orbital_attacked',
'label' => 'notifications::alerts.orbital_attacked',
'handlers' => [
'slack' => \Seat\Notifications\Notifications\Structures\Slack\OrbitalAttacked::class,
'discord' => \Seat\Notifications\Notifications\Structures\Discord\OrbitalAttacked::class,
],
],
'OwnershipTransferred' => [
'label' => 'notifications::alerts.ownership_transferred',
'label' => 'notifications::alerts.ownership_transferred',
'handlers' => [
'slack' => \Seat\Notifications\Notifications\Structures\Slack\OwnershipTransferred::class,
'discord' => \Seat\Notifications\Notifications\Structures\Discord\OwnershipTransferred::class,
],
],
'RaffleCreated' => [
'label' => 'notifications::alerts.raffle_created',
'label' => 'notifications::alerts.raffle_created',
'handlers' => [
'slack' => \Seat\Notifications\Notifications\Characters\Slack\RaffleCreated::class,
'discord' => \Seat\Notifications\Notifications\Characters\Discord\RaffleCreated::class,
],
],
'RaffleExpired' => [
'label' => 'notifications::alerts.raffle_expired',
'label' => 'notifications::alerts.raffle_expired',
'handlers' => [
'slack' => \Seat\Notifications\Notifications\Characters\Slack\RaffleExpired::class,
'discord' => \Seat\Notifications\Notifications\Characters\Discord\RaffleExpired::class,
],
],
'RaffleFinished' => [
'label' => 'notifications::alerts.raffle_finished',
'label' => 'notifications::alerts.raffle_finished',
'handlers' => [
'slack' => \Seat\Notifications\Notifications\Characters\Slack\RaffleFinished::class,
'discord' => \Seat\Notifications\Notifications\Characters\Discord\RaffleFinished::class,
],
],
'ResearchMissionAvailableMsg' => [
'label' => 'notifications::alerts.research_mission_available',
'label' => 'notifications::alerts.research_mission_available',
'handlers' => [
'slack' => \Seat\Notifications\Notifications\Characters\Slack\ResearchMissionAvailableMsg::class,
'discord' => \Seat\Notifications\Notifications\Characters\Discord\ResearchMissionAvailableMsg::class,
],
],
'SovStructureDestroyed' => [
'label' => 'notifications::alerts.sovereignty_structure_destroyed',
'label' => 'notifications::alerts.sovereignty_structure_destroyed',
'handlers' => [
'discord' => \Seat\Notifications\Notifications\Sovereignties\Discord\SovStructureDestroyed::class,
'mail' => \Seat\Notifications\Notifications\Sovereignties\Mail\SovStructureDestroyed::class,
'slack' => \Seat\Notifications\Notifications\Sovereignties\Slack\SovStructureDestroyed::class,
],
],
'SovStructureReinforced' => [
'label' => 'notifications::alerts.sovereignty_structure_reinforced',
'label' => 'notifications::alerts.sovereignty_structure_reinforced',
'handlers' => [
'discord' => \Seat\Notifications\Notifications\Sovereignties\Discord\SovStructureReinforced::class,
'mail' => \Seat\Notifications\Notifications\Sovereignties\Mail\SovStructureReinforced::class,
'slack' => \Seat\Notifications\Notifications\Sovereignties\Slack\SovStructureReinforced::class,
],
],
'StoryLineMissionAvailableMsg' => [
'label' => 'notifications::alerts.story_line_mission_available',
'label' => 'notifications::alerts.story_line_mission_available',
'handlers' => [
'slack' => \Seat\Notifications\Notifications\Characters\Slack\StoryLineMissionAvailableMsg::class,
'discord' => \Seat\Notifications\Notifications\Characters\Discord\StoryLineMissionAvailableMsg::class,
],
],
'StructureAnchoring' => [
'label' => 'notifications::alerts.structure_anchoring',
'label' => 'notifications::alerts.structure_anchoring',
'handlers' => [
'slack' => \Seat\Notifications\Notifications\Structures\Slack\StructureAnchoring::class,
'discord' => \Seat\Notifications\Notifications\Structures\Discord\StructureAnchoring::class,
],
],
'StructureDestroyed' => [
'label' => 'notifications::alerts.structure_destroyed',
'label' => 'notifications::alerts.structure_destroyed',
'handlers' => [
'slack' => \Seat\Notifications\Notifications\Structures\Slack\StructureDestroyed::class,
'discord' => \Seat\Notifications\Notifications\Structures\Discord\StructureDestroyed::class,
],
],
'StructureFuelAlert' => [
'label' => 'notifications::alerts.structure_fuel_alert',
'label' => 'notifications::alerts.structure_fuel_alert',
'handlers' => [
'mail' => \Seat\Notifications\Notifications\Structures\Mail\StructureFuelAlert::class,
'slack' => \Seat\Notifications\Notifications\Structures\Slack\StructureFuelAlert::class,
'discord' => \Seat\Notifications\Notifications\Structures\Discord\StructureFuelAlert::class,
],
],
'StructureLostArmor' => [
'label' => 'notifications::alerts.structure_lost_armor',
'label' => 'notifications::alerts.structure_lost_armor',
'handlers' => [
'slack' => \Seat\Notifications\Notifications\Structures\Slack\StructureLostArmor::class,
'discord' => \Seat\Notifications\Notifications\Structures\Discord\StructureLostArmor::class,
],
],
'StructureLostShields' => [
'label' => 'notifications::alerts.structure_lost_shield',
'label' => 'notifications::alerts.structure_lost_shield',
'handlers' => [
'slack' => \Seat\Notifications\Notifications\Structures\Slack\StructureLostShields::class,
'discord' => \Seat\Notifications\Notifications\Structures\Discord\StructureLostShields::class,
],
],
'StructureServicesOffline' => [
'label' => 'notifications::alerts.structure_services_offline',
'label' => 'notifications::alerts.structure_services_offline',
'handlers' => [
'mail' => \Seat\Notifications\Notifications\Structures\Mail\StructureServicesOffline::class,
'slack' => \Seat\Notifications\Notifications\Structures\Slack\StructureServicesOffline::class,
'discord' => \Seat\Notifications\Notifications\Structures\Discord\StructureServicesOffline::class,
],
],
'StructureUnanchoring' => [
'label' => 'notifications::alerts.structure_unanchoring',
'label' => 'notifications::alerts.structure_unanchoring',
'handlers' => [
'slack' => \Seat\Notifications\Notifications\Structures\Slack\StructureUnanchoring::class,
'discord' => \Seat\Notifications\Notifications\Structures\Discord\StructureUnanchoring::class,
],
],
'StructureUnderAttack' => [
'label' => 'notifications::alerts.structure_under_attack',
'label' => 'notifications::alerts.structure_under_attack',
'handlers' => [
'mail' => \Seat\Notifications\Notifications\Structures\Mail\StructureUnderAttack::class,
'slack' => \Seat\Notifications\Notifications\Structures\Slack\StructureUnderAttack::class,
'discord' => \Seat\Notifications\Notifications\Structures\Discord\StructureUnderAttack::class,
],
],
'StructureWentHighPower' => [
'label' => 'notifications::alerts.structure_went_high_power',
'label' => 'notifications::alerts.structure_went_high_power',
'handlers' => [
'slack' => \Seat\Notifications\Notifications\Structures\Slack\StructureWentHighPower::class,
'discord' => \Seat\Notifications\Notifications\Structures\Discord\StructureWentHighPower::class,
],
],
'StructureWentLowPower' => [
'label' => 'notifications::alerts.structure_went_low_power',
'label' => 'notifications::alerts.structure_went_low_power',
'handlers' => [
'slack' => \Seat\Notifications\Notifications\Structures\Slack\StructureWentLowPower::class,
'discord' => \Seat\Notifications\Notifications\Structures\Discord\StructureWentLowPower::class,
Expand All @@ -338,7 +338,7 @@
'handlers' => [
'mail' => \Seat\Notifications\Notifications\Seat\Mail\TestNotification::class,
'slack' => \Seat\Notifications\Notifications\Seat\Slack\TestNotification::class,
'discord'=>\Seat\Notifications\Notifications\Seat\Discord\TestNotification::class,
'discord' => \Seat\Notifications\Notifications\Seat\Discord\TestNotification::class,
],
'visible' => false,
],
Expand Down
26 changes: 13 additions & 13 deletions src/Config/package.sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@
return [

'notifications' => [
'name' => 'notifications',
'label' => 'Notifications',
'icon' => 'fas fa-bell',
'name' => 'notifications',
'label' => 'Notifications',
'icon' => 'fas fa-bell',
'route_segment' => 'notifications',
'permission' => 'notifications.setup',
'entries' => [
'permission' => 'notifications.setup',
'entries' => [
[
'name' => 'integrations',
'label' => 'Integrations',
'name' => 'integrations',
'label' => 'Integrations',
'permission' => 'notifications.setup',
'icon' => 'fas fa-toggle-on',
'route' => 'seatcore::notifications.integrations.list',
'icon' => 'fas fa-toggle-on',
'route' => 'seatcore::notifications.integrations.list',
],
[
'name' => 'notification.groups',
'label' => 'Notifications Groups',
'name' => 'notification.groups',
'label' => 'Notifications Groups',
'permission' => 'notifications.setup',
'icon' => 'fas fa-object-group',
'route' => 'seatcore::notifications.groups.list',
'icon' => 'fas fa-object-group',
'route' => 'seatcore::notifications.groups.list',
],
],
],
Expand Down
4 changes: 2 additions & 2 deletions src/Http/Controllers/GroupsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ public function postAddAffiliation(GroupAffiliation $request)
foreach ($request->input('corporations') as $corp)
if (! $group->affiliations->contains('affiliation_id', $corp))
$group->affiliations()->save(new GroupAffiliationModel([
'type' => 'corp',
'type' => 'corp',
'affiliation_id' => $corp,
]));

Expand All @@ -265,7 +265,7 @@ public function postAddAffiliation(GroupAffiliation $request)
foreach ($request->input('characters') as $character)
if (! $group->affiliations->contains('affiliation_id', $character))
$group->affiliations()->save(new GroupAffiliationModel([
'type' => 'char',
'type' => 'char',
'affiliation_id' => $character,
]));

Expand Down
12 changes: 6 additions & 6 deletions src/Http/Controllers/MentionsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function createDiscordAtEveryone(CreateGroupMention $request) {
$group->mentions()->save($mention);

return redirect()
->route('seatcore::notifications.groups.edit', ['notification_group_id'=>$request->id])
->route('seatcore::notifications.groups.edit', ['notification_group_id' => $request->id])
->with('success', trans('notifications::notifications.successfully_created_mention'));
}

Expand All @@ -60,7 +60,7 @@ public function createDiscordAtHere(CreateGroupMention $request) {
$group->mentions()->save($mention);

return redirect()
->route('seatcore::notifications.groups.edit', ['notification_group_id'=>$request->id])
->route('seatcore::notifications.groups.edit', ['notification_group_id' => $request->id])
->with('success', trans('notifications::notifications.successfully_created_mention'));
}

Expand All @@ -73,12 +73,12 @@ public function postCreateDiscordAtRole(CreateDiscordRoleGroupMention $request)

$mention = new GroupMention();
$mention->type = 'discord_role';
$mention->data = ['role'=>(int) $request->role_id];
$mention->data = ['role' => (int) $request->role_id];

$group->mentions()->save($mention);

return redirect()
->route('seatcore::notifications.groups.edit', ['notification_group_id'=>$request->group_id])
->route('seatcore::notifications.groups.edit', ['notification_group_id' => $request->group_id])
->with('success', trans('notifications::notifications.successfully_created_mention'));
}

Expand All @@ -91,12 +91,12 @@ public function postCreateDiscordAtUser(CreateDiscordUserGroupMention $request)

$mention = new GroupMention();
$mention->type = 'discord_user';
$mention->data = ['user'=>(int) $request->user_id];
$mention->data = ['user' => (int) $request->user_id];

$group->mentions()->save($mention);

return redirect()
->route('seatcore::notifications.groups.edit', ['notification_group_id'=>$request->group_id])
->route('seatcore::notifications.groups.edit', ['notification_group_id' => $request->group_id])
->with('success', trans('notifications::notifications.successfully_created_mention'));
}
}
Loading

0 comments on commit 3a1952e

Please sign in to comment.