REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.69 KB
Close
/opt/cpanel/ea-wappspector/vendor/rector/rector/rules/Php74/Rector/FuncCall/RestoreIncludePathToIniRestoreRector.php
Text
Base64
<?php declare (strict_types=1); namespace Rector\Php74\Rector\FuncCall; use PhpParser\Node; use PhpParser\Node\Arg; use PhpParser\Node\Expr\FuncCall; use PhpParser\Node\Name; use PhpParser\Node\Scalar\String_; use Rector\Rector\AbstractRector; use Rector\ValueObject\PhpVersionFeature; use Rector\VersionBonding\Contract\MinPhpVersionInterface; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** * @see https://3v4l.org/Kcs98 * @see \Rector\Tests\Php74\Rector\FuncCall\RestoreIncludePathToIniRestoreRector\RestoreIncludePathToIniRestoreRectorTest */ final class RestoreIncludePathToIniRestoreRector extends AbstractRector implements MinPhpVersionInterface { public function provideMinPhpVersion() : int { return PhpVersionFeature::DEPRECATE_RESTORE_INCLUDE_PATH; } public function getRuleDefinition() : RuleDefinition { return new RuleDefinition('Change restore_include_path() to ini_restore("include_path")', [new CodeSample(<<<'CODE_SAMPLE' restore_include_path(); CODE_SAMPLE , <<<'CODE_SAMPLE' ini_restore('include_path'); CODE_SAMPLE )]); } /** * @return array<class-string<Node>> */ public function getNodeTypes() : array { return [FuncCall::class]; } /** * @param FuncCall $node */ public function refactor(Node $node) : ?FuncCall { if (!$this->isName($node, 'restore_include_path')) { return null; } if ($node->isFirstClassCallable()) { return null; } $node->name = new Name('ini_restore'); $node->args[0] = new Arg(new String_('include_path')); return $node; } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 6
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
ArrayKeyExistsOnPropertyRector.php
2.01 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
FilterVarToAddSlashesRector.php
1.79 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
HebrevcToNl2brHebrevRector.php
1.52 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
MbStrrposEncodingArgumentPositionRector.php
1.85 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
MoneyFormatToNumberFormatRector.php
2.91 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
RestoreIncludePathToIniRestoreRector.php
1.69 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
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).