mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Make a new abstract class for transformers.
This commit is contained in:
@@ -26,33 +26,25 @@ namespace FireflyIII\Transformers;
|
||||
|
||||
use FireflyIII\Models\Role;
|
||||
use FireflyIII\User;
|
||||
use League\Fractal\Resource\Collection as FractalCollection;
|
||||
use League\Fractal\TransformerAbstract;
|
||||
use Log;
|
||||
use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
|
||||
/**
|
||||
* Class UserTransformer
|
||||
*/
|
||||
class UserTransformer extends TransformerAbstract
|
||||
class UserTransformer extends AbstractTransformer
|
||||
{
|
||||
/** @var ParameterBag */
|
||||
protected $parameters;
|
||||
|
||||
/**
|
||||
* UserTransformer 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)));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Transform user.
|
||||
*
|
||||
|
Reference in New Issue
Block a user