PocketMine-MP
5.35.1 git-09f4626fa630fccbe1d56a65a90ff8f3566e4db8
Loading...
Searching...
No Matches
IntersectionType.php
1
<?php
2
3
namespace
DaveRandom\CallbackValidator\Type;
4
5
final
class
IntersectionType
implements
BaseType
{
9
public
function
__construct
(
10
public
readonly array $types,
11
){}
12
13
public
function
stringify(
int
$depth = 0) : string{
14
$result = implode(
'&'
, array_map(fn($type) => $type->stringify($depth + 1), $this->types));
15
return
$depth === 0 ? $result :
"($result)"
;
16
}
17
}
DaveRandom\CallbackValidator\Type\IntersectionType
Definition
IntersectionType.php:5
DaveRandom\CallbackValidator\Type\IntersectionType\__construct
__construct(public readonly array $types,)
Definition
IntersectionType.php:9
DaveRandom\CallbackValidator\Type\BaseType
Definition
BaseType.php:10
vendor
pocketmine
callback-validator
src
Type
IntersectionType.php
Generated by
1.12.0