EscolaLMS/Courses

View on GitHub
src/Events/TopicFinished.php

Summary

Maintainability
A
30 mins
Test Coverage
<?php

namespace EscolaLms\Courses\Events;

use EscolaLms\Courses\Models\Topic;
use EscolaLms\Core\Models\User;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;

class TopicFinished
{
    use Dispatchable, SerializesModels;

    private User $user;
    private Topic $topic;

    public function __construct(User $user, Topic $topic)
    {
        $this->user = $user;
        $this->topic = $topic;
    }

    public function getUser(): User
    {
        return $this->user;
    }

    public function getTopic(): Topic
    {
        return $this->topic;
    }
}