![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/mautic.corals.io/vendor/friendsofphp/proxy-manager-lts/src/ProxyManager/ |
<?php declare(strict_types=1); namespace ProxyManager; use Composer\InstalledVersions; use PackageVersions\Versions; use OutOfBoundsException; use function class_exists; /** * Version class * * Note that we cannot check the version at runtime via `git` because that would cause a lot of I/O operations. */ final class Version { /** * Private constructor - this class is not meant to be instantiated */ private function __construct() { } /** * Retrieves the package version in the format <detected-version>@<commit-hash>, * where the detected version is what composer could detect. * * @throws OutOfBoundsException * * @psalm-pure * * @psalm-suppress MixedOperand `composer-runtime-api:^2` has rough if no type declarations at all - we'll live with it * @psalm-suppress ImpureMethodCall `composer-runtime-api:^2` has rough if no type declarations at all - we'll live with it */ public static function getVersion(): string { if (class_exists(InstalledVersions::class) && InstalledVersions::isInstalled('friendsofphp/proxy-manager-lts')) { return InstalledVersions::getPrettyVersion('friendsofphp/proxy-manager-lts') . '@' . InstalledVersions::getReference('friendsofphp/proxy-manager-lts'); } if (class_exists(Versions::class)) { try { return Versions::getVersion('friendsofphp/proxy-manager-lts'); } catch (\OutOfBoundsException $e) { // no-op } } return '1@friendsofphp/proxy-manager-lts'; } }