efureev/firebase-notifications-laravel

View on GitHub
src/Receivers/FcmDeviceReceiver.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

declare(strict_types=1);

namespace Feugene\FirebaseNotificationsChannel\Receivers;

/**
 * Class FcmDeviceReceiver
 * @package Feugene\FirebaseNotificationsChannel\Receivers
 */
class FcmDeviceReceiver implements FcmNotificationReceiverInterface
{
    /**
     * @var string
     */
    protected $token;

    /**
     * FcmDeviceReceiver constructor.
     *
     * @param string $token
     */
    public function __construct(string $token)
    {
        $this->token = $token;
    }

    /**
     * @return string
     */
    public function getToken(): string
    {
        return $this->token;
    }

    /**
     * {@inheritdoc}
     */
    public function getTarget(): array
    {
        return ['token' => $this->getToken()];
    }
}