PocketMine-MP
5.35.1 git-09f4626fa630fccbe1d56a65a90ff8f3566e4db8
Loading...
Searching...
No Matches
ReturnInfo.php
1
<?php declare(strict_types=1);
2
3
namespace
DaveRandom\CallbackValidator;
4
5
use
DaveRandom\CallbackValidator\Type\BaseType
;
6
7
final
class
ReturnInfo
{
8
public
function
__construct(
9
public
readonly ?
BaseType
$type,
10
public
readonly
bool
$byReference =
false
11
){}
12
13
public
function
isSatisfiedBy(
ReturnInfo
$other) :
bool
{
14
return
$this->byReference === $other->byReference && MatchTester::isCovariant($this->type, $other->type);
15
}
16
20
public
function
__toString
(){
21
return
$this->type?->stringify() ??
''
;
22
}
23
}
DaveRandom\CallbackValidator\ReturnInfo
Definition
ReturnInfo.php:7
DaveRandom\CallbackValidator\ReturnInfo\__toString
__toString()
Definition
ReturnInfo.php:20
DaveRandom\CallbackValidator\Type\BaseType
Definition
BaseType.php:10
vendor
pocketmine
callback-validator
src
ReturnInfo.php
Generated by
1.12.0