Skip to content

Commit

Permalink
Update SourceCodeExtension.php
Browse files Browse the repository at this point in the history
Ise property promotion
  • Loading branch information
parijke authored Apr 14, 2024
1 parent e8dc87b commit 473c257
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Twig/SourceCodeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,16 @@
*/
final class SourceCodeExtension extends AbstractExtension
{
private FileLinkFormatter $fileLinkFormat;
private string $projectDir;
/**
* @var callable|null
*/
private $controller;

public function __construct(
FileLinkFormatter $fileLinkFormat,
private FileLinkFormatter $fileLinkFormat,
#[Autowire('%kernel.project_dir%')]
string $projectDir,
private string $projectDir,
) {
$this->fileLinkFormat = $fileLinkFormat;
$this->projectDir = str_replace('\\', '/', $projectDir).'/';
}

Expand Down

0 comments on commit 473c257

Please sign in to comment.