Skip to content

Commit

Permalink
Update naming of event types
Browse files Browse the repository at this point in the history
  • Loading branch information
Jubeki committed Mar 21, 2022
1 parent c482237 commit bb336be
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/OrbitGitManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,22 +121,22 @@ public function getMessage($event): string
->replace('{primary_key}', $event->model->getKey());
}

protected function getTypeOfEvent($event)
public function getTypeOfEvent($event)
{
if($event instanceof OrbitalCreated) {
return 'created';
return 'Created';
}

if($event instanceof OrbitalDeleted) {
return 'deleted';
return 'Deleted';
}

if($event instanceof OrbitalForceDeleted) {
return 'force-deleted';
return 'Force-Deleted';
}

if($event instanceof OrbitalUpdated) {
return 'updated';
return 'Updated';
}

throw new Exception('Could no resolve commit type of event: '.$event::class);
Expand Down

0 comments on commit bb336be

Please sign in to comment.