Skip to content

Commit

Permalink
big changes
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyDavidson committed Jul 27, 2023
1 parent c5c4254 commit eaea3bd
Show file tree
Hide file tree
Showing 76 changed files with 301 additions and 200 deletions.
2 changes: 0 additions & 2 deletions app/Actions/EventMatches/AddCompetitorsToMatchAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ class AddCompetitorsToMatchAction extends BaseEventMatchAction

/**
* Add competitors to an event match.
*
* @param Collection<int, array> $competitors
*/
public function handle(EventMatch $eventMatch, Collection $competitors): void
{
Expand Down
1 change: 0 additions & 1 deletion app/Actions/EventMatches/AddMatchForEventAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ class AddMatchForEventAction extends BaseEventMatchAction
*/
public function handle(Event $event, EventMatchData $eventMatchData): EventMatch
{
/** @var \App\Models\EventMatch $createdMatch */
$createdMatch = $this->eventMatchRepository->createForEvent($event, $eventMatchData);

AddRefereesToMatchAction::run($createdMatch, $eventMatchData->referees);
Expand Down
2 changes: 0 additions & 2 deletions app/Actions/EventMatches/AddRefereesToMatchAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ class AddRefereesToMatchAction extends BaseEventMatchAction

/**
* Add referees to an event match.
*
* @param \Illuminate\Database\Eloquent\Collection<int, \App\Models\Referee> $referees
*/
public function handle(EventMatch $eventMatch, Collection $referees): void
{
Expand Down
2 changes: 0 additions & 2 deletions app/Actions/EventMatches/AddTagTeamsToMatchAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ class AddTagTeamsToMatchAction extends BaseEventMatchAction

/**
* Add tag teams to an event match.
*
* @param \Illuminate\Support\Collection<int, \App\Models\TagTeam> $tagTeams
*/
public function handle(EventMatch $eventMatch, Collection $tagTeams, int $sideNumber): void
{
Expand Down
2 changes: 0 additions & 2 deletions app/Actions/EventMatches/AddTitlesToMatchAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ class AddTitlesToMatchAction extends BaseEventMatchAction

/**
* Add titles to an event match.
*
* @param \Illuminate\Database\Eloquent\Collection<int, \App\Models\Title> $titles
*/
public function handle(EventMatch $eventMatch, Collection $titles): void
{
Expand Down
2 changes: 0 additions & 2 deletions app/Actions/EventMatches/AddWrestlersToMatchAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ class AddWrestlersToMatchAction extends BaseEventMatchAction

/**
* Add wrestlers to an event match.
*
* @param \Illuminate\Support\Collection<int, \App\Models\Wrestler> $wrestlers
*/
public function handle(EventMatch $eventMatch, Collection $wrestlers, int $sideNumber): void
{
Expand Down
4 changes: 2 additions & 2 deletions app/Actions/Managers/ClearInjuryAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ClearInjuryAction extends BaseManagerAction
/**
* Clear an injury of a manager.
*
* @throws CannotBeClearedFromInjuryException
* @throws \App\Exceptions\CannotBeClearedFromInjuryException
*/
public function handle(Manager $manager, Carbon $recoveryDate = null): void
{
Expand All @@ -30,7 +30,7 @@ public function handle(Manager $manager, Carbon $recoveryDate = null): void
/**
* Ensure a manager can be cleared from an injury.
*
* @throws CannotBeClearedFromInjuryException
* @throws \App\Exceptions\CannotBeClearedFromInjuryException
*/
private function ensureCanBeClearedFromInjury(Manager $manager): void
{
Expand Down
4 changes: 2 additions & 2 deletions app/Actions/Managers/EmployAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class EmployAction extends BaseManagerAction
/**
* Employ a manager.
*
* @throws CannotBeEmployedException
* @throws \App\Exceptions\CannotBeEmployedException
*/
public function handle(Manager $manager, Carbon $startDate = null): void
{
Expand All @@ -34,7 +34,7 @@ public function handle(Manager $manager, Carbon $startDate = null): void
/**
* Ensure a manager can be employed.
*
* @throws CannotBeEmployedException
* @throws \App\Exceptions\CannotBeEmployedException
*/
private function ensureCanBeEmployed(Manager $manager): void
{
Expand Down
4 changes: 2 additions & 2 deletions app/Actions/Managers/InjureAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class InjureAction extends BaseManagerAction
/**
* Injure a manager.
*
* @throws CannotBeInjuredException
* @throws \App\Exceptions\CannotBeInjuredException
*/
public function handle(Manager $manager, Carbon $injureDate = null): void
{
Expand All @@ -30,7 +30,7 @@ public function handle(Manager $manager, Carbon $injureDate = null): void
/**
* Ensure a manager can be injured.
*
* @throws CannotBeInjuredException
* @throws \App\Exceptions\CannotBeInjuredException
*/
private function ensureCanBeInjured(Manager $manager): void
{
Expand Down
4 changes: 2 additions & 2 deletions app/Actions/Managers/ReinstateAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ReinstateAction extends BaseManagerAction
/**
* Reinstate a manager.
*
* @throws CannotBeReinstatedException
* @throws \App\Exceptions\CannotBeReinstatedException
*/
public function handle(Manager $manager, Carbon $reinstatementDate = null): void
{
Expand All @@ -30,7 +30,7 @@ public function handle(Manager $manager, Carbon $reinstatementDate = null): void
/**
* Ensure a manager can be reinstated.
*
* @throws CannotBeReinstatedException
* @throws \App\Exceptions\CannotBeReinstatedException
*/
private function ensureCanBeReinstated(Manager $manager): void
{
Expand Down
4 changes: 2 additions & 2 deletions app/Actions/Managers/ReleaseAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ReleaseAction extends BaseManagerAction
/**
* Release a manager.
*
* @throws CannotBeReleasedException
* @throws \App\Exceptions\CannotBeReleasedException
*/
public function handle(Manager $manager, Carbon $releaseDate = null): void
{
Expand All @@ -41,7 +41,7 @@ public function handle(Manager $manager, Carbon $releaseDate = null): void
/**
* Ensure a manager can be released.
*
* @throws CannotBeReleasedException
* @throws \App\Exceptions\CannotBeReleasedException
*/
private function ensureCanBeReleased(Manager $manager): void
{
Expand Down
4 changes: 2 additions & 2 deletions app/Actions/Managers/SuspendAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class SuspendAction extends BaseManagerAction
/**
* Suspend a manager.
*
* @throws CannotBeSuspendedException
* @throws \App\Exceptions\CannotBeSuspendedException
*/
public function handle(Manager $manager, Carbon $suspensionDate = null): void
{
Expand All @@ -30,7 +30,7 @@ public function handle(Manager $manager, Carbon $suspensionDate = null): void
/**
* Ensure a manager can be suspended.
*
* @throws CannotBeSuspendedException
* @throws \App\Exceptions\CannotBeSuspendedException
*/
private function ensureCanBeSuspended(Manager $manager): void
{
Expand Down
4 changes: 2 additions & 2 deletions app/Actions/Managers/UnretireAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class UnretireAction extends BaseManagerAction
/**
* Unretire a manager.
*
* @throws CannotBeUnretiredException
* @throws \App\Exceptions\CannotBeUnretiredException
*/
public function handle(Manager $manager, Carbon $unretiredDate = null): void
{
Expand All @@ -31,7 +31,7 @@ public function handle(Manager $manager, Carbon $unretiredDate = null): void
/**
* Ensure a manager can be unretired.
*
* @throws CannotBeUnretiredException
* @throws \App\Exceptions\CannotBeUnretiredException
*/
private function ensureCanBeUnretired(Manager $manager): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Referees/ClearInjuryAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class ClearInjuryAction extends BaseRefereeAction

/**
* Clear an injury of a referee.
*
* @throws \App\Exceptions\CannotBeClearedFromInjuryException
*/
public function handle(Referee $referee, Carbon $recoveryDate = null): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Referees/EmployAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class EmployAction extends BaseRefereeAction

/**
* Employ a referee.
*
* @throws \App\Exceptions\CannotBeEmployedException
*/
public function handle(Referee $referee, Carbon $startDate = null): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Referees/InjureAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class InjureAction extends BaseRefereeAction

/**
* Injure a referee.
*
* @throws \App\Exceptions\CannotBeInjuredException
*/
public function handle(Referee $referee, Carbon $injureDate = null): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Referees/ReinstateAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class ReinstateAction extends BaseRefereeAction

/**
* Reinstate a referee.
*
* @throws \App\Exceptions\CannotBeReinstatedException
*/
public function handle(Referee $referee, Carbon $reinstatementDate = null): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Referees/ReleaseAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class ReleaseAction extends BaseRefereeAction

/**
* Release a referee.
*
* @throws \App\Exceptions\CannotBeReleasedException
*/
public function handle(Referee $referee, Carbon $releaseDate = null): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Referees/RetireAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class RetireAction extends BaseRefereeAction

/**
* Retire a referee.
*
* @throws \App\Exceptions\CannotBeRetiredException
*/
public function handle(Referee $referee, Carbon $retirementDate = null): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Referees/SuspendAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class SuspendAction extends BaseRefereeAction

/**
* Suspend a referee.
*
* @throws \App\Exceptions\CannotBeSuspendedException
*/
public function handle(Referee $referee, Carbon $suspensionDate = null): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Referees/UnretireAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class UnretireAction extends BaseRefereeAction

/**
* Unretire a referee.
*
* @throws \App\Exceptions\CannotBeUnretiredException
*/
public function handle(Referee $referee, Carbon $unretiredDate = null): void
{
Expand Down
2 changes: 0 additions & 2 deletions app/Actions/TagTeams/AddTagTeamPartnersAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ class AddTagTeamPartnersAction extends BaseTagTeamAction

/**
* Update a given tag team with given wrestlers.
*
* @param \Illuminate\Database\Eloquent\Collection<int, \App\Models\Wrestler> $wrestlers
*/
public function handle(TagTeam $tagTeam, Collection $wrestlers): void
{
Expand Down
6 changes: 4 additions & 2 deletions app/Actions/TagTeams/BaseTagTeamAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ abstract class BaseTagTeamAction
/**
* Create a new base tag team action instance.
*/
public function __construct(protected TagTeamRepository $tagTeamRepository, protected WrestlerRepository $wrestlerRepository)
{
public function __construct(
protected TagTeamRepository $tagTeamRepository,
protected WrestlerRepository $wrestlerRepository
) {
}
}
2 changes: 2 additions & 0 deletions app/Actions/Titles/ActivateAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class ActivateAction extends BaseTitleAction
use AsAction;

/**
* Activate a title.
*
* @throws \App\Exceptions\CannotBeActivatedException
*/
public function handle(Title $title, Carbon $activationDate = null): void
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Titles/DeactivateAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class DeactivateAction extends BaseTitleAction

/**
* Deactivate a title.
*
* @throws \App\Exceptions\CannotBeDeactivatedException
*/
public function handle(Title $title, Carbon $deactivationDate = null): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Titles/RetireAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class RetireAction extends BaseTitleAction

/**
* Retire a title.
*
* @throws \App\Exceptions\CannotBeRetiredException
*/
public function handle(Title $title, Carbon $retirementDate = null): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Wrestlers/ClearInjuryAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class ClearInjuryAction extends BaseWrestlerAction

/**
* Clear an injury of a wrestler.
*
* @throws \App\Exceptions\CannotBeClearedFromInjuryException
*/
public function handle(Wrestler $wrestler, Carbon $recoveryDate = null): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Wrestlers/EmployAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class EmployAction extends BaseWrestlerAction

/**
* Employ a wrestler.
*
* @throws \App\Exceptions\CannotBeEmployedException
*/
public function handle(Wrestler $wrestler, Carbon $startDate = null): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Wrestlers/InjureAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class InjureAction extends BaseWrestlerAction

/**
* Injure a wrestler.
*
* @throws \App\Exceptions\CannotBeInjuredException
*/
public function handle(Wrestler $wrestler, Carbon $injureDate = null): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Wrestlers/ReinstateAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class ReinstateAction extends BaseWrestlerAction

/**
* Reinstate a wrestler.
*
* @throws \App\Exceptions\CannotBeReinstatedException
*/
public function handle(Wrestler $wrestler, Carbon $reinstatementDate = null): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Wrestlers/ReleaseAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class ReleaseAction extends BaseWrestlerAction

/**
* Release a wrestler.
*
* @throws \App\Exceptions\CannotBeReleasedException
*/
public function handle(Wrestler $wrestler, Carbon $releaseDate = null): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Wrestlers/RetireAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class RetireAction extends BaseWrestlerAction

/**
* Retire a wrestler.
*
* @throws \App\Exceptions\CannotBeRetiredException
*/
public function handle(Wrestler $wrestler, Carbon $retirementDate = null): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Wrestlers/SuspendAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class SuspendAction extends BaseWrestlerAction

/**
* Suspend a wrestler.
*
* @throws \App\Exceptions\CannotBeSuspendedException
*/
public function handle(Wrestler $wrestler, Carbon $suspensionDate = null): void
{
Expand Down
2 changes: 2 additions & 0 deletions app/Actions/Wrestlers/UnretireAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class UnretireAction extends BaseWrestlerAction

/**
* Unretire a wrestler.
*
* @throws \App\Exceptions\CannotBeUnretiredException
*/
public function handle(Wrestler $wrestler, Carbon $unretiredDate = null): void
{
Expand Down
Loading

0 comments on commit eaea3bd

Please sign in to comment.