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>
This commit is contained in:
parent
2c16b3e084
commit
8b57fdf3d0
2 changed files with 3 additions and 14 deletions
|
|
@ -5,9 +5,3 @@ parameters:
|
|||
identifier: return.type
|
||||
count: 1
|
||||
path: src/Schema/Result/ReadResourceResult.php
|
||||
|
||||
-
|
||||
message: '#^PHPDoc tag @param references unknown parameter\: \$runnerControl$#'
|
||||
identifier: parameter.notFound
|
||||
count: 1
|
||||
path: src/Server/Transport/StdioTransport.php
|
||||
|
|
|
|||
|
|
@ -24,21 +24,16 @@ use Psr\Log\LoggerInterface;
|
|||
*/
|
||||
class StdioTransport extends BaseTransport
|
||||
{
|
||||
private RunnerControlInterface $runnerControl;
|
||||
|
||||
/**
|
||||
* @param resource $input
|
||||
* @param resource $output
|
||||
* @param ?RunnerControlInterface $runnerControl
|
||||
* @param resource $input
|
||||
* @param resource $output
|
||||
*/
|
||||
public function __construct(
|
||||
private $input = \STDIN,
|
||||
private $output = \STDOUT,
|
||||
?LoggerInterface $logger = null,
|
||||
/* ?RunnerControlInterface $runnerControl = null, */
|
||||
private readonly RunnerControlInterface $runnerControl = new RunnerControl(),
|
||||
) {
|
||||
// $runnerControl parameter was added in 0.2.1 and will be default in 0.3.0
|
||||
$this->runnerControl = \func_get_args()[3] ?? new RunnerControl();
|
||||
parent::__construct($logger);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue