Skip to content

Commit d674fa6

Browse files
[DependecyInjection] Added Use & hints
1 parent 29d3c27 commit d674fa6

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

service_container.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,11 +370,14 @@ you can type-hint the new ``SiteUpdateManager`` class and use it::
370370
namespace App\Controller;
371371

372372
use App\Service\SiteUpdateManager;
373-
// ...
373+
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
374+
use Symfony\Component\HttpFoundation\Response;
375+
use Symfony\Component\Routing\Annotation\Route;
374376

375377
class SiteController extends AbstractController
376378
{
377-
public function new(SiteUpdateManager $siteUpdateManager)
379+
#[Route('/site/new')]
380+
public function new(SiteUpdateManager $siteUpdateManager): Response
378381
{
379382
// ...
380383

0 commit comments

Comments
 (0)