Skip to content

Commit 12f7357

Browse files
committed
minor #1513 Update SourceCodeExtension.php (parijke)
This PR was merged into the main branch. Discussion ---------- Update SourceCodeExtension.php Use property promotion We use property promotion all over the code base. Commits ------- 473c257 Update SourceCodeExtension.php
2 parents 26741c8 + 473c257 commit 12f7357

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Twig/SourceCodeExtension.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,16 @@
3030
*/
3131
final class SourceCodeExtension extends AbstractExtension
3232
{
33-
private FileLinkFormatter $fileLinkFormat;
34-
private string $projectDir;
3533
/**
3634
* @var callable|null
3735
*/
3836
private $controller;
3937

4038
public function __construct(
41-
FileLinkFormatter $fileLinkFormat,
39+
private FileLinkFormatter $fileLinkFormat,
4240
#[Autowire('%kernel.project_dir%')]
43-
string $projectDir,
41+
private string $projectDir,
4442
) {
45-
$this->fileLinkFormat = $fileLinkFormat;
4643
$this->projectDir = str_replace('\\', '/', $projectDir).'/';
4744
}
4845

0 commit comments

Comments
 (0)