REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.17 KB
Close
/opt/cpanel/ea-wappspector/vendor/rector/rector/rules/Php80/AttributeDecorator/DoctrineConverterAttributeDecorator.php
Text
Base64
<?php declare (strict_types=1); namespace Rector\Php80\AttributeDecorator; use PhpParser\Node\Attribute; use PhpParser\Node\Expr\ConstFetch; use PhpParser\Node\Identifier; use PhpParser\Node\Name; use PhpParser\Node\Scalar\String_; use Rector\Php80\Contract\ConverterAttributeDecoratorInterface; final class DoctrineConverterAttributeDecorator implements ConverterAttributeDecoratorInterface { public function getAttributeName() : string { return 'Doctrine\\ORM\\Mapping\\Column'; } public function decorate(Attribute $attribute) : void { foreach ($attribute->args as $arg) { if (!$arg->name instanceof Identifier) { continue; } if ($arg->name->toString() !== 'nullable') { continue; } $value = $arg->value; if (!$value instanceof String_) { continue; } if (!\in_array($value->value, ['true', 'false'], \true)) { continue; } $arg->value = $value->value === 'true' ? new ConstFetch(new Name('true')) : new ConstFetch(new Name('false')); break; } } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 2
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
DoctrineConverterAttributeDecorator.php
1.17 KB
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
SensioParamConverterAttributeDecorator.php
656 B
lrw-r--r--
2024-11-08 13:59:10
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).