<?php
namespace Fifa\ConnectId\Command\Helpers;

use Fifa\ConnectId\Sdk\Model\PersonDetailsRequest;
use Fifa\ConnectId\Sdk\Registration\PersonDetailsProviderInterface;

/**
 * Class NullReturningDetailsProvider
 * @package Fifa\ConnectId\Tests\Registration\PersonDetailsProviders
 */
class NullReturningDetailsProvider implements PersonDetailsProviderInterface
{
    /**
     * @var null|string
     */
    private $response;

    /**
     * NullReturningDetailsProvider constructor.
     * @param null|string $response
     */
    public function __construct($response = null)
    {
        $this->response = $response;
    }

    /**
     * Gets detailed information about person with given request.
     *
     * @param PersonDetailsRequest $request
     * @return string|null - the Person Local type from the Fifa Data Standard.
     */
    public function getPersonDetails(PersonDetailsRequest $request): ?string
    {
        return $this->response;
    }
}