Skip to content

Commit 9158649

Browse files
committed
Add type hinting for directly injected service $templating
1 parent ab5526f commit 9158649

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cookbook/controller/service.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,14 @@ service and use it directly::
180180
// src/Acme/HelloBundle/Controller/HelloController.php
181181
namespace Acme\HelloBundle\Controller;
182182

183+
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
183184
use Symfony\Component\HttpFoundation\Response;
184185

185186
class HelloController
186187
{
187188
private $templating;
188189

189-
public function __construct($templating)
190+
public function __construct(EngineInterface $templating)
190191
{
191192
$this->templating = $templating;
192193
}

0 commit comments

Comments
 (0)