Skip to content

Commit

Permalink
PHPStan Pro - pass editorUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Apr 10, 2024
1 parent f2258ad commit b04a3cd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions conf/config.neon
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ services:
allConfigFiles: %allConfigFiles%
cliAutoloadFile: %cliAutoloadFile%
bootstrapFiles: %bootstrapFiles%
editorUrl: %editorUrl%

-
class: PHPStan\Dependency\DependencyResolver
Expand Down
3 changes: 3 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
includes: [ build/phpstan.neon ]

parameters:
editorUrl: 'phpstorm://open?file=%%file%%&line=%%line%%'
2 changes: 2 additions & 0 deletions src/Command/FixerApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public function __construct(
private array $allConfigFiles,
private ?string $cliAutoloadFile,
private array $bootstrapFiles,
private ?string $editorUrl,
)
{
}
Expand Down Expand Up @@ -120,6 +121,7 @@ public function run(
'projectConfigFile' => $projectConfigFile,
'filesCount' => $filesCount,
'phpstanVersion' => ComposerHelper::getPhpStanVersion(),
'editorUrl' => $this->editorUrl,
]]);
$decoder->on('data', function (array $data) use (
$output,
Expand Down

0 comments on commit b04a3cd

Please sign in to comment.