Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit138f55b

Browse files
[TwigBridge] Make LintCommand::$namePatterns private
1 parent3c07197 commit138f55b

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

‎src/Symfony/Bridge/Twig/Command/LintCommand.php‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,13 @@
3939
#[AsCommand(name:'lint:twig', description:'Lint a Twig template and outputs encountered errors')]
4040
class LintCommandextends Command
4141
{
42-
protectedstring|array$namePatterns;
43-
privateEnvironment$twig;
4442
privatestring$format;
4543

46-
publicfunction__construct(Environment$twig,string|array$namePatterns = ['*.twig'])
47-
{
44+
publicfunction__construct(
45+
privateEnvironment$twig,
46+
privatestring|array$namePatterns = ['*.twig'],
47+
){
4848
parent::__construct();
49-
50-
$this->twig =$twig;
51-
$this->namePatterns =$namePatterns;
5249
}
5350

5451
protectedfunctionconfigure()

‎src/Symfony/Bundle/TwigBundle/Command/LintCommand.php‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ protected function configure()
4747
protectedfunctionfindFiles(string$filename):iterable
4848
{
4949
if (str_starts_with($filename,'@')) {
50-
$dir =$this->getApplication()->getKernel()->locateResource($filename);
51-
52-
return Finder::create()->files()->in($dir)->name($this->namePatterns);
50+
$filename =$this->getApplication()->getKernel()->locateResource($filename);
5351
}
5452

5553
returnparent::findFiles($filename);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp