Make a new abstract class for transformers.

This commit is contained in:
James Cole
2018-12-15 22:03:42 +01:00
parent 8ce43a3fe1
commit 747602a9cb
13 changed files with 30 additions and 121 deletions

View File

@@ -31,21 +31,15 @@ use Symfony\Component\HttpFoundation\ParameterBag;
/**
* Class RuleGroupTransformer
*/
class RuleGroupTransformer extends TransformerAbstract
class RuleGroupTransformer extends AbstractTransformer
{
/** @var ParameterBag */
protected $parameters;
/**
* CurrencyTransformer constructor.
*
* @codeCoverageIgnore
*
* @param ParameterBag $parameters
*/
public function __construct(ParameterBag $parameters)
public function __construct()
{
$this->parameters = $parameters;
if ('testing' === config('app.env')) {
Log::warning(sprintf('%s should not be instantiated in the TEST environment!', \get_class($this)));
}