opt
/
cpanel
/
ea-wappspector
/
vendor
/
rector
/
rector
/
src
/
Util
➕ New
📤 Upload
✎ Editing:
PhpVersionFactory.php
← Back
<?php declare (strict_types=1); namespace Rector\Util; use Rector\ValueObject\PhpVersion; final class PhpVersionFactory { /** * @return PhpVersion::* */ public static function createIntVersion(string $version) : int { $explodeDash = \explode('-', $version); if (\count($explodeDash) > 1) { $version = $explodeDash[0]; } $explodeVersion = \explode('.', $version); $countExplodedVersion = \count($explodeVersion); if ($countExplodedVersion >= 2) { return (int) $explodeVersion[0] * 10000 + (int) $explodeVersion[1] * 100; } return (int) $version; } }
💾 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