BossBey File Manager
PHP:
7.4.33
OS:
Linux
User:
root
Root
/
opt
/
cpanel
/
ea-wappspector
/
vendor
/
rector
/
rector
/
src
/
BetterPhpDocParser
/
Printer
📤 Upload
📝 New File
📁 New Folder
Close
Editing: EmptyPhpDocDetector.php
<?php declare (strict_types=1); namespace Rector\BetterPhpDocParser\Printer; use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode; use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTextNode; final class EmptyPhpDocDetector { public function isPhpDocNodeEmpty(PhpDocNode $phpDocNode) : bool { if ($phpDocNode->children === []) { return \true; } foreach ($phpDocNode->children as $phpDocChildNode) { if ($phpDocChildNode instanceof PhpDocTextNode) { if ($phpDocChildNode->text !== '') { return \false; } } else { return \false; } } return \true; } }
Save
Cancel