<?php

namespace CouponsPlus\App\Coupon\Tree\Data;

/**
 * @template T
 */
class DataWithSource
{
    /**
     * @var string
     */
    protected string $source;
    /**
     * @var T
     */
    protected $data;

    /**
     * @param string $source
     * @param T $data
     */
    public function __construct(string $source, $data)
    {
        $this->source = $source;
        $this->data = $data;
    }

    public function getSource(): string
    {
        return $this->source;
    }

    /**
     * @return T
     */
    public function getData()
    {
        return $this->data;
    }
}