🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-06-15 05:33:05 | PHP 8.1.34
📂
/ (Root)
/
opt
/
cpanel
/
ea-wappspector
/
vendor
/
rector
/
rector
/
rules
/
DeadCode
/
PhpDoc
/
Guard
📍 /opt/cpanel/ea-wappspector/vendor/rector/rector/rules/DeadCode/PhpDoc/Guard
🔄 Refresh
✏️
Editing: TemplateTypeRemovalGuard.php
Read Only
<?php declare (strict_types=1); namespace Rector\DeadCode\PhpDoc\Guard; use PHPStan\Type\Type; use PHPStan\Type\UnionType; use PHPStan\Type\Generic\TemplateType; final class TemplateTypeRemovalGuard { public function isLegal(Type $docType) : bool { // cover direct \PHPStan\Type\Generic\TemplateUnionType if ($docType instanceof TemplateType) { return \false; } // cover mixed template with mix from @template and non @template $types = $docType instanceof UnionType ? $docType->getTypes() : [$docType]; foreach ($types as $type) { if ($type instanceof TemplateType) { return \false; } } return \true; } }
💾 Save Changes
❌ Cancel