golden hour
/opt/cpanel/ea-wappspector/vendor/rector/rector/src/BetterPhpDocParser/Guard
⬆️ Go Up
Upload
File/Folder
Size
Actions
NewPhpDocFromPHPStanTypeGuard.php
640 B
Del
OK
Edit: NewPhpDocFromPHPStanTypeGuard.php
<?php declare (strict_types=1); namespace Rector\BetterPhpDocParser\Guard; use PHPStan\Type\MixedType; use PHPStan\Type\Type; use PHPStan\Type\UnionType; final class NewPhpDocFromPHPStanTypeGuard { public function isLegal(Type $type) : bool { if ($type instanceof UnionType) { return $this->isLegalUnionType($type); } return \true; } private function isLegalUnionType(UnionType $type) : bool { foreach ($type->getTypes() as $unionType) { if ($unionType instanceof MixedType) { return \false; } } return \true; } }
Save