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
|
identifier: return.type
|
||||||
count: 1
|
count: 1
|
||||||
path: src/Schema/Result/ReadResourceResult.php
|
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
|
class StdioTransport extends BaseTransport
|
||||||
{
|
{
|
||||||
private RunnerControlInterface $runnerControl;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param resource $input
|
* @param resource $input
|
||||||
* @param resource $output
|
* @param resource $output
|
||||||
* @param ?RunnerControlInterface $runnerControl
|
|
||||||
*/
|
*/
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private $input = \STDIN,
|
private $input = \STDIN,
|
||||||
private $output = \STDOUT,
|
private $output = \STDOUT,
|
||||||
?LoggerInterface $logger = null,
|
?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);
|
parent::__construct($logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue