mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 06:01:21 +00:00
Make a new abstract class for transformers.
This commit is contained in:
@@ -44,23 +44,17 @@ use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
*
|
||||
* Class RecurringTransactionTransformer
|
||||
*/
|
||||
class RecurrenceTransformer extends TransformerAbstract
|
||||
class RecurrenceTransformer extends AbstractTransformer
|
||||
{
|
||||
/** @var ParameterBag */
|
||||
protected $parameters;
|
||||
|
||||
/** @var RecurringRepositoryInterface */
|
||||
protected $repository;
|
||||
|
||||
/**
|
||||
* RecurrenceTransformer constructor.
|
||||
*
|
||||
* @param ParameterBag $parameters
|
||||
*/
|
||||
public function __construct(ParameterBag $parameters)
|
||||
public function __construct()
|
||||
{
|
||||
$this->repository = app(RecurringRepositoryInterface::class);
|
||||
$this->parameters = $parameters;
|
||||
if ('testing' === config('app.env')) {
|
||||
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', \get_class($this)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user