<?php

namespace App\Service;

use App\Integrations\MozApi\Client;

final class NewDomainAuthorityChecker implements StatCheckerInterface
{
    private $symbol = 'DA';
    /**
     * @var Client
     */
    private $client;

    public function __construct(Client $client)
    {
        $this->client = $client;
    }

    public function check($domain)
    {
        $domainAuthority = $this->client->getDomainAuthority($domain);

        return new StatResponse($domain, $this->getSymbol(), $domainAuthority);
    }

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