Skip to content

Commit 8b57fdf

Browse files
Nyholmchr-hertel
andauthored
Add $runnerControl parameter to StdioTransport constructor (#205)
* Add $runnerControl parameter to StdioTransport constructor * fix cs * fix phpstan baseline --------- Co-authored-by: Christopher Hertel <mail@christopher-hertel.de>
1 parent 2c16b3e commit 8b57fdf

2 files changed

Lines changed: 3 additions & 14 deletions

File tree

phpstan-baseline.neon

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,3 @@ parameters:
55
identifier: return.type
66
count: 1
77
path: src/Schema/Result/ReadResourceResult.php
8-
9-
-
10-
message: '#^PHPDoc tag @param references unknown parameter\: \$runnerControl$#'
11-
identifier: parameter.notFound
12-
count: 1
13-
path: src/Server/Transport/StdioTransport.php

src/Server/Transport/StdioTransport.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,16 @@
2424
*/
2525
class StdioTransport extends BaseTransport
2626
{
27-
private RunnerControlInterface $runnerControl;
28-
2927
/**
30-
* @param resource $input
31-
* @param resource $output
32-
* @param ?RunnerControlInterface $runnerControl
28+
* @param resource $input
29+
* @param resource $output
3330
*/
3431
public function __construct(
3532
private $input = \STDIN,
3633
private $output = \STDOUT,
3734
?LoggerInterface $logger = null,
38-
/* ?RunnerControlInterface $runnerControl = null, */
35+
private readonly RunnerControlInterface $runnerControl = new RunnerControl(),
3936
) {
40-
// $runnerControl parameter was added in 0.2.1 and will be default in 0.3.0
41-
$this->runnerControl = \func_get_args()[3] ?? new RunnerControl();
4237
parent::__construct($logger);
4338
}
4439

0 commit comments

Comments
 (0)