forked from wallabag/wallabag
Inject parameter instead of service
We are injecting CraueConfig service when we only need to retrieve one or two values from it. Instead I discovered we can directly inject a value from a service in the service definition!
This commit is contained in:
@ -8,7 +8,6 @@ use JMS\Serializer\SerializerBuilder;
|
||||
use PHPePub\Core\EPub;
|
||||
use PHPePub\Core\Structure\OPF\DublinCore;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Craue\ConfigBundle\Util\Config;
|
||||
|
||||
/**
|
||||
* This class doesn't have unit test BUT it's fully covered by a functional test with ExportControllerTest.
|
||||
@ -27,12 +26,12 @@ class EntriesExport
|
||||
</div>';
|
||||
|
||||
/**
|
||||
* @param Config $craueConfig CraueConfig instance to get wallabag instance url from database
|
||||
* @param string $wallabagUrl Wallabag instance url
|
||||
* @param string $logoPath Path to the logo FROM THE BUNDLE SCOPE
|
||||
*/
|
||||
public function __construct(Config $craueConfig, $logoPath)
|
||||
public function __construct($wallabagUrl, $logoPath)
|
||||
{
|
||||
$this->wallabagUrl = $craueConfig->get('wallabag_url');
|
||||
$this->wallabagUrl = $wallabagUrl;
|
||||
$this->logoPath = $logoPath;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user