opt
/
cpanel
/
ea-wappspector
/
vendor
/
rector
/
rector
/
src
/
Skipper
/
FileSystem
➕ New
📤 Upload
✎ Editing:
FnMatchPathNormalizer.php
← Back
<?php declare (strict_types=1); namespace Rector\Skipper\FileSystem; /** * @see \Rector\Tests\Skipper\FileSystem\FnMatchPathNormalizerTest */ final class FnMatchPathNormalizer { public function normalizeForFnmatch(string $path) : string { if (\substr_compare($path, '*', -\strlen('*')) === 0 || \strncmp($path, '*', \strlen('*')) === 0) { return '*' . \trim($path, '*') . '*'; } if (\strpos($path, '..') !== \false) { /** @var string|false $realPath */ $realPath = \realpath($path); if ($realPath === \false) { return ''; } return \Rector\Skipper\FileSystem\PathNormalizer::normalize($realPath); } return $path; } }
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel