#!/usr/bin/env php
<?php

/*
 * Generated by Humbug Box 4.2.0@afc3a47.
 *
 * @link https://github.com/humbug/box
 */

Phar::mapPhar('box-auto-generated-alias-53fbc7d5c1be.phar');

require 'phar://box-auto-generated-alias-53fbc7d5c1be.phar/.box/bin/check-requirements.php';

require 'phar://box-auto-generated-alias-53fbc7d5c1be.phar/bin/drush.php';

__HALT_COMPILER(); ?>
  R                  vendor/autoload.php  ‡ÊÞc  �ÛÅ¤      @   vendor/laravel-zero/phar-updater/src/Strategy/Sha512Strategy.phpÁ  ‡ÊÞcÁ  ïØ¤      C   vendor/laravel-zero/phar-updater/src/Strategy/StrategyInterface.php,  ‡ÊÞc,  "ˆÒ¤      @   vendor/laravel-zero/phar-updater/src/Strategy/Sha256Strategy.phpÉ  ‡ÊÞcÉ  CFù…¤      =   vendor/laravel-zero/phar-updater/src/Strategy/ShaStrategy.php¹  ‡ÊÞc¹  À{à¤      E   vendor/laravel-zero/phar-updater/src/Strategy/ShaStrategyAbstract.phpÆ  ‡ÊÞcÆ  *OÎÛ¤      @   vendor/laravel-zero/phar-updater/src/Strategy/GithubStrategy.phpS  ‡ÊÞcS  Þ{!¤      E   vendor/laravel-zero/phar-updater/src/Exception/ExceptionInterface.phpW   ‡ÊÞcW   Ö
“¤      C   vendor/laravel-zero/phar-updater/src/Exception/RuntimeException.php‰   ‡ÊÞc‰   Äfì¤      G   vendor/laravel-zero/phar-updater/src/Exception/NoSignatureException.phpn   ‡ÊÞcn   š‰ÊÅ¤      F   vendor/laravel-zero/phar-updater/src/Exception/FilesystemException.phpm   ‡ÊÞcm   Y §¤      G   vendor/laravel-zero/phar-updater/src/Exception/HttpRequestException.phpn   ‡ÊÞcn   ¼Îpþ¤      G   vendor/laravel-zero/phar-updater/src/Exception/JsonParsingException.phpn   ‡ÊÞcn   âmÆ¤      K   vendor/laravel-zero/phar-updater/src/Exception/InvalidArgumentException.php‘   ‡ÊÞc‘   Wš¤      6   vendor/laravel-zero/phar-updater/src/VersionParser.php�
  ‡ÊÞc�
  `SØ]¤      0   vendor/laravel-zero/phar-updater/src/Updater.php/#  ‡ÊÞc/#  ‡á'¤         vendor/composer/ClassLoader.php�@  ‡ÊÞc�@  >]×¤      %   vendor/composer/autoload_classmap.php3  ‡ÊÞc3  ¨Wñ¤         vendor/composer/installed.phpŸ  ‡ÊÞcŸ  WÖ¨±¤      #   vendor/composer/autoload_static.phpë  ‡ÊÞcë  Îs5¤      !   vendor/composer/autoload_real.php¢  ‡ÊÞc¢  Èt�¤      -   vendor/composer/xdebug-handler/src/Status.php
  ‡ÊÞc
  $Ÿv-¤      .   vendor/composer/xdebug-handler/src/Process.phpk	  ‡ÊÞck	  ŽUÿß¤      0   vendor/composer/xdebug-handler/src/PhpConfig.php´  ‡ÊÞc´  *D’ ¤      4   vendor/composer/xdebug-handler/src/XdebugHandler.php‡%  ‡ÊÞc‡%  ¾L3¤         vendor/composer/LICENSE.  ‡ÊÞc.   Õ¤      !   vendor/composer/autoload_psr4.php  ‡ÊÞc  É�b6¤      %   vendor/composer/InstalledVersions.php  ‡ÊÞc  ¼êŠT¤      "   vendor/composer/platform_check.php�  ‡ÊÞc�  äÍ%¾¤      '   vendor/composer/autoload_namespaces.php‹   ‡ÊÞc‹   Š/t¤      &   vendor/webmozart/assert/src/Assert.phpât  ‡ÊÞcât  ±é³Þ¤      %   vendor/webmozart/assert/src/Mixin.phpRÕ  ‡ÊÞcRÕ  Ü;} ¤      8   vendor/webmozart/assert/src/InvalidArgumentException.phpr   ‡ÊÞcr   ÊtV¢¤      '   vendor/webmozart/path-util/src/Path.php.(  ‡ÊÞc.(  ôù…Ý¤      &   vendor/webmozart/path-util/src/Url.phpÄ  ‡ÊÞcÄ  ôðÑ3¤      *   vendor/psr/log/Psr/Log/LoggerInterface.phpÈ  ‡ÊÞcÈ  šx¤      /   vendor/psr/log/Psr/Log/LoggerAwareInterface.php|   ‡ÊÞc|   $£ˆ¤      )   vendor/psr/log/Psr/Log/AbstractLogger.php;  ‡ÊÞc;  ñ>3[¤      #   vendor/psr/log/Psr/Log/LogLevel.phpû   ‡ÊÞcû   jðñ8¤      &   vendor/psr/log/Psr/Log/LoggerTrait.phpk  ‡ÊÞck  £}‰’¤      %   vendor/psr/log/Psr/Log/NullLogger.phpŸ   ‡ÊÞcŸ   �Xóª¤      *   vendor/psr/log/Psr/Log/Test/TestLogger.php<  ‡ÊÞc<  þ(åI¤      )   vendor/psr/log/Psr/Log/Test/DummyTest.phpp   ‡ÊÞcp   Î¤      3   vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.phpI  ‡ÊÞcI  ´D¤      +   vendor/psr/log/Psr/Log/LoggerAwareTrait.php§   ‡ÊÞc§   T½úB¤      3   vendor/psr/log/Psr/Log/InvalidArgumentException.php`   ‡ÊÞc`    ˆX1¤      0   vendor/webflo/drupal-finder/src/DrupalFinder.phpÐ  ‡ÊÞcÐ  Ó8¬5¤         bin/drush.phpÄ  ‡ÊÞcÄ  ½½ÿ¤         .box/vendor/autoload.php  ‡ÊÞc  nA×7¤      $   .box/vendor/composer/ClassLoader.phpÄ>  ‡ÊÞcÄ>  Æ5Ky¤      *   .box/vendor/composer/autoload_classmap.php
  ‡ÊÞc
  ¬9ûa¤      "   .box/vendor/composer/installed.phpÃ&  ‡ÊÞcÃ&  :á×�¤      (   .box/vendor/composer/autoload_static.php2  ‡ÊÞc2  Zðí®¤      &   .box/vendor/composer/autoload_real.phpp  ‡ÊÞcp  óK‘ý¤         .box/vendor/composer/LICENSE.  ‡ÊÞc.   Õ¤      &   .box/vendor/composer/autoload_psr4.php*  ‡ÊÞc*  L³ðù¤      -   .box/vendor/composer/semver/src/Intervals.phpþ9  ‡ÊÞcþ9  ‰3þÍ¤      *   .box/vendor/composer/semver/src/Semver.php‚  ‡ÊÞc‚  �A?m¤      1   .box/vendor/composer/semver/src/VersionParser.php1;  ‡ÊÞc1;  RŸ¤      B   .box/vendor/composer/semver/src/Constraint/MatchNoneConstraint.phpY  ‡ÊÞcY  û¤      A   .box/vendor/composer/semver/src/Constraint/MatchAllConstraint.php;  ‡ÊÞc;  Ñ|P¤      9   .box/vendor/composer/semver/src/Constraint/Constraint.phpì&  ‡ÊÞcì&  »´/¤      >   .box/vendor/composer/semver/src/Constraint/MultiConstraint.phpX  ‡ÊÞcX  ÆW±T¤      4   .box/vendor/composer/semver/src/Constraint/Bound.phpn  ‡ÊÞcn  ¿·°:¤      B   .box/vendor/composer/semver/src/Constraint/ConstraintInterface.php¯  ‡ÊÞc¯  Eµö/¤      .   .box/vendor/composer/semver/src/Comparator.php•  ‡ÊÞc•  µ•Æ_¤      4   .box/vendor/composer/semver/src/CompilingMatcher.phpÉ  ‡ÊÞcÉ  0Îvi¤      ,   .box/vendor/composer/semver/src/Interval.phpÎ  ‡ÊÞcÎ  ­yû�¤      #   .box/vendor/composer/semver/LICENSE  ‡ÊÞc  Bhí¤      *   .box/vendor/composer/InstalledVersions.phpi  ‡ÊÞci  XmO¤      ,   .box/vendor/composer/autoload_namespaces.php‹   ‡ÊÞc‹   Š/t¤         .box/src/Terminal.php$  ‡ÊÞc$  ¡A)¤         .box/src/Printer.php§  ‡ÊÞc§  ¦a¤      "   .box/src/IsPhpVersionFulfilled.php  ‡ÊÞc  6‹K¤      "   .box/src/RequirementCollection.phpä  ‡ÊÞcä  oúÎ)¤         .box/src/Requirement.php¥  ‡ÊÞc¥  ˆD]ÿ¤         .box/src/IsFulfilled.php|   ‡ÊÞc|   '³‹î¤         .box/src/Checker.phpä  ‡ÊÞcä  Ù_Ð¤         .box/src/IO.phpk  ‡ÊÞck  *P10¤      !   .box/src/IsExtensionFulfilled.php¡  ‡ÊÞc¡  ý¹l|¤         .box/.requirements.phpú  ‡ÊÞcú  k'Bs¤         .box/bin/check-requirements.phpê  ‡ÊÞcê  nU1¾¤      <?php

// autoload.php @generated by Composer

if (PHP_VERSION_ID < 50600) {
    if (!headers_sent()) {
        header('HTTP/1.1 500 Internal Server Error');
    }
    $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
    if (!ini_get('display_errors')) {
        if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
            fwrite(STDERR, $err);
        } elseif (!headers_sent()) {
            echo $err;
        }
    }
    trigger_error(
        $err,
        E_USER_ERROR
    );
}

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit86f6c6e8e8b4139148022bbd8caa76e5::getLoader();
<?php

namespace Humbug\SelfUpdate\Strategy;

use function file_get_contents;
use Humbug\SelfUpdate\Exception\HttpRequestException;
use Humbug\SelfUpdate\Updater;

final class Sha512Strategy extends ShaStrategyAbstract
{






public function getCurrentRemoteVersion(Updater $updater)
{

set_error_handler([$updater, 'throwHttpRequestException']);
$version = file_get_contents($this->getVersionUrl());
restore_error_handler();
if (false === $version) {
throw new HttpRequestException(sprintf(
'Request to URL failed: %s',
$this->getVersionUrl()
));
}
if (empty($version)) {
throw new HttpRequestException(
'Version request returned empty response.'
);
}
if (! preg_match('%^[a-z0-9]{128}%', $version, $matches)) {
throw new HttpRequestException(
'Version request returned incorrectly formatted response.'
);
}

return $matches[0];
}







public function getCurrentLocalVersion(Updater $updater)
{
return hash_file('sha512', $updater->getLocalPharFile());
}
}
<?php










namespace Humbug\SelfUpdate\Strategy;

use Humbug\SelfUpdate\Updater;

interface StrategyInterface
{






public function download(Updater $updater);







public function getCurrentRemoteVersion(Updater $updater);







public function getCurrentLocalVersion(Updater $updater);
}
<?php










namespace Humbug\SelfUpdate\Strategy;

use function file_get_contents;
use Humbug\SelfUpdate\Exception\HttpRequestException;
use Humbug\SelfUpdate\Updater;

final class Sha256Strategy extends ShaStrategyAbstract
{






public function getCurrentRemoteVersion(Updater $updater)
{

set_error_handler([$updater, 'throwHttpRequestException']);
$version = file_get_contents($this->getVersionUrl());
restore_error_handler();
if (false === $version) {
throw new HttpRequestException(sprintf(
'Request to URL failed: %s',
$this->getVersionUrl()
));
}
if (empty($version)) {
throw new HttpRequestException(
'Version request returned empty response.'
);
}
if (! preg_match('%^[a-z0-9]{64}%', $version, $matches)) {
throw new HttpRequestException(
'Version request returned incorrectly formatted response.'
);
}

return $matches[0];
}







public function getCurrentLocalVersion(Updater $updater)
{
return hash_file('sha256', $updater->getLocalPharFile());
}
}
<?php










namespace Humbug\SelfUpdate\Strategy;

use function file_get_contents;
use Humbug\SelfUpdate\Exception\HttpRequestException;
use Humbug\SelfUpdate\Updater;




class ShaStrategy extends ShaStrategyAbstract
{






public function getCurrentRemoteVersion(Updater $updater)
{

set_error_handler([$updater, 'throwHttpRequestException']);
$version = file_get_contents($this->getVersionUrl());
restore_error_handler();
if (false === $version) {
throw new HttpRequestException(sprintf(
'Request to URL failed: %s',
$this->getVersionUrl()
));
}
if (empty($version)) {
throw new HttpRequestException(
'Version request returned empty response.'
);
}
if (! preg_match('%^[a-z0-9]{40}%', $version, $matches)) {
throw new HttpRequestException(
'Version request returned incorrectly formatted response.'
);
}

return $matches[0];
}







public function getCurrentLocalVersion(Updater $updater)
{
return sha1_file($updater->getLocalPharFile());
}
}
<?php










namespace Humbug\SelfUpdate\Strategy;

use function file_get_contents;
use Humbug\SelfUpdate\Exception\HttpRequestException;
use Humbug\SelfUpdate\Exception\InvalidArgumentException;
use Humbug\SelfUpdate\Updater;

abstract class ShaStrategyAbstract implements StrategyInterface
{

const SUPPORTED_SCHEMES = [
'http',
'https',
'file',
];




protected $versionUrl;




protected $pharUrl;







public function download(Updater $updater)
{

set_error_handler([$updater, 'throwHttpRequestException']);
$result = file_get_contents($this->getPharUrl());
restore_error_handler();
if (false === $result) {
throw new HttpRequestException(sprintf(
'Request to URL failed: %s',
$this->getPharUrl()
));
}

file_put_contents($updater->getTempPharFile(), $result);
}






public function setPharUrl($url)
{
if (! $this->validateAllowedUrl($url)) {
throw new InvalidArgumentException(
sprintf('Invalid url passed as argument: %s.', $url)
);
}
$this->pharUrl = $url;
}






public function getPharUrl()
{
return $this->pharUrl;
}






public function setVersionUrl($url)
{
if (! $this->validateAllowedUrl($url)) {
throw new InvalidArgumentException(
sprintf('Invalid url passed as argument: %s.', $url)
);
}
$this->versionUrl = $url;
}






public function getVersionUrl()
{
return $this->versionUrl;
}

protected function validateAllowedUrl($url)
{
return
filter_var($url, FILTER_VALIDATE_URL)
&& in_array(parse_url($url, PHP_URL_SCHEME), self::SUPPORTED_SCHEMES);
}
}
<?php










namespace Humbug\SelfUpdate\Strategy;

use function file_get_contents;
use Humbug\SelfUpdate\Exception\HttpRequestException;
use Humbug\SelfUpdate\Exception\InvalidArgumentException;
use Humbug\SelfUpdate\Exception\JsonParsingException;
use Humbug\SelfUpdate\Updater;
use Humbug\SelfUpdate\VersionParser;

class GithubStrategy implements StrategyInterface
{
const API_URL = 'https://packagist.org/p2/%s.json';

const STABLE = 'stable';

const UNSTABLE = 'unstable';

const ANY = 'any';




private $localVersion;




private $remoteVersion;




private $remoteUrl;




private $pharName;




private $packageName;




private $stability = self::STABLE;







public function download(Updater $updater)
{

set_error_handler([$updater, 'throwHttpRequestException']);
$result = file_get_contents($this->remoteUrl);
restore_error_handler();
if (false === $result) {
throw new HttpRequestException(sprintf(
'Request to URL failed: %s',
$this->remoteUrl
));
}

file_put_contents($updater->getTempPharFile(), $result);
}







public function getCurrentRemoteVersion(Updater $updater)
{

set_error_handler([$updater, 'throwHttpRequestException']);
$packageUrl = $this->getApiUrl();
$package = json_decode(file_get_contents($packageUrl), true);
restore_error_handler();

if (null === $package || json_last_error() !== JSON_ERROR_NONE) {
throw new JsonParsingException(
'Error parsing JSON package data'
.(function_exists('json_last_error_msg') ? ': '.json_last_error_msg() : '')
);
}

$versions = array_column($package['packages'][$this->getPackageName()], 'version');
$versionParser = new VersionParser($versions);
if ($this->getStability() === self::STABLE) {
$this->remoteVersion = $versionParser->getMostRecentStable();
} elseif ($this->getStability() === self::UNSTABLE) {
$this->remoteVersion = $versionParser->getMostRecentUnstable();
} else {
$this->remoteVersion = $versionParser->getMostRecentAll();
}




if (! empty($this->remoteVersion)) {
$chosenVersion = array_filter($package['packages'][$this->getPackageName()], function (array $package) {
return $package['version'] === $this->remoteVersion;
})[0];

$this->remoteUrl = $this->getDownloadUrl($chosenVersion);
}

return $this->remoteVersion;
}







public function getCurrentLocalVersion(Updater $updater)
{
return $this->localVersion;
}






public function setCurrentLocalVersion($version)
{
$this->localVersion = $version;
}






public function setPackageName($name)
{
$this->packageName = $name;
}






public function getPackageName()
{
return $this->packageName;
}






public function setPharName($name)
{
$this->pharName = $name;
}






public function getPharName()
{
return $this->pharName;
}






public function setStability($stability)
{
if ($stability !== self::STABLE && $stability !== self::UNSTABLE && $stability !== self::ANY) {
throw new InvalidArgumentException(
'Invalid stability value. Must be one of "stable", "unstable" or "any".'
);
}
$this->stability = $stability;
}






public function getStability()
{
return $this->stability;
}

protected function getApiUrl()
{
return sprintf(self::API_URL, $this->getPackageName());
}

/** @param array<mixed, mixed> $package */
protected function getDownloadUrl(array $package)
{
$baseUrl = preg_replace(
'{\.git$}',
'',
$package['source']['url']
);

return sprintf(
'%s/releases/download/%s/%s',
$baseUrl,
$this->remoteVersion,
$this->getPharName()
);
}
}
<?php








namespace Humbug\SelfUpdate\Exception;

interface ExceptionInterface
{
}
<?php








namespace Humbug\SelfUpdate\Exception;

class RuntimeException extends \RuntimeException implements ExceptionInterface
{
}
<?php








namespace Humbug\SelfUpdate\Exception;

class NoSignatureException extends RuntimeException
{
}
<?php








namespace Humbug\SelfUpdate\Exception;

class FilesystemException extends RuntimeException
{
}
<?php








namespace Humbug\SelfUpdate\Exception;

class HttpRequestException extends RuntimeException
{
}
<?php








namespace Humbug\SelfUpdate\Exception;

class JsonParsingException extends RuntimeException
{
}
<?php








namespace Humbug\SelfUpdate\Exception;

class InvalidArgumentException extends \RuntimeException implements ExceptionInterface
{
}
<?php










namespace Humbug\SelfUpdate;

class VersionParser
{



private $versions;




private $modifier = '[._-]?(?:(stable|beta|b|RC|alpha|a|patch|pl|p)(?:[.-]?(\d+))?)?([.-]?dev)?';

/**
     * @param array<mixed, string> $versions
     */
public function __construct(array $versions = [])
{
$this->versions = $versions;
}







public function getMostRecentStable()
{
return $this->selectRecentStable();
}







public function getMostRecentUnStable()
{
return $this->selectRecentUnstable();
}







public function getMostRecentAll()
{
return $this->selectRecentAll();
}







public function isStable($version)
{
return $this->stable($version);
}








public function isPreRelease($version)
{
return ! $this->stable($version) && ! $this->development($version);
}








public function isUnstable($version)
{
return ! $this->stable($version);
}







public function isDevelopment($version)
{
return $this->development($version);
}

private function selectRecentStable()
{
$candidates = [];
foreach ($this->versions as $version) {
if (! $this->stable($version)) {
continue;
}
$candidates[] = $version;
}
if (empty($candidates)) {
return false;
}

return $this->findMostRecent($candidates);
}

private function selectRecentUnstable()
{
$candidates = [];
foreach ($this->versions as $version) {
if ($this->stable($version) || $this->development($version)) {
continue;
}
$candidates[] = $version;
}
if (empty($candidates)) {
return false;
}

return $this->findMostRecent($candidates);
}

private function selectRecentAll()
{
$candidates = [];
foreach ($this->versions as $version) {
if ($this->development($version)) {
continue;
}
$candidates[] = $version;
}
if (empty($candidates)) {
return false;
}

return $this->findMostRecent($candidates);
}

/** @param array<mixed, string> $candidates */
private function findMostRecent(array $candidates)
{
$candidate = null;
$tracker = null;
foreach ($candidates as $version) {
if (version_compare($candidate, $version, '<')) {
$candidate = $version;
}
}

return $candidate;
}

private function stable($version)
{
$version = preg_replace('{#.+$}i', '', $version);
if ($this->development($version)) {
return false;
}
preg_match('{'.$this->modifier.'$}i', strtolower($version), $match);
if (! empty($match[3])) {
return false;
}
if (! empty($match[1])) {
if ('beta' === $match[1] || 'b' === $match[1]
|| 'alpha' === $match[1] || 'a' === $match[1]
|| 'rc' === $match[1]) {
return false;
}
}

return true;
}

private function development($version)
{
if ('dev-' === substr($version, 0, 4) || '-dev' === substr($version, -4)) {
return true;
}
if (1 == preg_match("/-\d+-[a-z0-9]{8,}$/", $version)) {
return true;
}

return false;
}
}
<?php










namespace Humbug\SelfUpdate;

use Humbug\SelfUpdate\Exception\FilesystemException;
use Humbug\SelfUpdate\Exception\HttpRequestException;
use Humbug\SelfUpdate\Exception\InvalidArgumentException;
use Humbug\SelfUpdate\Exception\NoSignatureException;
use Humbug\SelfUpdate\Exception\RuntimeException;
use Humbug\SelfUpdate\Strategy\GithubStrategy;
use Humbug\SelfUpdate\Strategy\Sha256Strategy;
use Humbug\SelfUpdate\Strategy\Sha512Strategy;
use Humbug\SelfUpdate\Strategy\ShaStrategy;
use Humbug\SelfUpdate\Strategy\ShaStrategyAbstract;
use Humbug\SelfUpdate\Strategy\StrategyInterface;

class Updater
{
const STRATEGY_SHA1 = 'sha1';

const STRATEGY_SHA256 = 'sha256';

const STRATEGY_SHA512 = 'sha512';

const STRATEGY_GITHUB = 'github';




protected $strategy;




protected $localPharFile;




protected $localPharFileBasename;




protected $localPubKeyFile;




protected $hasPubKey;




protected $tempDirectory;




protected $newVersion;




protected $oldVersion;




protected $backupExtension = '-old.phar';




protected $backupPath;




protected $restorePath;




protected $newVersionAvailable;








public function __construct($localPharFile = null, $hasPubKey = true, $strategy = self::STRATEGY_SHA1)
{
ini_set('phar.require_hash', '1');
$this->setLocalPharFile($localPharFile);
if (! is_bool($hasPubKey)) {
throw new InvalidArgumentException(
'Constructor parameter $hasPubKey must be boolean or null.'
);
} else {
$this->hasPubKey = $hasPubKey;
}
if ($this->hasPubKey) {
$this->setLocalPubKeyFile();
}
$this->setTempDirectory();
$this->setStrategy($strategy);
}






public function hasUpdate()
{
$this->newVersionAvailable = $this->newVersionAvailable();

return $this->newVersionAvailable;
}






public function update()
{
if ($this->newVersionAvailable === false
|| (! is_bool($this->newVersionAvailable) && ! $this->hasUpdate())) {
return false;
}
$this->backupPhar();
$this->downloadPhar();
$this->replacePhar();

return true;
}






public function rollback()
{
if (! $this->restorePhar()) {
return false;
}

return true;
}




public function setStrategy($strategy)
{
switch ($strategy) {
case self::STRATEGY_GITHUB:
$this->strategy = new GithubStrategy;
break;

case self::STRATEGY_SHA256:
$this->strategy = new Sha256Strategy;
break;

case self::STRATEGY_SHA512:
$this->strategy = new Sha512Strategy;
break;

default:
$this->strategy = new ShaStrategy;
break;
}
}

public function setStrategyObject(StrategyInterface $strategy)
{
$this->strategy = $strategy;
}

public function getStrategy()
{
return $this->strategy;
}






public function setBackupExtension($extension)
{
$this->backupExtension = $extension;
}






public function getBackupExtension()
{
return $this->backupExtension;
}

public function getLocalPharFile()
{
return $this->localPharFile;
}

public function getLocalPharFileBasename()
{
return $this->localPharFileBasename;
}

public function getLocalPubKeyFile()
{
return $this->localPubKeyFile;
}

public function getTempDirectory()
{
return $this->tempDirectory;
}

public function getTempPharFile()
{
return $this->getTempDirectory()
.'/'
.sprintf('%s.phar.temp', $this->getLocalPharFileBasename());
}

public function getNewVersion()
{
return $this->newVersion;
}

public function getOldVersion()
{
return $this->oldVersion;
}






public function setBackupPath($filePath)
{
$path = realpath(dirname($filePath));
if (! is_dir($path)) {
throw new FilesystemException(sprintf(
'The backup directory does not exist: %s.',
$path
));
}
if (! is_writable($path)) {
throw new FilesystemException(sprintf(
'The backup directory is not writeable: %s.',
$path
));
}
$this->backupPath = $filePath;
}






public function getBackupPath()
{
return $this->backupPath;
}






public function setRestorePath($filePath)
{
$path = realpath(dirname($filePath));
if (! file_exists($path)) {
throw new FilesystemException(sprintf(
'The restore phar does not exist: %s.',
$path
));
}
if (! is_readable($path)) {
throw new FilesystemException(sprintf(
'The restore file is not readable: %s.',
$path
));
}
$this->restorePath = $filePath;
}






public function getRestorePath()
{
return $this->restorePath;
}

public function throwRuntimeException($errno, $errstr)
{
if (E_USER_DEPRECATED === $errno) {
return;
}

throw new RuntimeException($errstr);
}

public function throwHttpRequestException($errno, $errstr)
{
if (E_USER_DEPRECATED === $errno) {
return;
}

throw new HttpRequestException($errstr);
}

protected function hasPubKey()
{
return $this->hasPubKey;
}

protected function newVersionAvailable()
{
$this->newVersion = $this->strategy->getCurrentRemoteVersion($this);
$this->oldVersion = $this->strategy->getCurrentLocalVersion($this);

if (! empty($this->newVersion) && ($this->newVersion !== $this->oldVersion)) {
return true;
}

return false;
}

protected function backupPhar()
{
$result = copy($this->getLocalPharFile(), $this->getBackupPharFile());
if ($result === false) {
$this->cleanupAfterError();
throw new FilesystemException(sprintf(
'Unable to backup %s to %s.',
$this->getLocalPharFile(),
$this->getBackupPharFile()
));
}
}

protected function downloadPhar()
{
$this->strategy->download($this);

if (! file_exists($this->getTempPharFile())) {
throw new FilesystemException(
'Creation of download file failed.'
);
}

$strategy = $this->getStrategy();

if ($strategy instanceof ShaStrategyAbstract) {
if ($strategy instanceof ShaStrategy) {
$tmpVersion = sha1_file($this->getTempPharFile());
$algo = 'SHA-1';
} elseif ($strategy instanceof Sha512Strategy) {
$tmpVersion = hash_file('sha512', $this->getTempPharFile());
$algo = 'SHA-512';
} else {
$tmpVersion = hash_file('sha256', $this->getTempPharFile());
$algo = 'SHA-256';
}

if ($tmpVersion !== $this->getNewVersion()) {
$this->cleanupAfterError();
throw new HttpRequestException(sprintf(
'Download file appears to be corrupted or outdated. The file '
.'received does not have the expected %s hash: %s.',
$algo,
$this->getNewVersion()
));
}
}

try {
$this->validatePhar($this->getTempPharFile());
} catch (\Exception $e) {
restore_error_handler();
$this->cleanupAfterError();
throw $e;
}
}

protected function replacePhar()
{
rename($this->getTempPharFile(), $this->getLocalPharFile());
}

protected function restorePhar()
{
$backup = $this->getRestorePharFile();
if (! file_exists($backup)) {
throw new RuntimeException(sprintf(
'The backup file does not exist: %s.',
$backup
));
}
$this->validatePhar($backup);

return rename($backup, $this->getLocalPharFile());
}

protected function getBackupPharFile()
{
if (null !== $this->getBackupPath()) {
return $this->getBackupPath();
}

return $this->getTempDirectory()
.'/'
.sprintf('%s%s', $this->getLocalPharFileBasename(), $this->getBackupExtension());
}

protected function getRestorePharFile()
{
if (null !== $this->getRestorePath()) {
return $this->getRestorePath();
}

return $this->getTempDirectory()
.'/'
.sprintf(
'%s%s',
$this->getLocalPharFileBasename(),
$this->getBackupExtension()
);
}

protected function getTempPubKeyFile()
{
return $this->getTempDirectory()
.'/'
.sprintf('%s.phar.temp.pubkey', $this->getLocalPharFileBasename());
}

protected function setLocalPharFile($localPharFile)
{
if (! is_null($localPharFile)) {
$localPharFile = realpath($localPharFile);
} else {
$localPharFile = realpath($_SERVER['argv'][0]) ?: $_SERVER['argv'][0];
}
if (! file_exists($localPharFile)) {
throw new RuntimeException(sprintf(
'The set phar file does not exist: %s.',
$localPharFile
));
}
if (! is_writable($localPharFile)) {
throw new FilesystemException(sprintf(
'The current phar file is not writeable and cannot be replaced: %s.',
$localPharFile
));
}
$this->localPharFile = $localPharFile;
$this->localPharFileBasename = basename($localPharFile, '.phar');
}

protected function setLocalPubKeyFile()
{
$localPubKeyFile = $this->getLocalPharFile().'.pubkey';
if (! file_exists($localPubKeyFile)) {
throw new RuntimeException(sprintf(
'The phar pubkey file does not exist: %s.',
$localPubKeyFile
));
}
$this->localPubKeyFile = $localPubKeyFile;
}

protected function setTempDirectory()
{
$tempDirectory = dirname($this->getLocalPharFile());
if (! is_writable($tempDirectory)) {
throw new FilesystemException(sprintf(
'The directory is not writeable: %s.',
$tempDirectory
));
}
$this->tempDirectory = $tempDirectory;
}

protected function validatePhar($phar)
{
$phar = realpath($phar);
if ($this->hasPubKey()) {
copy($this->getLocalPubKeyFile(), $phar.'.pubkey');
}
chmod($phar, fileperms($this->getLocalPharFile()));

set_error_handler([$this, 'throwRuntimeException']);
$phar = new \Phar($phar);
$signature = $phar->getSignature();
if ($this->hasPubKey() && strtolower($signature['hash_type']) !== 'openssl') {
throw new NoSignatureException(
'The downloaded phar file has no OpenSSL signature.'
);
}
restore_error_handler();
if ($this->hasPubKey()) {
@unlink($phar.'.pubkey');
}
unset($phar);
}

protected function cleanupAfterError()
{

@unlink($this->getTempPharFile());
@unlink($this->getTempPubKeyFile());
}
}
<?php

/*
 * This file is part of Composer.
 *
 * (c) Nils Adermann <naderman@naderman.de>
 *     Jordi Boggiano <j.boggiano@seld.be>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Composer\Autoload;

/**
 * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
 *
 *     $loader = new \Composer\Autoload\ClassLoader();
 *
 *     // register classes with namespaces
 *     $loader->add('Symfony\Component', __DIR__.'/component');
 *     $loader->add('Symfony',           __DIR__.'/framework');
 *
 *     // activate the autoloader
 *     $loader->register();
 *
 *     // to enable searching the include path (eg. for PEAR packages)
 *     $loader->setUseIncludePath(true);
 *
 * In this example, if you try to use a class in the Symfony\Component
 * namespace or one of its children (Symfony\Component\Console for instance),
 * the autoloader will first look for the class under the component/
 * directory, and it will then fallback to the framework/ directory if not
 * found before giving up.
 *
 * This class is loosely based on the Symfony UniversalClassLoader.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 * @author Jordi Boggiano <j.boggiano@seld.be>
 * @see    https://www.php-fig.org/psr/psr-0/
 * @see    https://www.php-fig.org/psr/psr-4/
 */
class ClassLoader
{
    /** @var \Closure(string):void */
    private static $includeFile;

    /** @var ?string */
    private $vendorDir;

    // PSR-4
    /**
     * @var array[]
     * @psalm-var array<string, array<string, int>>
     */
    private $prefixLengthsPsr4 = array();
    /**
     * @var array[]
     * @psalm-var array<string, array<int, string>>
     */
    private $prefixDirsPsr4 = array();
    /**
     * @var array[]
     * @psalm-var array<string, string>
     */
    private $fallbackDirsPsr4 = array();

    // PSR-0
    /**
     * @var array[]
     * @psalm-var array<string, array<string, string[]>>
     */
    private $prefixesPsr0 = array();
    /**
     * @var array[]
     * @psalm-var array<string, string>
     */
    private $fallbackDirsPsr0 = array();

    /** @var bool */
    private $useIncludePath = false;

    /**
     * @var string[]
     * @psalm-var array<string, string>
     */
    private $classMap = array();

    /** @var bool */
    private $classMapAuthoritative = false;

    /**
     * @var bool[]
     * @psalm-var array<string, bool>
     */
    private $missingClasses = array();

    /** @var ?string */
    private $apcuPrefix;

    /**
     * @var self[]
     */
    private static $registeredLoaders = array();

    /**
     * @param ?string $vendorDir
     */
    public function __construct($vendorDir = null)
    {
        $this->vendorDir = $vendorDir;
        self::initializeIncludeClosure();
    }

    /**
     * @return string[]
     */
    public function getPrefixes()
    {
        if (!empty($this->prefixesPsr0)) {
            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
        }

        return array();
    }

    /**
     * @return array[]
     * @psalm-return array<string, array<int, string>>
     */
    public function getPrefixesPsr4()
    {
        return $this->prefixDirsPsr4;
    }

    /**
     * @return array[]
     * @psalm-return array<string, string>
     */
    public function getFallbackDirs()
    {
        return $this->fallbackDirsPsr0;
    }

    /**
     * @return array[]
     * @psalm-return array<string, string>
     */
    public function getFallbackDirsPsr4()
    {
        return $this->fallbackDirsPsr4;
    }

    /**
     * @return string[] Array of classname => path
     * @psalm-return array<string, string>
     */
    public function getClassMap()
    {
        return $this->classMap;
    }

    /**
     * @param string[] $classMap Class to filename map
     * @psalm-param array<string, string> $classMap
     *
     * @return void
     */
    public function addClassMap(array $classMap)
    {
        if ($this->classMap) {
            $this->classMap = array_merge($this->classMap, $classMap);
        } else {
            $this->classMap = $classMap;
        }
    }

    /**
     * Registers a set of PSR-0 directories for a given prefix, either
     * appending or prepending to the ones previously set for this prefix.
     *
     * @param string          $prefix  The prefix
     * @param string[]|string $paths   The PSR-0 root directories
     * @param bool            $prepend Whether to prepend the directories
     *
     * @return void
     */
    public function add($prefix, $paths, $prepend = false)
    {
        if (!$prefix) {
            if ($prepend) {
                $this->fallbackDirsPsr0 = array_merge(
                    (array) $paths,
                    $this->fallbackDirsPsr0
                );
            } else {
                $this->fallbackDirsPsr0 = array_merge(
                    $this->fallbackDirsPsr0,
                    (array) $paths
                );
            }

            return;
        }

        $first = $prefix[0];
        if (!isset($this->prefixesPsr0[$first][$prefix])) {
            $this->prefixesPsr0[$first][$prefix] = (array) $paths;

            return;
        }
        if ($prepend) {
            $this->prefixesPsr0[$first][$prefix] = array_merge(
                (array) $paths,
                $this->prefixesPsr0[$first][$prefix]
            );
        } else {
            $this->prefixesPsr0[$first][$prefix] = array_merge(
                $this->prefixesPsr0[$first][$prefix],
                (array) $paths
            );
        }
    }

    /**
     * Registers a set of PSR-4 directories for a given namespace, either
     * appending or prepending to the ones previously set for this namespace.
     *
     * @param string          $prefix  The prefix/namespace, with trailing '\\'
     * @param string[]|string $paths   The PSR-4 base directories
     * @param bool            $prepend Whether to prepend the directories
     *
     * @throws \InvalidArgumentException
     *
     * @return void
     */
    public function addPsr4($prefix, $paths, $prepend = false)
    {
        if (!$prefix) {
            // Register directories for the root namespace.
            if ($prepend) {
                $this->fallbackDirsPsr4 = array_merge(
                    (array) $paths,
                    $this->fallbackDirsPsr4
                );
            } else {
                $this->fallbackDirsPsr4 = array_merge(
                    $this->fallbackDirsPsr4,
                    (array) $paths
                );
            }
        } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
            // Register directories for a new namespace.
            $length = strlen($prefix);
            if ('\\' !== $prefix[$length - 1]) {
                throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
            }
            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
            $this->prefixDirsPsr4[$prefix] = (array) $paths;
        } elseif ($prepend) {
            // Prepend directories for an already registered namespace.
            $this->prefixDirsPsr4[$prefix] = array_merge(
                (array) $paths,
                $this->prefixDirsPsr4[$prefix]
            );
        } else {
            // Append directories for an already registered namespace.
            $this->prefixDirsPsr4[$prefix] = array_merge(
                $this->prefixDirsPsr4[$prefix],
                (array) $paths
            );
        }
    }

    /**
     * Registers a set of PSR-0 directories for a given prefix,
     * replacing any others previously set for this prefix.
     *
     * @param string          $prefix The prefix
     * @param string[]|string $paths  The PSR-0 base directories
     *
     * @return void
     */
    public function set($prefix, $paths)
    {
        if (!$prefix) {
            $this->fallbackDirsPsr0 = (array) $paths;
        } else {
            $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
        }
    }

    /**
     * Registers a set of PSR-4 directories for a given namespace,
     * replacing any others previously set for this namespace.
     *
     * @param string          $prefix The prefix/namespace, with trailing '\\'
     * @param string[]|string $paths  The PSR-4 base directories
     *
     * @throws \InvalidArgumentException
     *
     * @return void
     */
    public function setPsr4($prefix, $paths)
    {
        if (!$prefix) {
            $this->fallbackDirsPsr4 = (array) $paths;
        } else {
            $length = strlen($prefix);
            if ('\\' !== $prefix[$length - 1]) {
                throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
            }
            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
            $this->prefixDirsPsr4[$prefix] = (array) $paths;
        }
    }

    /**
     * Turns on searching the include path for class files.
     *
     * @param bool $useIncludePath
     *
     * @return void
     */
    public function setUseIncludePath($useIncludePath)
    {
        $this->useIncludePath = $useIncludePath;
    }

    /**
     * Can be used to check if the autoloader uses the include path to check
     * for classes.
     *
     * @return bool
     */
    public function getUseIncludePath()
    {
        return $this->useIncludePath;
    }

    /**
     * Turns off searching the prefix and fallback directories for classes
     * that have not been registered with the class map.
     *
     * @param bool $classMapAuthoritative
     *
     * @return void
     */
    public function setClassMapAuthoritative($classMapAuthoritative)
    {
        $this->classMapAuthoritative = $classMapAuthoritative;
    }

    /**
     * Should class lookup fail if not found in the current class map?
     *
     * @return bool
     */
    public function isClassMapAuthoritative()
    {
        return $this->classMapAuthoritative;
    }

    /**
     * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
     *
     * @param string|null $apcuPrefix
     *
     * @return void
     */
    public function setApcuPrefix($apcuPrefix)
    {
        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
    }

    /**
     * The APCu prefix in use, or null if APCu caching is not enabled.
     *
     * @return string|null
     */
    public function getApcuPrefix()
    {
        return $this->apcuPrefix;
    }

    /**
     * Registers this instance as an autoloader.
     *
     * @param bool $prepend Whether to prepend the autoloader or not
     *
     * @return void
     */
    public function register($prepend = false)
    {
        spl_autoload_register(array($this, 'loadClass'), true, $prepend);

        if (null === $this->vendorDir) {
            return;
        }

        if ($prepend) {
            self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
        } else {
            unset(self::$registeredLoaders[$this->vendorDir]);
            self::$registeredLoaders[$this->vendorDir] = $this;
        }
    }

    /**
     * Unregisters this instance as an autoloader.
     *
     * @return void
     */
    public function unregister()
    {
        spl_autoload_unregister(array($this, 'loadClass'));

        if (null !== $this->vendorDir) {
            unset(self::$registeredLoaders[$this->vendorDir]);
        }
    }

    /**
     * Loads the given class or interface.
     *
     * @param  string    $class The name of the class
     * @return true|null True if loaded, null otherwise
     */
    public function loadClass($class)
    {
        if ($file = $this->findFile($class)) {
            $includeFile = self::$includeFile;
            $includeFile($file);

            return true;
        }

        return null;
    }

    /**
     * Finds the path to the file where the class is defined.
     *
     * @param string $class The name of the class
     *
     * @return string|false The path if found, false otherwise
     */
    public function findFile($class)
    {
        // class map lookup
        if (isset($this->classMap[$class])) {
            return $this->classMap[$class];
        }
        if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
            return false;
        }
        if (null !== $this->apcuPrefix) {
            $file = apcu_fetch($this->apcuPrefix.$class, $hit);
            if ($hit) {
                return $file;
            }
        }

        $file = $this->findFileWithExtension($class, '.php');

        // Search for Hack files if we are running on HHVM
        if (false === $file && defined('HHVM_VERSION')) {
            $file = $this->findFileWithExtension($class, '.hh');
        }

        if (null !== $this->apcuPrefix) {
            apcu_add($this->apcuPrefix.$class, $file);
        }

        if (false === $file) {
            // Remember that this class does not exist.
            $this->missingClasses[$class] = true;
        }

        return $file;
    }

    /**
     * Returns the currently registered loaders indexed by their corresponding vendor directories.
     *
     * @return self[]
     */
    public static function getRegisteredLoaders()
    {
        return self::$registeredLoaders;
    }

    /**
     * @param  string       $class
     * @param  string       $ext
     * @return string|false
     */
    private function findFileWithExtension($class, $ext)
    {
        // PSR-4 lookup
        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;

        $first = $class[0];
        if (isset($this->prefixLengthsPsr4[$first])) {
            $subPath = $class;
            while (false !== $lastPos = strrpos($subPath, '\\')) {
                $subPath = substr($subPath, 0, $lastPos);
                $search = $subPath . '\\';
                if (isset($this->prefixDirsPsr4[$search])) {
                    $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
                    foreach ($this->prefixDirsPsr4[$search] as $dir) {
                        if (file_exists($file = $dir . $pathEnd)) {
                            return $file;
                        }
                    }
                }
            }
        }

        // PSR-4 fallback dirs
        foreach ($this->fallbackDirsPsr4 as $dir) {
            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
                return $file;
            }
        }

        // PSR-0 lookup
        if (false !== $pos = strrpos($class, '\\')) {
            // namespaced class name
            $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
                . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
        } else {
            // PEAR-like class name
            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
        }

        if (isset($this->prefixesPsr0[$first])) {
            foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
                if (0 === strpos($class, $prefix)) {
                    foreach ($dirs as $dir) {
                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
                            return $file;
                        }
                    }
                }
            }
        }

        // PSR-0 fallback dirs
        foreach ($this->fallbackDirsPsr0 as $dir) {
            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
                return $file;
            }
        }

        // PSR-0 include paths.
        if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
            return $file;
        }

        return false;
    }

    /**
     * @return void
     */
    private static function initializeIncludeClosure()
    {
        if (self::$includeFile !== null) {
            return;
        }

        /**
         * Scope isolated include.
         *
         * Prevents access to $this/self from included files.
         *
         * @param  string $file
         * @return void
         */
        self::$includeFile = \Closure::bind(static function($file) {
            include $file;
        }, null, null);
    }
}
<?php

// autoload_classmap.php @generated by Composer

$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);

return array(
    'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
    'Composer\\XdebugHandler\\PhpConfig' => $vendorDir . '/composer/xdebug-handler/src/PhpConfig.php',
    'Composer\\XdebugHandler\\Process' => $vendorDir . '/composer/xdebug-handler/src/Process.php',
    'Composer\\XdebugHandler\\Status' => $vendorDir . '/composer/xdebug-handler/src/Status.php',
    'Composer\\XdebugHandler\\XdebugHandler' => $vendorDir . '/composer/xdebug-handler/src/XdebugHandler.php',
    'DrupalFinder\\DrupalFinder' => $vendorDir . '/webflo/drupal-finder/src/DrupalFinder.php',
    'Humbug\\SelfUpdate\\Exception\\ExceptionInterface' => $vendorDir . '/laravel-zero/phar-updater/src/Exception/ExceptionInterface.php',
    'Humbug\\SelfUpdate\\Exception\\FilesystemException' => $vendorDir . '/laravel-zero/phar-updater/src/Exception/FilesystemException.php',
    'Humbug\\SelfUpdate\\Exception\\HttpRequestException' => $vendorDir . '/laravel-zero/phar-updater/src/Exception/HttpRequestException.php',
    'Humbug\\SelfUpdate\\Exception\\InvalidArgumentException' => $vendorDir . '/laravel-zero/phar-updater/src/Exception/InvalidArgumentException.php',
    'Humbug\\SelfUpdate\\Exception\\JsonParsingException' => $vendorDir . '/laravel-zero/phar-updater/src/Exception/JsonParsingException.php',
    'Humbug\\SelfUpdate\\Exception\\NoSignatureException' => $vendorDir . '/laravel-zero/phar-updater/src/Exception/NoSignatureException.php',
    'Humbug\\SelfUpdate\\Exception\\RuntimeException' => $vendorDir . '/laravel-zero/phar-updater/src/Exception/RuntimeException.php',
    'Humbug\\SelfUpdate\\Strategy\\GithubStrategy' => $vendorDir . '/laravel-zero/phar-updater/src/Strategy/GithubStrategy.php',
    'Humbug\\SelfUpdate\\Strategy\\Sha256Strategy' => $vendorDir . '/laravel-zero/phar-updater/src/Strategy/Sha256Strategy.php',
    'Humbug\\SelfUpdate\\Strategy\\Sha512Strategy' => $vendorDir . '/laravel-zero/phar-updater/src/Strategy/Sha512Strategy.php',
    'Humbug\\SelfUpdate\\Strategy\\ShaStrategy' => $vendorDir . '/laravel-zero/phar-updater/src/Strategy/ShaStrategy.php',
    'Humbug\\SelfUpdate\\Strategy\\ShaStrategyAbstract' => $vendorDir . '/laravel-zero/phar-updater/src/Strategy/ShaStrategyAbstract.php',
    'Humbug\\SelfUpdate\\Strategy\\StrategyInterface' => $vendorDir . '/laravel-zero/phar-updater/src/Strategy/StrategyInterface.php',
    'Humbug\\SelfUpdate\\Updater' => $vendorDir . '/laravel-zero/phar-updater/src/Updater.php',
    'Humbug\\SelfUpdate\\VersionParser' => $vendorDir . '/laravel-zero/phar-updater/src/VersionParser.php',
    'Psr\\Log\\AbstractLogger' => $vendorDir . '/psr/log/Psr/Log/AbstractLogger.php',
    'Psr\\Log\\InvalidArgumentException' => $vendorDir . '/psr/log/Psr/Log/InvalidArgumentException.php',
    'Psr\\Log\\LogLevel' => $vendorDir . '/psr/log/Psr/Log/LogLevel.php',
    'Psr\\Log\\LoggerAwareInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareInterface.php',
    'Psr\\Log\\LoggerAwareTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerAwareTrait.php',
    'Psr\\Log\\LoggerInterface' => $vendorDir . '/psr/log/Psr/Log/LoggerInterface.php',
    'Psr\\Log\\LoggerTrait' => $vendorDir . '/psr/log/Psr/Log/LoggerTrait.php',
    'Psr\\Log\\NullLogger' => $vendorDir . '/psr/log/Psr/Log/NullLogger.php',
    'Psr\\Log\\Test\\DummyTest' => $vendorDir . '/psr/log/Psr/Log/Test/DummyTest.php',
    'Psr\\Log\\Test\\LoggerInterfaceTest' => $vendorDir . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
    'Psr\\Log\\Test\\TestLogger' => $vendorDir . '/psr/log/Psr/Log/Test/TestLogger.php',
    'Webmozart\\Assert\\Assert' => $vendorDir . '/webmozart/assert/src/Assert.php',
    'Webmozart\\Assert\\InvalidArgumentException' => $vendorDir . '/webmozart/assert/src/InvalidArgumentException.php',
    'Webmozart\\Assert\\Mixin' => $vendorDir . '/webmozart/assert/src/Mixin.php',
    'Webmozart\\PathUtil\\Path' => $vendorDir . '/webmozart/path-util/src/Path.php',
    'Webmozart\\PathUtil\\Url' => $vendorDir . '/webmozart/path-util/src/Url.php',
);
<?php return array(
'root' => array(
'name' => 'drush/drush-launcher',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '709d60f5abeaf12e847081e09da7dac8c7217c78',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev' => true,
),
'versions' => array(
'composer/xdebug-handler' => array(
'pretty_version' => '1.4.6',
'version' => '1.4.6.0',
'reference' => 'f27e06cd9675801df441b3656569b328e04aa37c',
'type' => 'library',
'install_path' => __DIR__ . '/./xdebug-handler',
'aliases' => array(),
'dev_requirement' => false,
),
'drush/drush-launcher' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'reference' => '709d60f5abeaf12e847081e09da7dac8c7217c78',
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'dev_requirement' => false,
),
'laravel-zero/phar-updater' => array(
'pretty_version' => 'v1.1.1',
'version' => '1.1.1.0',
'reference' => 'ac583f0983f91df9ca18c31ef6fd44dd51820495',
'type' => 'library',
'install_path' => __DIR__ . '/../laravel-zero/phar-updater',
'aliases' => array(),
'dev_requirement' => false,
),
'psr/log' => array(
'pretty_version' => '1.1.3',
'version' => '1.1.3.0',
'reference' => '0f73288fd15629204f9d42b7055f72dacbe811fc',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/log',
'aliases' => array(),
'dev_requirement' => false,
),
'webflo/drupal-finder' => array(
'pretty_version' => '1.2.2',
'version' => '1.2.2.0',
'reference' => 'c8e5dbe65caef285fec8057a4c718a0d4138d1ee',
'type' => 'library',
'install_path' => __DIR__ . '/../webflo/drupal-finder',
'aliases' => array(),
'dev_requirement' => false,
),
'webmozart/assert' => array(
'pretty_version' => '1.11.0',
'version' => '1.11.0.0',
'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991',
'type' => 'library',
'install_path' => __DIR__ . '/../webmozart/assert',
'aliases' => array(),
'dev_requirement' => false,
),
'webmozart/path-util' => array(
'pretty_version' => '2.3.0',
'version' => '2.3.0.0',
'reference' => 'd939f7edc24c9a1bb9c0dee5cb05d8e859490725',
'type' => 'library',
'install_path' => __DIR__ . '/../webmozart/path-util',
'aliases' => array(),
'dev_requirement' => false,
),
),
);
<?php

// autoload_static.php @generated by Composer

namespace Composer\Autoload;

class ComposerStaticInit86f6c6e8e8b4139148022bbd8caa76e5
{
    public static $prefixLengthsPsr4 = array (
        'W' => 
        array (
            'Webmozart\\PathUtil\\' => 19,
            'Webmozart\\Assert\\' => 17,
        ),
        'P' => 
        array (
            'Psr\\Log\\' => 8,
        ),
        'H' => 
        array (
            'Humbug\\SelfUpdate\\' => 18,
        ),
        'C' => 
        array (
            'Composer\\XdebugHandler\\' => 23,
        ),
    );

    public static $prefixDirsPsr4 = array (
        'Webmozart\\PathUtil\\' => 
        array (
            0 => __DIR__ . '/..' . '/webmozart/path-util/src',
        ),
        'Webmozart\\Assert\\' => 
        array (
            0 => __DIR__ . '/..' . '/webmozart/assert/src',
        ),
        'Psr\\Log\\' => 
        array (
            0 => __DIR__ . '/..' . '/psr/log/Psr/Log',
        ),
        'Humbug\\SelfUpdate\\' => 
        array (
            0 => __DIR__ . '/..' . '/laravel-zero/phar-updater/src',
        ),
        'Composer\\XdebugHandler\\' => 
        array (
            0 => __DIR__ . '/..' . '/composer/xdebug-handler/src',
        ),
    );

    public static $classMap = array (
        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
        'Composer\\XdebugHandler\\PhpConfig' => __DIR__ . '/..' . '/composer/xdebug-handler/src/PhpConfig.php',
        'Composer\\XdebugHandler\\Process' => __DIR__ . '/..' . '/composer/xdebug-handler/src/Process.php',
        'Composer\\XdebugHandler\\Status' => __DIR__ . '/..' . '/composer/xdebug-handler/src/Status.php',
        'Composer\\XdebugHandler\\XdebugHandler' => __DIR__ . '/..' . '/composer/xdebug-handler/src/XdebugHandler.php',
        'DrupalFinder\\DrupalFinder' => __DIR__ . '/..' . '/webflo/drupal-finder/src/DrupalFinder.php',
        'Humbug\\SelfUpdate\\Exception\\ExceptionInterface' => __DIR__ . '/..' . '/laravel-zero/phar-updater/src/Exception/ExceptionInterface.php',
        'Humbug\\SelfUpdate\\Exception\\FilesystemException' => __DIR__ . '/..' . '/laravel-zero/phar-updater/src/Exception/FilesystemException.php',
        'Humbug\\SelfUpdate\\Exception\\HttpRequestException' => __DIR__ . '/..' . '/laravel-zero/phar-updater/src/Exception/HttpRequestException.php',
        'Humbug\\SelfUpdate\\Exception\\InvalidArgumentException' => __DIR__ . '/..' . '/laravel-zero/phar-updater/src/Exception/InvalidArgumentException.php',
        'Humbug\\SelfUpdate\\Exception\\JsonParsingException' => __DIR__ . '/..' . '/laravel-zero/phar-updater/src/Exception/JsonParsingException.php',
        'Humbug\\SelfUpdate\\Exception\\NoSignatureException' => __DIR__ . '/..' . '/laravel-zero/phar-updater/src/Exception/NoSignatureException.php',
        'Humbug\\SelfUpdate\\Exception\\RuntimeException' => __DIR__ . '/..' . '/laravel-zero/phar-updater/src/Exception/RuntimeException.php',
        'Humbug\\SelfUpdate\\Strategy\\GithubStrategy' => __DIR__ . '/..' . '/laravel-zero/phar-updater/src/Strategy/GithubStrategy.php',
        'Humbug\\SelfUpdate\\Strategy\\Sha256Strategy' => __DIR__ . '/..' . '/laravel-zero/phar-updater/src/Strategy/Sha256Strategy.php',
        'Humbug\\SelfUpdate\\Strategy\\Sha512Strategy' => __DIR__ . '/..' . '/laravel-zero/phar-updater/src/Strategy/Sha512Strategy.php',
        'Humbug\\SelfUpdate\\Strategy\\ShaStrategy' => __DIR__ . '/..' . '/laravel-zero/phar-updater/src/Strategy/ShaStrategy.php',
        'Humbug\\SelfUpdate\\Strategy\\ShaStrategyAbstract' => __DIR__ . '/..' . '/laravel-zero/phar-updater/src/Strategy/ShaStrategyAbstract.php',
        'Humbug\\SelfUpdate\\Strategy\\StrategyInterface' => __DIR__ . '/..' . '/laravel-zero/phar-updater/src/Strategy/StrategyInterface.php',
        'Humbug\\SelfUpdate\\Updater' => __DIR__ . '/..' . '/laravel-zero/phar-updater/src/Updater.php',
        'Humbug\\SelfUpdate\\VersionParser' => __DIR__ . '/..' . '/laravel-zero/phar-updater/src/VersionParser.php',
        'Psr\\Log\\AbstractLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/AbstractLogger.php',
        'Psr\\Log\\InvalidArgumentException' => __DIR__ . '/..' . '/psr/log/Psr/Log/InvalidArgumentException.php',
        'Psr\\Log\\LogLevel' => __DIR__ . '/..' . '/psr/log/Psr/Log/LogLevel.php',
        'Psr\\Log\\LoggerAwareInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerAwareInterface.php',
        'Psr\\Log\\LoggerAwareTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerAwareTrait.php',
        'Psr\\Log\\LoggerInterface' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerInterface.php',
        'Psr\\Log\\LoggerTrait' => __DIR__ . '/..' . '/psr/log/Psr/Log/LoggerTrait.php',
        'Psr\\Log\\NullLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/NullLogger.php',
        'Psr\\Log\\Test\\DummyTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/DummyTest.php',
        'Psr\\Log\\Test\\LoggerInterfaceTest' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/LoggerInterfaceTest.php',
        'Psr\\Log\\Test\\TestLogger' => __DIR__ . '/..' . '/psr/log/Psr/Log/Test/TestLogger.php',
        'Webmozart\\Assert\\Assert' => __DIR__ . '/..' . '/webmozart/assert/src/Assert.php',
        'Webmozart\\Assert\\InvalidArgumentException' => __DIR__ . '/..' . '/webmozart/assert/src/InvalidArgumentException.php',
        'Webmozart\\Assert\\Mixin' => __DIR__ . '/..' . '/webmozart/assert/src/Mixin.php',
        'Webmozart\\PathUtil\\Path' => __DIR__ . '/..' . '/webmozart/path-util/src/Path.php',
        'Webmozart\\PathUtil\\Url' => __DIR__ . '/..' . '/webmozart/path-util/src/Url.php',
    );

    public static function getInitializer(ClassLoader $loader)
    {
        return \Closure::bind(function () use ($loader) {
            $loader->prefixLengthsPsr4 = ComposerStaticInit86f6c6e8e8b4139148022bbd8caa76e5::$prefixLengthsPsr4;
            $loader->prefixDirsPsr4 = ComposerStaticInit86f6c6e8e8b4139148022bbd8caa76e5::$prefixDirsPsr4;
            $loader->classMap = ComposerStaticInit86f6c6e8e8b4139148022bbd8caa76e5::$classMap;

        }, null, ClassLoader::class);
    }
}
<?php

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit86f6c6e8e8b4139148022bbd8caa76e5
{
    private static $loader;

    public static function loadClassLoader($class)
    {
        if ('Composer\Autoload\ClassLoader' === $class) {
            require __DIR__ . '/ClassLoader.php';
        }
    }

    /**
     * @return \Composer\Autoload\ClassLoader
     */
    public static function getLoader()
    {
        if (null !== self::$loader) {
            return self::$loader;
        }

        require __DIR__ . '/platform_check.php';

        spl_autoload_register(array('ComposerAutoloaderInit86f6c6e8e8b4139148022bbd8caa76e5', 'loadClassLoader'), true, true);
        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
        spl_autoload_unregister(array('ComposerAutoloaderInit86f6c6e8e8b4139148022bbd8caa76e5', 'loadClassLoader'));

        require __DIR__ . '/autoload_static.php';
        call_user_func(\Composer\Autoload\ComposerStaticInit86f6c6e8e8b4139148022bbd8caa76e5::getInitializer($loader));

        $loader->setClassMapAuthoritative(true);
        $loader->register(true);

        return $loader;
    }
}
<?php










namespace Composer\XdebugHandler;

use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;





class Status
{
const ENV_RESTART = 'XDEBUG_HANDLER_RESTART';
const CHECK = 'Check';
const ERROR = 'Error';
const INFO = 'Info';
const NORESTART = 'NoRestart';
const RESTART = 'Restart';
const RESTARTING = 'Restarting';
const RESTARTED = 'Restarted';

private $debug;
private $envAllowXdebug;
private $loaded;
private $logger;
private $time;







public function __construct($envAllowXdebug, $debug)
{
$start = getenv(self::ENV_RESTART);
Process::setEnv(self::ENV_RESTART);
$this->time = $start ? round((microtime(true) - $start) * 1000) : 0;

$this->envAllowXdebug = $envAllowXdebug;
$this->debug = $debug && defined('STDERR');
}




public function setLogger(LoggerInterface $logger)
{
$this->logger = $logger;
}







public function report($op, $data)
{
if ($this->logger || $this->debug) {
call_user_func(array($this, 'report'.$op), $data);
}
}







private function output($text, $level = null)
{
if ($this->logger) {
$this->logger->log($level ?: LogLevel::DEBUG, $text);
}

if ($this->debug) {
fwrite(STDERR, sprintf('xdebug-handler[%d] %s', getmypid(), $text.PHP_EOL));
}
}

private function reportCheck($loaded)
{
$this->loaded = $loaded;
$this->output('Checking '.$this->envAllowXdebug);
}

private function reportError($error)
{
$this->output(sprintf('No restart (%s)', $error), LogLevel::WARNING);
}

private function reportInfo($info)
{
$this->output($info);
}

private function reportNoRestart()
{
$this->output($this->getLoadedMessage());

if ($this->loaded) {
$text = sprintf('No restart (%s)', $this->getEnvAllow());
if (!getenv($this->envAllowXdebug)) {
$text .= ' Allowed by application';
}
$this->output($text);
}
}

private function reportRestart()
{
$this->output($this->getLoadedMessage());
Process::setEnv(self::ENV_RESTART, (string) microtime(true));
}

private function reportRestarted()
{
$loaded = $this->getLoadedMessage();
$text = sprintf('Restarted (%d ms). %s', $this->time, $loaded);
$level = $this->loaded ? LogLevel::WARNING : null;
$this->output($text, $level);
}

private function reportRestarting($command)
{
$text = sprintf('Process restarting (%s)', $this->getEnvAllow());
$this->output($text);
$text = 'Running '.$command;
$this->output($text);
}






private function getEnvAllow()
{
return $this->envAllowXdebug.'='.getenv($this->envAllowXdebug);
}






private function getLoadedMessage()
{
$loaded = $this->loaded ? sprintf('loaded (%s)', $this->loaded) : 'not loaded';
return 'The Xdebug extension is '.$loaded;
}
}
<?php










namespace Composer\XdebugHandler;








class Process
{










public static function addColorOption(array $args, $colorOption)
{
if (!$colorOption
|| in_array($colorOption, $args)
|| !preg_match('/^--([a-z]+$)|(^--[a-z]+=)/', $colorOption, $matches)) {
return $args;
}

if (isset($matches[2])) {

if (false !== ($index = array_search($matches[2].'auto', $args))) {
$args[$index] = $colorOption;
return $args;
} elseif (preg_grep('/^'.$matches[2].'/', $args)) {
return $args;
}
} elseif (in_array('--no-'.$matches[1], $args)) {
return $args;
}


if (false !== getenv('NO_COLOR')) {
return $args;
}

if (false !== ($index = array_search('--', $args))) {

array_splice($args, $index, 0, $colorOption);
} else {
$args[] = $colorOption;
}

return $args;
}













public static function escape($arg, $meta = true, $module = false)
{
if (!defined('PHP_WINDOWS_VERSION_BUILD')) {
return "'".str_replace("'", "'\\''", $arg)."'";
}

$quote = strpbrk($arg, " \t") !== false || $arg === '';

$arg = preg_replace('/(\\\\*)"/', '$1$1\\"', $arg, -1, $dquotes);

if ($meta) {
$meta = $dquotes || preg_match('/%[^%]+%/', $arg);

if (!$meta) {
$quote = $quote || strpbrk($arg, '^&|<>()') !== false;
} elseif ($module && !$dquotes && $quote) {
$meta = false;
}
}

if ($quote) {
$arg = '"'.preg_replace('/(\\\\*)$/', '$1$1', $arg).'"';
}

if ($meta) {
$arg = preg_replace('/(["^&|<>()%])/', '^$1', $arg);
}

return $arg;
}











public static function supportsColor($output)
{
if ('Hyper' === getenv('TERM_PROGRAM')) {
return true;
}

if (defined('PHP_WINDOWS_VERSION_BUILD')) {
return (function_exists('sapi_windows_vt100_support')
&& sapi_windows_vt100_support($output))
|| false !== getenv('ANSICON')
|| 'ON' === getenv('ConEmuANSI')
|| 'xterm' === getenv('TERM');
}

if (function_exists('stream_isatty')) {
return stream_isatty($output);
}

if (function_exists('posix_isatty')) {
return posix_isatty($output);
}

$stat = fstat($output);

return $stat ? 0020000 === ($stat['mode'] & 0170000) : false;
}









public static function setEnv($name, $value = false)
{
$unset = false === $value;

if (!putenv($unset ? $name : $name.'='.$value)) {
return false;
}

if ($unset) {
unset($_SERVER[$name]);
} else {
$_SERVER[$name] = $value;
}


if (false !== stripos((string) ini_get('variables_order'), 'E')) {
if ($unset) {
unset($_ENV[$name]);
} else {
$_ENV[$name] = $value;
}
}

return true;
}
}
<?php










namespace Composer\XdebugHandler;




class PhpConfig
{





public function useOriginal()
{
$this->getDataAndReset();
return array();
}






public function useStandard()
{
if ($data = $this->getDataAndReset()) {
return array('-n', '-c', $data['tmpIni']);
}

return array();
}






public function usePersistent()
{
if ($data = $this->getDataAndReset()) {
Process::setEnv('PHPRC', $data['tmpIni']);
Process::setEnv('PHP_INI_SCAN_DIR', '');
}

return array();
}






private function getDataAndReset()
{
if ($data = XdebugHandler::getRestartSettings()) {
Process::setEnv('PHPRC', $data['phprc']);
Process::setEnv('PHP_INI_SCAN_DIR', $data['scanDir']);
}

return $data;
}
}
<?php










namespace Composer\XdebugHandler;

use Psr\Log\LoggerInterface;




class XdebugHandler
{
const SUFFIX_ALLOW = '_ALLOW_XDEBUG';
const SUFFIX_INIS = '_ORIGINAL_INIS';
const RESTART_ID = 'internal';
const RESTART_SETTINGS = 'XDEBUG_HANDLER_SETTINGS';
const DEBUG = 'XDEBUG_HANDLER_DEBUG';


protected $tmpIni;

private static $inRestart;
private static $name;
private static $skipped;

private $cli;
private $colorOption;
private $debug;
private $envAllowXdebug;
private $envOriginalInis;
private $loaded;
private $persistent;
private $script;

private $statusWriter;












public function __construct($envPrefix, $colorOption = '')
{
if (!is_string($envPrefix) || empty($envPrefix) || !is_string($colorOption)) {
throw new \RuntimeException('Invalid constructor parameter');
}

self::$name = strtoupper($envPrefix);
$this->envAllowXdebug = self::$name.self::SUFFIX_ALLOW;
$this->envOriginalInis = self::$name.self::SUFFIX_INIS;

$this->colorOption = $colorOption;

if (extension_loaded('xdebug')) {
$ext = new \ReflectionExtension('xdebug');
$this->loaded = $ext->getVersion() ?: 'unknown';
}

if ($this->cli = PHP_SAPI === 'cli') {
$this->debug = getenv(self::DEBUG);
}

$this->statusWriter = new Status($this->envAllowXdebug, (bool) $this->debug);
}








public function setLogger(LoggerInterface $logger)
{
$this->statusWriter->setLogger($logger);
return $this;
}








public function setMainScript($script)
{
$this->script = $script;
return $this;
}






public function setPersistent()
{
$this->persistent = true;
return $this;
}








public function check()
{
$this->notify(Status::CHECK, $this->loaded);
$envArgs = explode('|', (string) getenv($this->envAllowXdebug));

if (empty($envArgs[0]) && $this->requiresRestart((bool) $this->loaded)) {

$this->notify(Status::RESTART);

if ($this->prepareRestart()) {
$command = $this->getCommand();
$this->restart($command);
}
return;
}

if (self::RESTART_ID === $envArgs[0] && count($envArgs) === 5) {

$this->notify(Status::RESTARTED);

Process::setEnv($this->envAllowXdebug);
self::$inRestart = true;

if (!$this->loaded) {

self::$skipped = $envArgs[1];
}

$this->tryEnableSignals();


$this->setEnvRestartSettings($envArgs);
return;
}

$this->notify(Status::NORESTART);

if ($settings = self::getRestartSettings()) {

$this->syncSettings($settings);
}
}









public static function getAllIniFiles()
{
if (!empty(self::$name)) {
$env = getenv(self::$name.self::SUFFIX_INIS);

if (false !== $env) {
return explode(PATH_SEPARATOR, $env);
}
}

$paths = array((string) php_ini_loaded_file());

if ($scanned = php_ini_scanned_files()) {
$paths = array_merge($paths, array_map('trim', explode(',', $scanned)));
}

return $paths;
}









public static function getRestartSettings()
{
$envArgs = explode('|', (string) getenv(self::RESTART_SETTINGS));

if (count($envArgs) !== 6
|| (!self::$inRestart && php_ini_loaded_file() !== $envArgs[0])) {
return null;
}

return array(
'tmpIni' => $envArgs[0],
'scannedInis' => (bool) $envArgs[1],
'scanDir' => '*' === $envArgs[2] ? false : $envArgs[2],
'phprc' => '*' === $envArgs[3] ? false : $envArgs[3],
'inis' => explode(PATH_SEPARATOR, $envArgs[4]),
'skipped' => $envArgs[5],
);
}






public static function getSkippedVersion()
{
return (string) self::$skipped;
}








protected function requiresRestart($isLoaded)
{
return $isLoaded;
}






protected function restart($command)
{
$this->doRestart($command);
}






private function doRestart($command)
{
$this->tryEnableSignals();
$this->notify(Status::RESTARTING, $command);


if (function_exists('proc_open')) {
if (defined('PHP_WINDOWS_VERSION_BUILD') && PHP_VERSION_ID < 80000) {
$command = '"'.$command.'"';
}
$process = proc_open($command, array(), $pipes);
if (is_resource($process)) {
$exitCode = proc_close($process);
}
} else {
passthru($command, $exitCode);
}

if (!isset($exitCode)) {

$this->notify(Status::ERROR, 'Unable to restart process');
$exitCode = -1;
} else {
$this->notify(Status::INFO, 'Restarted process exited '.$exitCode);
}

if ($this->debug === '2') {
$this->notify(Status::INFO, 'Temp ini saved: '.$this->tmpIni);
} else {
@unlink($this->tmpIni);
}

exit($exitCode);
}











private function prepareRestart()
{
$error = '';
$iniFiles = self::getAllIniFiles();
$scannedInis = count($iniFiles) > 1;
$tmpDir = sys_get_temp_dir();

if (!$this->cli) {
$error = 'Unsupported SAPI: '.PHP_SAPI;
} elseif (!defined('PHP_BINARY')) {
$error = 'PHP version is too old: '.PHP_VERSION;
} elseif (!$this->checkConfiguration($info)) {
$error = $info;
} elseif (!$this->checkScanDirConfig()) {
$error = 'PHP version does not report scanned inis: '.PHP_VERSION;
} elseif (!$this->checkMainScript()) {
$error = 'Unable to access main script: '.$this->script;
} elseif (!$this->writeTmpIni($iniFiles, $tmpDir, $error)) {
$error = $error ?: 'Unable to create temp ini file at: '.$tmpDir;
} elseif (!$this->setEnvironment($scannedInis, $iniFiles)) {
$error = 'Unable to set environment variables';
}

if ($error) {
$this->notify(Status::ERROR, $error);
}

return empty($error);
}










private function writeTmpIni(array $iniFiles, $tmpDir, &$error)
{
if (!$this->tmpIni = @tempnam($tmpDir, '')) {
return false;
}


if (empty($iniFiles[0])) {
array_shift($iniFiles);
}

$content = '';
$regex = '/^\s*(zend_extension\s*=.*xdebug.*)$/mi';

foreach ($iniFiles as $file) {

if (($data = @file_get_contents($file)) === false) {
$error = 'Unable to read ini: '.$file;
return false;
}
$content .= preg_replace($regex, ';$1', $data).PHP_EOL;
}


if ($config = parse_ini_string($content)) {
$loaded = ini_get_all(null, false);
$content .= $this->mergeLoadedConfig($loaded, $config);
}


$content .= 'opcache.enable_cli=0'.PHP_EOL;

return @file_put_contents($this->tmpIni, $content);
}






private function getCommand()
{
$php = array(PHP_BINARY);
$args = array_slice($_SERVER['argv'], 1);

if (!$this->persistent) {

array_push($php, '-n', '-c', $this->tmpIni);
}

if (defined('STDOUT') && Process::supportsColor(STDOUT)) {
$args = Process::addColorOption($args, $this->colorOption);
}

$args = array_merge($php, array($this->script), $args);

$cmd = Process::escape(array_shift($args), true, true);
foreach ($args as $arg) {
$cmd .= ' '.Process::escape($arg);
}

return $cmd;
}











private function setEnvironment($scannedInis, array $iniFiles)
{
$scanDir = getenv('PHP_INI_SCAN_DIR');
$phprc = getenv('PHPRC');


if (!putenv($this->envOriginalInis.'='.implode(PATH_SEPARATOR, $iniFiles))) {
return false;
}

if ($this->persistent) {

if (!putenv('PHP_INI_SCAN_DIR=') || !putenv('PHPRC='.$this->tmpIni)) {
return false;
}
}


$envArgs = array(
self::RESTART_ID,
$this->loaded,
(int) $scannedInis,
false === $scanDir ? '*' : $scanDir,
false === $phprc ? '*' : $phprc,
);

return putenv($this->envAllowXdebug.'='.implode('|', $envArgs));
}







private function notify($op, $data = null)
{
$this->statusWriter->report($op, $data);
}









private function mergeLoadedConfig(array $loadedConfig, array $iniConfig)
{
$content = '';

foreach ($loadedConfig as $name => $value) {

if (!is_string($value)
|| strpos($name, 'xdebug') === 0
|| $name === 'apc.mmap_file_mask') {
continue;
}

if (!isset($iniConfig[$name]) || $iniConfig[$name] !== $value) {

$content .= $name.'="'.addcslashes($value, '\\"').'"'.PHP_EOL;
}
}

return $content;
}






private function checkMainScript()
{
if (null !== $this->script) {

return file_exists($this->script) || '--' === $this->script;
}

if (file_exists($this->script = $_SERVER['argv'][0])) {
return true;
}


$options = PHP_VERSION_ID >= 50306 ? DEBUG_BACKTRACE_IGNORE_ARGS : false;
$trace = debug_backtrace($options);

if (($main = end($trace)) && isset($main['file'])) {
return file_exists($this->script = $main['file']);
}

return false;
}






private function setEnvRestartSettings($envArgs)
{
$settings = array(
php_ini_loaded_file(),
$envArgs[2],
$envArgs[3],
$envArgs[4],
getenv($this->envOriginalInis),
self::$skipped,
);

Process::setEnv(self::RESTART_SETTINGS, implode('|', $settings));
}






private function syncSettings(array $settings)
{
if (false === getenv($this->envOriginalInis)) {

Process::setEnv($this->envOriginalInis, implode(PATH_SEPARATOR, $settings['inis']));
}

self::$skipped = $settings['skipped'];
$this->notify(Status::INFO, 'Process called with existing restart settings');
}









private function checkScanDirConfig()
{
return !(getenv('PHP_INI_SCAN_DIR')
&& !PHP_CONFIG_FILE_SCAN_DIR
&& (PHP_VERSION_ID < 70113
|| PHP_VERSION_ID === 70200));
}







private function checkConfiguration(&$info)
{
if (!function_exists('proc_open') && !function_exists('passthru')) {
$info = 'execution functions have been disabled (proc_open or passthru required)';
return false;
}

if (extension_loaded('uopz') && !ini_get('uopz.disable')) {

if (function_exists('uopz_allow_exit')) {
@uopz_allow_exit(true);
} else {
$info = 'uopz extension is not compatible';
return false;
}
}

return true;
}






private function tryEnableSignals()
{
if (function_exists('pcntl_async_signals') && function_exists('pcntl_signal')) {
pcntl_async_signals(true);
$message = 'Async signals enabled';

if (!self::$inRestart) {

pcntl_signal(SIGINT, SIG_IGN);
$message .= ' (SIGINT = SIG_IGN)';
} elseif (is_int(pcntl_signal_get_handler(SIGINT))) {

pcntl_signal(SIGINT, SIG_DFL);
$message .= ' (SIGINT = SIG_DFL)';
}
$this->notify(Status::INFO, $message);
}

if (!self::$inRestart && function_exists('sapi_windows_set_ctrl_handler')) {



sapi_windows_set_ctrl_handler(function ($evt) {});
$this->notify(Status::INFO, 'CTRL signals suppressed');
}
}
}

Copyright (c) Nils Adermann, Jordi Boggiano

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

<?php

// autoload_psr4.php @generated by Composer

$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);

return array(
    'Webmozart\\PathUtil\\' => array($vendorDir . '/webmozart/path-util/src'),
    'Webmozart\\Assert\\' => array($vendorDir . '/webmozart/assert/src'),
    'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'),
    'Humbug\\SelfUpdate\\' => array($vendorDir . '/laravel-zero/phar-updater/src'),
    'Composer\\XdebugHandler\\' => array($vendorDir . '/composer/xdebug-handler/src'),
);
<?php











namespace Composer;

use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser;










class InstalledVersions
{
/**
@psalm-var

*/
private static $installed;




private static $canGetVendors;

/**
@psalm-var

*/
private static $installedByVendor = array();

/**
@psalm-return



*/
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}

if (1 === \count($packages)) {
return $packages[0];
}

return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}

/**
@psalm-return




*/
public static function getInstalledPackagesByType($type)
{
$packagesByType = array();

foreach (self::getInstalled() as $installed) {
foreach ($installed['versions'] as $name => $package) {
if (isset($package['type']) && $package['type'] === $type) {
$packagesByType[] = $name;
}
}
}

return $packagesByType;
}










public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
}
}

return false;
}













public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));

return $provided->matches($constraint);
}










public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}

$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}

return implode(' || ', $ranges);
}

throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}





public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}

if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}

return $installed['versions'][$packageName]['version'];
}

throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}





public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}

if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}

return $installed['versions'][$packageName]['pretty_version'];
}

throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}





public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}

if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}

return $installed['versions'][$packageName]['reference'];
}

throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}





public static function getInstallPath($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}

return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
}

throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}

/**
@psalm-return

*/
public static function getRootPackage()
{
$installed = self::getInstalled();

return $installed[0]['root'];
}

/**
@psalm-return




*/
public static function getRawData()
{
@trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);

if (null === self::$installed) {


if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}

return self::$installed;
}

/**
@psalm-return



*/
public static function getAllRawData()
{
return self::getInstalled();
}

/**
@psalm-param















*/
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
}

/**
@psalm-return

*/
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}

$installed = array();

if (self::$canGetVendors) {
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
}
}
}

if (null === self::$installed) {


if (substr(__DIR__, -8, 1) !== 'C') {
self::$installed = require __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
$installed[] = self::$installed;

return $installed;
}
}
<?php

// platform_check.php @generated by Composer

$issues = array();

if (!(PHP_VERSION_ID >= 70300)) {
    $issues[] = 'Your Composer dependencies require a PHP version ">= 7.3.0". You are running ' . PHP_VERSION . '.';
}

if ($issues) {
    if (!headers_sent()) {
        header('HTTP/1.1 500 Internal Server Error');
    }
    if (!ini_get('display_errors')) {
        if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
            fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
        } elseif (!headers_sent()) {
            echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
        }
    }
    trigger_error(
        'Composer detected issues in your platform: ' . implode(' ', $issues),
        E_USER_ERROR
    );
}
<?php

// autoload_namespaces.php @generated by Composer

$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);

return array(
);
<?php










namespace Webmozart\Assert;

use ArrayAccess;
use BadMethodCallException;
use Closure;
use Countable;
use DateTime;
use DateTimeImmutable;
use Exception;
use ResourceBundle;
use SimpleXMLElement;
use Throwable;
use Traversable;








class Assert
{
use Mixin;

/**
@psalm-pure
@psalm-assert





*/
public static function string($value, $message = '')
{
if (!\is_string($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a string. Got: %s',
static::typeToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function stringNotEmpty($value, $message = '')
{
static::string($value, $message);
static::notEq($value, '', $message);
}

/**
@psalm-pure
@psalm-assert





*/
public static function integer($value, $message = '')
{
if (!\is_int($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an integer. Got: %s',
static::typeToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function integerish($value, $message = '')
{
if (!\is_numeric($value) || $value != (int) $value) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an integerish value. Got: %s',
static::typeToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function positiveInteger($value, $message = '')
{
if (!(\is_int($value) && $value > 0)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a positive integer. Got: %s',
static::valueToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function float($value, $message = '')
{
if (!\is_float($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a float. Got: %s',
static::typeToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function numeric($value, $message = '')
{
if (!\is_numeric($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a numeric. Got: %s',
static::typeToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function natural($value, $message = '')
{
if (!\is_int($value) || $value < 0) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a non-negative integer. Got: %s',
static::valueToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function boolean($value, $message = '')
{
if (!\is_bool($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a boolean. Got: %s',
static::typeToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function scalar($value, $message = '')
{
if (!\is_scalar($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a scalar. Got: %s',
static::typeToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function object($value, $message = '')
{
if (!\is_object($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an object. Got: %s',
static::typeToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert






*/
public static function resource($value, $type = null, $message = '')
{
if (!\is_resource($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a resource. Got: %s',
static::typeToString($value)
));
}

if ($type && $type !== \get_resource_type($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a resource of type %2$s. Got: %s',
static::typeToString($value),
$type
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function isCallable($value, $message = '')
{
if (!\is_callable($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a callable. Got: %s',
static::typeToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function isArray($value, $message = '')
{
if (!\is_array($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an array. Got: %s',
static::typeToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function isTraversable($value, $message = '')
{
@\trigger_error(
\sprintf(
'The "%s" assertion is deprecated. You should stop using it, as it will soon be removed in 2.0 version. Use "isIterable" or "isInstanceOf" instead.',
__METHOD__
),
\E_USER_DEPRECATED
);

if (!\is_array($value) && !($value instanceof Traversable)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a traversable. Got: %s',
static::typeToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function isArrayAccessible($value, $message = '')
{
if (!\is_array($value) && !($value instanceof ArrayAccess)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an array accessible. Got: %s',
static::typeToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function isCountable($value, $message = '')
{
if (
!\is_array($value)
&& !($value instanceof Countable)
&& !($value instanceof ResourceBundle)
&& !($value instanceof SimpleXMLElement)
) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a countable. Got: %s',
static::typeToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function isIterable($value, $message = '')
{
if (!\is_array($value) && !($value instanceof Traversable)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an iterable. Got: %s',
static::typeToString($value)
));
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert






*/
public static function isInstanceOf($value, $class, $message = '')
{
if (!($value instanceof $class)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an instance of %2$s. Got: %s',
static::typeToString($value),
$class
));
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert






*/
public static function notInstanceOf($value, $class, $message = '')
{
if ($value instanceof $class) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an instance other than %2$s. Got: %s',
static::typeToString($value),
$class
));
}
}

/**
@psalm-pure
@psalm-param






*/
public static function isInstanceOfAny($value, array $classes, $message = '')
{
foreach ($classes as $class) {
if ($value instanceof $class) {
return;
}
}

static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an instance of any of %2$s. Got: %s',
static::typeToString($value),
\implode(', ', \array_map(array(static::class, 'valueToString'), $classes))
));
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert






*/
public static function isAOf($value, $class, $message = '')
{
static::string($class, 'Expected class as a string. Got: %s');

if (!\is_a($value, $class, \is_string($value))) {
static::reportInvalidArgument(sprintf(
$message ?: 'Expected an instance of this class or to this class among its parents "%2$s". Got: %s',
static::valueToString($value),
$class
));
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert
@psalm-assert






*/
public static function isNotA($value, $class, $message = '')
{
static::string($class, 'Expected class as a string. Got: %s');

if (\is_a($value, $class, \is_string($value))) {
static::reportInvalidArgument(sprintf(
$message ?: 'Expected an instance of this class or to this class among its parents other than "%2$s". Got: %s',
static::valueToString($value),
$class
));
}
}

/**
@psalm-pure
@psalm-param






*/
public static function isAnyOf($value, array $classes, $message = '')
{
foreach ($classes as $class) {
static::string($class, 'Expected class as a string. Got: %s');

if (\is_a($value, $class, \is_string($value))) {
return;
}
}

static::reportInvalidArgument(sprintf(
$message ?: 'Expected an instance of any of this classes or any of those classes among their parents "%2$s". Got: %s',
static::valueToString($value),
\implode(', ', $classes)
));
}

/**
@psalm-pure
@psalm-assert





*/
public static function isEmpty($value, $message = '')
{
if (!empty($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an empty value. Got: %s',
static::valueToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function notEmpty($value, $message = '')
{
if (empty($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a non-empty value. Got: %s',
static::valueToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function null($value, $message = '')
{
if (null !== $value) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected null. Got: %s',
static::valueToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function notNull($value, $message = '')
{
if (null === $value) {
static::reportInvalidArgument(
$message ?: 'Expected a value other than null.'
);
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function true($value, $message = '')
{
if (true !== $value) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to be true. Got: %s',
static::valueToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function false($value, $message = '')
{
if (false !== $value) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to be false. Got: %s',
static::valueToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function notFalse($value, $message = '')
{
if (false === $value) {
static::reportInvalidArgument(
$message ?: 'Expected a value other than false.'
);
}
}







public static function ip($value, $message = '')
{
if (false === \filter_var($value, \FILTER_VALIDATE_IP)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to be an IP. Got: %s',
static::valueToString($value)
));
}
}







public static function ipv4($value, $message = '')
{
if (false === \filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV4)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to be an IPv4. Got: %s',
static::valueToString($value)
));
}
}







public static function ipv6($value, $message = '')
{
if (false === \filter_var($value, \FILTER_VALIDATE_IP, \FILTER_FLAG_IPV6)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to be an IPv6. Got: %s',
static::valueToString($value)
));
}
}







public static function email($value, $message = '')
{
if (false === \filter_var($value, FILTER_VALIDATE_EMAIL)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to be a valid e-mail address. Got: %s',
static::valueToString($value)
));
}
}









public static function uniqueValues(array $values, $message = '')
{
$allValues = \count($values);
$uniqueValues = \count(\array_unique($values));

if ($allValues !== $uniqueValues) {
$difference = $allValues - $uniqueValues;

static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an array of unique values, but %s of them %s duplicated',
$difference,
(1 === $difference ? 'is' : 'are')
));
}
}








public static function eq($value, $expect, $message = '')
{
if ($expect != $value) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value equal to %2$s. Got: %s',
static::valueToString($value),
static::valueToString($expect)
));
}
}








public static function notEq($value, $expect, $message = '')
{
if ($expect == $value) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a different value than %s.',
static::valueToString($expect)
));
}
}

/**
@psalm-pure






*/
public static function same($value, $expect, $message = '')
{
if ($expect !== $value) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value identical to %2$s. Got: %s',
static::valueToString($value),
static::valueToString($expect)
));
}
}

/**
@psalm-pure






*/
public static function notSame($value, $expect, $message = '')
{
if ($expect === $value) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value not identical to %s.',
static::valueToString($expect)
));
}
}

/**
@psalm-pure






*/
public static function greaterThan($value, $limit, $message = '')
{
if ($value <= $limit) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value greater than %2$s. Got: %s',
static::valueToString($value),
static::valueToString($limit)
));
}
}

/**
@psalm-pure






*/
public static function greaterThanEq($value, $limit, $message = '')
{
if ($value < $limit) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value greater than or equal to %2$s. Got: %s',
static::valueToString($value),
static::valueToString($limit)
));
}
}

/**
@psalm-pure






*/
public static function lessThan($value, $limit, $message = '')
{
if ($value >= $limit) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value less than %2$s. Got: %s',
static::valueToString($value),
static::valueToString($limit)
));
}
}

/**
@psalm-pure






*/
public static function lessThanEq($value, $limit, $message = '')
{
if ($value > $limit) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value less than or equal to %2$s. Got: %s',
static::valueToString($value),
static::valueToString($limit)
));
}
}

/**
@psalm-pure









*/
public static function range($value, $min, $max, $message = '')
{
if ($value < $min || $value > $max) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value between %2$s and %3$s. Got: %s',
static::valueToString($value),
static::valueToString($min),
static::valueToString($max)
));
}
}

/**
@psalm-pure








*/
public static function oneOf($value, array $values, $message = '')
{
static::inArray($value, $values, $message);
}

/**
@psalm-pure








*/
public static function inArray($value, array $values, $message = '')
{
if (!\in_array($value, $values, true)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected one of: %2$s. Got: %s',
static::valueToString($value),
\implode(', ', \array_map(array(static::class, 'valueToString'), $values))
));
}
}

/**
@psalm-pure






*/
public static function contains($value, $subString, $message = '')
{
if (false === \strpos($value, $subString)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to contain %2$s. Got: %s',
static::valueToString($value),
static::valueToString($subString)
));
}
}

/**
@psalm-pure






*/
public static function notContains($value, $subString, $message = '')
{
if (false !== \strpos($value, $subString)) {
static::reportInvalidArgument(\sprintf(
$message ?: '%2$s was not expected to be contained in a value. Got: %s',
static::valueToString($value),
static::valueToString($subString)
));
}
}

/**
@psalm-pure





*/
public static function notWhitespaceOnly($value, $message = '')
{
if (\preg_match('/^\s*$/', $value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a non-whitespace string. Got: %s',
static::valueToString($value)
));
}
}

/**
@psalm-pure






*/
public static function startsWith($value, $prefix, $message = '')
{
if (0 !== \strpos($value, $prefix)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to start with %2$s. Got: %s',
static::valueToString($value),
static::valueToString($prefix)
));
}
}

/**
@psalm-pure






*/
public static function notStartsWith($value, $prefix, $message = '')
{
if (0 === \strpos($value, $prefix)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value not to start with %2$s. Got: %s',
static::valueToString($value),
static::valueToString($prefix)
));
}
}

/**
@psalm-pure





*/
public static function startsWithLetter($value, $message = '')
{
static::string($value);

$valid = isset($value[0]);

if ($valid) {
$locale = \setlocale(LC_CTYPE, 0);
\setlocale(LC_CTYPE, 'C');
$valid = \ctype_alpha($value[0]);
\setlocale(LC_CTYPE, $locale);
}

if (!$valid) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to start with a letter. Got: %s',
static::valueToString($value)
));
}
}

/**
@psalm-pure






*/
public static function endsWith($value, $suffix, $message = '')
{
if ($suffix !== \substr($value, -\strlen($suffix))) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to end with %2$s. Got: %s',
static::valueToString($value),
static::valueToString($suffix)
));
}
}

/**
@psalm-pure






*/
public static function notEndsWith($value, $suffix, $message = '')
{
if ($suffix === \substr($value, -\strlen($suffix))) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value not to end with %2$s. Got: %s',
static::valueToString($value),
static::valueToString($suffix)
));
}
}

/**
@psalm-pure






*/
public static function regex($value, $pattern, $message = '')
{
if (!\preg_match($pattern, $value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'The value %s does not match the expected pattern.',
static::valueToString($value)
));
}
}

/**
@psalm-pure






*/
public static function notRegex($value, $pattern, $message = '')
{
if (\preg_match($pattern, $value, $matches, PREG_OFFSET_CAPTURE)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'The value %s matches the pattern %s (at offset %d).',
static::valueToString($value),
static::valueToString($pattern),
$matches[0][1]
));
}
}

/**
@psalm-pure





*/
public static function unicodeLetters($value, $message = '')
{
static::string($value);

if (!\preg_match('/^\p{L}+$/u', $value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to contain only Unicode letters. Got: %s',
static::valueToString($value)
));
}
}

/**
@psalm-pure





*/
public static function alpha($value, $message = '')
{
static::string($value);

$locale = \setlocale(LC_CTYPE, 0);
\setlocale(LC_CTYPE, 'C');
$valid = !\ctype_alpha($value);
\setlocale(LC_CTYPE, $locale);

if ($valid) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to contain only letters. Got: %s',
static::valueToString($value)
));
}
}

/**
@psalm-pure





*/
public static function digits($value, $message = '')
{
$locale = \setlocale(LC_CTYPE, 0);
\setlocale(LC_CTYPE, 'C');
$valid = !\ctype_digit($value);
\setlocale(LC_CTYPE, $locale);

if ($valid) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to contain digits only. Got: %s',
static::valueToString($value)
));
}
}

/**
@psalm-pure





*/
public static function alnum($value, $message = '')
{
$locale = \setlocale(LC_CTYPE, 0);
\setlocale(LC_CTYPE, 'C');
$valid = !\ctype_alnum($value);
\setlocale(LC_CTYPE, $locale);

if ($valid) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to contain letters and digits only. Got: %s',
static::valueToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function lower($value, $message = '')
{
$locale = \setlocale(LC_CTYPE, 0);
\setlocale(LC_CTYPE, 'C');
$valid = !\ctype_lower($value);
\setlocale(LC_CTYPE, $locale);

if ($valid) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to contain lowercase characters only. Got: %s',
static::valueToString($value)
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function upper($value, $message = '')
{
$locale = \setlocale(LC_CTYPE, 0);
\setlocale(LC_CTYPE, 'C');
$valid = !\ctype_upper($value);
\setlocale(LC_CTYPE, $locale);

if ($valid) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to contain uppercase characters only. Got: %s',
static::valueToString($value)
));
}
}

/**
@psalm-pure






*/
public static function length($value, $length, $message = '')
{
if ($length !== static::strlen($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to contain %2$s characters. Got: %s',
static::valueToString($value),
$length
));
}
}

/**
@psalm-pure








*/
public static function minLength($value, $min, $message = '')
{
if (static::strlen($value) < $min) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to contain at least %2$s characters. Got: %s',
static::valueToString($value),
$min
));
}
}

/**
@psalm-pure








*/
public static function maxLength($value, $max, $message = '')
{
if (static::strlen($value) > $max) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to contain at most %2$s characters. Got: %s',
static::valueToString($value),
$max
));
}
}

/**
@psalm-pure









*/
public static function lengthBetween($value, $min, $max, $message = '')
{
$length = static::strlen($value);

if ($length < $min || $length > $max) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a value to contain between %2$s and %3$s characters. Got: %s',
static::valueToString($value),
$min,
$max
));
}
}









public static function fileExists($value, $message = '')
{
static::string($value);

if (!\file_exists($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'The file %s does not exist.',
static::valueToString($value)
));
}
}







public static function file($value, $message = '')
{
static::fileExists($value, $message);

if (!\is_file($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'The path %s is not a file.',
static::valueToString($value)
));
}
}







public static function directory($value, $message = '')
{
static::fileExists($value, $message);

if (!\is_dir($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'The path %s is no directory.',
static::valueToString($value)
));
}
}







public static function readable($value, $message = '')
{
if (!\is_readable($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'The path %s is not readable.',
static::valueToString($value)
));
}
}







public static function writable($value, $message = '')
{
if (!\is_writable($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'The path %s is not writable.',
static::valueToString($value)
));
}
}

/**
@psalm-assert





*/
public static function classExists($value, $message = '')
{
if (!\class_exists($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an existing class name. Got: %s',
static::valueToString($value)
));
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert






*/
public static function subclassOf($value, $class, $message = '')
{
if (!\is_subclass_of($value, $class)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected a sub-class of %2$s. Got: %s',
static::valueToString($value),
static::valueToString($class)
));
}
}

/**
@psalm-assert





*/
public static function interfaceExists($value, $message = '')
{
if (!\interface_exists($value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an existing interface name. got %s',
static::valueToString($value)
));
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert






*/
public static function implementsInterface($value, $interface, $message = '')
{
if (!\in_array($interface, \class_implements($value))) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an implementation of %2$s. Got: %s',
static::valueToString($value),
static::valueToString($interface)
));
}
}

/**
@psalm-pure
@psalm-param






*/
public static function propertyExists($classOrObject, $property, $message = '')
{
if (!\property_exists($classOrObject, $property)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected the property %s to exist.',
static::valueToString($property)
));
}
}

/**
@psalm-pure
@psalm-param






*/
public static function propertyNotExists($classOrObject, $property, $message = '')
{
if (\property_exists($classOrObject, $property)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected the property %s to not exist.',
static::valueToString($property)
));
}
}

/**
@psalm-pure
@psalm-param






*/
public static function methodExists($classOrObject, $method, $message = '')
{
if (!(\is_string($classOrObject) || \is_object($classOrObject)) || !\method_exists($classOrObject, $method)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected the method %s to exist.',
static::valueToString($method)
));
}
}

/**
@psalm-pure
@psalm-param






*/
public static function methodNotExists($classOrObject, $method, $message = '')
{
if ((\is_string($classOrObject) || \is_object($classOrObject)) && \method_exists($classOrObject, $method)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected the method %s to not exist.',
static::valueToString($method)
));
}
}

/**
@psalm-pure






*/
public static function keyExists($array, $key, $message = '')
{
if (!(isset($array[$key]) || \array_key_exists($key, $array))) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected the key %s to exist.',
static::valueToString($key)
));
}
}

/**
@psalm-pure






*/
public static function keyNotExists($array, $key, $message = '')
{
if (isset($array[$key]) || \array_key_exists($key, $array)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected the key %s to not exist.',
static::valueToString($key)
));
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function validArrayKey($value, $message = '')
{
if (!(\is_int($value) || \is_string($value))) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected string or integer. Got: %s',
static::typeToString($value)
));
}
}










public static function count($array, $number, $message = '')
{
static::eq(
\count($array),
$number,
\sprintf(
$message ?: 'Expected an array to contain %d elements. Got: %d.',
$number,
\count($array)
)
);
}










public static function minCount($array, $min, $message = '')
{
if (\count($array) < $min) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an array to contain at least %2$d elements. Got: %d',
\count($array),
$min
));
}
}










public static function maxCount($array, $max, $message = '')
{
if (\count($array) > $max) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an array to contain at most %2$d elements. Got: %d',
\count($array),
$max
));
}
}











public static function countBetween($array, $min, $max, $message = '')
{
$count = \count($array);

if ($count < $min || $count > $max) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Expected an array to contain between %2$d and %3$d elements. Got: %d',
$count,
$min,
$max
));
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function isList($array, $message = '')
{
if (!\is_array($array)) {
static::reportInvalidArgument(
$message ?: 'Expected list - non-associative array.'
);
}

if ($array === \array_values($array)) {
return;
}

$nextKey = -1;
foreach ($array as $k => $v) {
if ($k !== ++$nextKey) {
static::reportInvalidArgument(
$message ?: 'Expected list - non-associative array.'
);
}
}
}

/**
@psalm-pure
@psalm-assert





*/
public static function isNonEmptyList($array, $message = '')
{
static::isList($array, $message);
static::notEmpty($array, $message);
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert





*/
public static function isMap($array, $message = '')
{
if (
!\is_array($array) ||
\array_keys($array) !== \array_filter(\array_keys($array), '\is_string')
) {
static::reportInvalidArgument(
$message ?: 'Expected map - associative array with string keys.'
);
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert
@psalm-assert





*/
public static function isNonEmptyMap($array, $message = '')
{
static::isMap($array, $message);
static::notEmpty($array, $message);
}

/**
@psalm-pure





*/
public static function uuid($value, $message = '')
{
$value = \str_replace(array('urn:', 'uuid:', '{', '}'), '', $value);



if ('00000000-0000-0000-0000-000000000000' === $value) {
return;
}

if (!\preg_match('/^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/', $value)) {
static::reportInvalidArgument(\sprintf(
$message ?: 'Value %s is not a valid UUID.',
static::valueToString($value)
));
}
}

/**
@psalm-param






*/
public static function throws(Closure $expression, $class = 'Exception', $message = '')
{
static::string($class);

$actual = 'none';

try {
$expression();
} catch (Exception $e) {
$actual = \get_class($e);
if ($e instanceof $class) {
return;
}
} catch (Throwable $e) {
$actual = \get_class($e);
if ($e instanceof $class) {
return;
}
}

static::reportInvalidArgument($message ?: \sprintf(
'Expected to throw "%s", got "%s"',
$class,
$actual
));
}




public static function __callStatic($name, $arguments)
{
if ('nullOr' === \substr($name, 0, 6)) {
if (null !== $arguments[0]) {
$method = \lcfirst(\substr($name, 6));
\call_user_func_array(array(static::class, $method), $arguments);
}

return;
}

if ('all' === \substr($name, 0, 3)) {
static::isIterable($arguments[0]);

$method = \lcfirst(\substr($name, 3));
$args = $arguments;

foreach ($arguments[0] as $entry) {
$args[0] = $entry;

\call_user_func_array(array(static::class, $method), $args);
}

return;
}

throw new BadMethodCallException('No such method: '.$name);
}






protected static function valueToString($value)
{
if (null === $value) {
return 'null';
}

if (true === $value) {
return 'true';
}

if (false === $value) {
return 'false';
}

if (\is_array($value)) {
return 'array';
}

if (\is_object($value)) {
if (\method_exists($value, '__toString')) {
return \get_class($value).': '.self::valueToString($value->__toString());
}

if ($value instanceof DateTime || $value instanceof DateTimeImmutable) {
return \get_class($value).': '.self::valueToString($value->format('c'));
}

return \get_class($value);
}

if (\is_resource($value)) {
return 'resource';
}

if (\is_string($value)) {
return '"'.$value.'"';
}

return (string) $value;
}






protected static function typeToString($value)
{
return \is_object($value) ? \get_class($value) : \gettype($value);
}

protected static function strlen($value)
{
if (!\function_exists('mb_detect_encoding')) {
return \strlen($value);
}

if (false === $encoding = \mb_detect_encoding($value)) {
return \strlen($value);
}

return \mb_strlen($value, $encoding);
}

/**
@psalm-pure
@psalm-return




*/
protected static function reportInvalidArgument($message)
{
throw new InvalidArgumentException($message);
}

private function __construct()
{
}
}
<?php

namespace Webmozart\Assert;

use ArrayAccess;
use Closure;
use Countable;
use Throwable;





trait Mixin
{
/**
@psalm-pure
@psalm-assert







*/
public static function nullOrString($value, $message = '')
{
null === $value || static::string($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allString($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::string($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrString($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::string($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrStringNotEmpty($value, $message = '')
{
null === $value || static::stringNotEmpty($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allStringNotEmpty($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::stringNotEmpty($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrStringNotEmpty($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::stringNotEmpty($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrInteger($value, $message = '')
{
null === $value || static::integer($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allInteger($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::integer($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrInteger($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::integer($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrIntegerish($value, $message = '')
{
null === $value || static::integerish($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allIntegerish($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::integerish($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrIntegerish($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::integerish($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrPositiveInteger($value, $message = '')
{
null === $value || static::positiveInteger($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allPositiveInteger($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::positiveInteger($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrPositiveInteger($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::positiveInteger($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrFloat($value, $message = '')
{
null === $value || static::float($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allFloat($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::float($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrFloat($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::float($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrNumeric($value, $message = '')
{
null === $value || static::numeric($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNumeric($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::numeric($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrNumeric($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::numeric($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrNatural($value, $message = '')
{
null === $value || static::natural($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNatural($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::natural($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrNatural($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::natural($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrBoolean($value, $message = '')
{
null === $value || static::boolean($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allBoolean($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::boolean($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrBoolean($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::boolean($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrScalar($value, $message = '')
{
null === $value || static::scalar($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allScalar($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::scalar($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrScalar($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::scalar($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrObject($value, $message = '')
{
null === $value || static::object($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allObject($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::object($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrObject($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::object($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert








*/
public static function nullOrResource($value, $type = null, $message = '')
{
null === $value || static::resource($value, $type, $message);
}

/**
@psalm-pure
@psalm-assert








*/
public static function allResource($value, $type = null, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::resource($entry, $type, $message);
}
}

/**
@psalm-pure
@psalm-assert








*/
public static function allNullOrResource($value, $type = null, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::resource($entry, $type, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrIsCallable($value, $message = '')
{
null === $value || static::isCallable($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allIsCallable($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::isCallable($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrIsCallable($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::isCallable($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrIsArray($value, $message = '')
{
null === $value || static::isArray($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allIsArray($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::isArray($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrIsArray($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::isArray($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert









*/
public static function nullOrIsTraversable($value, $message = '')
{
null === $value || static::isTraversable($value, $message);
}

/**
@psalm-pure
@psalm-assert









*/
public static function allIsTraversable($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::isTraversable($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert









*/
public static function allNullOrIsTraversable($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::isTraversable($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrIsArrayAccessible($value, $message = '')
{
null === $value || static::isArrayAccessible($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allIsArrayAccessible($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::isArrayAccessible($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrIsArrayAccessible($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::isArrayAccessible($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrIsCountable($value, $message = '')
{
null === $value || static::isCountable($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allIsCountable($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::isCountable($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrIsCountable($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::isCountable($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrIsIterable($value, $message = '')
{
null === $value || static::isIterable($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allIsIterable($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::isIterable($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrIsIterable($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::isIterable($entry, $message);
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert








*/
public static function nullOrIsInstanceOf($value, $class, $message = '')
{
null === $value || static::isInstanceOf($value, $class, $message);
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert








*/
public static function allIsInstanceOf($value, $class, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::isInstanceOf($entry, $class, $message);
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert








*/
public static function allNullOrIsInstanceOf($value, $class, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::isInstanceOf($entry, $class, $message);
}
}

/**
@psalm-pure
@psalm-template
@psalm-param








*/
public static function nullOrNotInstanceOf($value, $class, $message = '')
{
null === $value || static::notInstanceOf($value, $class, $message);
}

/**
@psalm-pure
@psalm-template
@psalm-param








*/
public static function allNotInstanceOf($value, $class, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::notInstanceOf($entry, $class, $message);
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert








*/
public static function allNullOrNotInstanceOf($value, $class, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::notInstanceOf($entry, $class, $message);
}
}

/**
@psalm-pure
@psalm-param








*/
public static function nullOrIsInstanceOfAny($value, $classes, $message = '')
{
null === $value || static::isInstanceOfAny($value, $classes, $message);
}

/**
@psalm-pure
@psalm-param








*/
public static function allIsInstanceOfAny($value, $classes, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::isInstanceOfAny($entry, $classes, $message);
}
}

/**
@psalm-pure
@psalm-param








*/
public static function allNullOrIsInstanceOfAny($value, $classes, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::isInstanceOfAny($entry, $classes, $message);
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert








*/
public static function nullOrIsAOf($value, $class, $message = '')
{
null === $value || static::isAOf($value, $class, $message);
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert








*/
public static function allIsAOf($value, $class, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::isAOf($entry, $class, $message);
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert








*/
public static function allNullOrIsAOf($value, $class, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::isAOf($entry, $class, $message);
}
}

/**
@psalm-pure
@psalm-template
@psalm-param








*/
public static function nullOrIsNotA($value, $class, $message = '')
{
null === $value || static::isNotA($value, $class, $message);
}

/**
@psalm-pure
@psalm-template
@psalm-param








*/
public static function allIsNotA($value, $class, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::isNotA($entry, $class, $message);
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert
@psalm-assert








*/
public static function allNullOrIsNotA($value, $class, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::isNotA($entry, $class, $message);
}
}

/**
@psalm-pure
@psalm-param








*/
public static function nullOrIsAnyOf($value, $classes, $message = '')
{
null === $value || static::isAnyOf($value, $classes, $message);
}

/**
@psalm-pure
@psalm-param








*/
public static function allIsAnyOf($value, $classes, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::isAnyOf($entry, $classes, $message);
}
}

/**
@psalm-pure
@psalm-param








*/
public static function allNullOrIsAnyOf($value, $classes, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::isAnyOf($entry, $classes, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrIsEmpty($value, $message = '')
{
null === $value || static::isEmpty($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allIsEmpty($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::isEmpty($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrIsEmpty($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::isEmpty($entry, $message);
}
}

/**
@psalm-pure







*/
public static function nullOrNotEmpty($value, $message = '')
{
null === $value || static::notEmpty($value, $message);
}

/**
@psalm-pure







*/
public static function allNotEmpty($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::notEmpty($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrNotEmpty($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::notEmpty($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNull($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::null($entry, $message);
}
}

/**
@psalm-pure







*/
public static function allNotNull($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::notNull($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrTrue($value, $message = '')
{
null === $value || static::true($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allTrue($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::true($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrTrue($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::true($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrFalse($value, $message = '')
{
null === $value || static::false($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allFalse($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::false($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrFalse($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::false($entry, $message);
}
}

/**
@psalm-pure







*/
public static function nullOrNotFalse($value, $message = '')
{
null === $value || static::notFalse($value, $message);
}

/**
@psalm-pure







*/
public static function allNotFalse($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::notFalse($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrNotFalse($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::notFalse($entry, $message);
}
}









public static function nullOrIp($value, $message = '')
{
null === $value || static::ip($value, $message);
}









public static function allIp($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::ip($entry, $message);
}
}









public static function allNullOrIp($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::ip($entry, $message);
}
}









public static function nullOrIpv4($value, $message = '')
{
null === $value || static::ipv4($value, $message);
}









public static function allIpv4($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::ipv4($entry, $message);
}
}









public static function allNullOrIpv4($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::ipv4($entry, $message);
}
}









public static function nullOrIpv6($value, $message = '')
{
null === $value || static::ipv6($value, $message);
}









public static function allIpv6($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::ipv6($entry, $message);
}
}









public static function allNullOrIpv6($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::ipv6($entry, $message);
}
}









public static function nullOrEmail($value, $message = '')
{
null === $value || static::email($value, $message);
}









public static function allEmail($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::email($entry, $message);
}
}









public static function allNullOrEmail($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::email($entry, $message);
}
}









public static function nullOrUniqueValues($values, $message = '')
{
null === $values || static::uniqueValues($values, $message);
}









public static function allUniqueValues($values, $message = '')
{
static::isIterable($values);

foreach ($values as $entry) {
static::uniqueValues($entry, $message);
}
}









public static function allNullOrUniqueValues($values, $message = '')
{
static::isIterable($values);

foreach ($values as $entry) {
null === $entry || static::uniqueValues($entry, $message);
}
}










public static function nullOrEq($value, $expect, $message = '')
{
null === $value || static::eq($value, $expect, $message);
}










public static function allEq($value, $expect, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::eq($entry, $expect, $message);
}
}










public static function allNullOrEq($value, $expect, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::eq($entry, $expect, $message);
}
}










public static function nullOrNotEq($value, $expect, $message = '')
{
null === $value || static::notEq($value, $expect, $message);
}










public static function allNotEq($value, $expect, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::notEq($entry, $expect, $message);
}
}










public static function allNullOrNotEq($value, $expect, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::notEq($entry, $expect, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrSame($value, $expect, $message = '')
{
null === $value || static::same($value, $expect, $message);
}

/**
@psalm-pure








*/
public static function allSame($value, $expect, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::same($entry, $expect, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrSame($value, $expect, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::same($entry, $expect, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrNotSame($value, $expect, $message = '')
{
null === $value || static::notSame($value, $expect, $message);
}

/**
@psalm-pure








*/
public static function allNotSame($value, $expect, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::notSame($entry, $expect, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrNotSame($value, $expect, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::notSame($entry, $expect, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrGreaterThan($value, $limit, $message = '')
{
null === $value || static::greaterThan($value, $limit, $message);
}

/**
@psalm-pure








*/
public static function allGreaterThan($value, $limit, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::greaterThan($entry, $limit, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrGreaterThan($value, $limit, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::greaterThan($entry, $limit, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrGreaterThanEq($value, $limit, $message = '')
{
null === $value || static::greaterThanEq($value, $limit, $message);
}

/**
@psalm-pure








*/
public static function allGreaterThanEq($value, $limit, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::greaterThanEq($entry, $limit, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrGreaterThanEq($value, $limit, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::greaterThanEq($entry, $limit, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrLessThan($value, $limit, $message = '')
{
null === $value || static::lessThan($value, $limit, $message);
}

/**
@psalm-pure








*/
public static function allLessThan($value, $limit, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::lessThan($entry, $limit, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrLessThan($value, $limit, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::lessThan($entry, $limit, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrLessThanEq($value, $limit, $message = '')
{
null === $value || static::lessThanEq($value, $limit, $message);
}

/**
@psalm-pure








*/
public static function allLessThanEq($value, $limit, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::lessThanEq($entry, $limit, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrLessThanEq($value, $limit, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::lessThanEq($entry, $limit, $message);
}
}

/**
@psalm-pure









*/
public static function nullOrRange($value, $min, $max, $message = '')
{
null === $value || static::range($value, $min, $max, $message);
}

/**
@psalm-pure









*/
public static function allRange($value, $min, $max, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::range($entry, $min, $max, $message);
}
}

/**
@psalm-pure









*/
public static function allNullOrRange($value, $min, $max, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::range($entry, $min, $max, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrOneOf($value, $values, $message = '')
{
null === $value || static::oneOf($value, $values, $message);
}

/**
@psalm-pure








*/
public static function allOneOf($value, $values, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::oneOf($entry, $values, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrOneOf($value, $values, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::oneOf($entry, $values, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrInArray($value, $values, $message = '')
{
null === $value || static::inArray($value, $values, $message);
}

/**
@psalm-pure








*/
public static function allInArray($value, $values, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::inArray($entry, $values, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrInArray($value, $values, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::inArray($entry, $values, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrContains($value, $subString, $message = '')
{
null === $value || static::contains($value, $subString, $message);
}

/**
@psalm-pure








*/
public static function allContains($value, $subString, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::contains($entry, $subString, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrContains($value, $subString, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::contains($entry, $subString, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrNotContains($value, $subString, $message = '')
{
null === $value || static::notContains($value, $subString, $message);
}

/**
@psalm-pure








*/
public static function allNotContains($value, $subString, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::notContains($entry, $subString, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrNotContains($value, $subString, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::notContains($entry, $subString, $message);
}
}

/**
@psalm-pure







*/
public static function nullOrNotWhitespaceOnly($value, $message = '')
{
null === $value || static::notWhitespaceOnly($value, $message);
}

/**
@psalm-pure







*/
public static function allNotWhitespaceOnly($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::notWhitespaceOnly($entry, $message);
}
}

/**
@psalm-pure







*/
public static function allNullOrNotWhitespaceOnly($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::notWhitespaceOnly($entry, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrStartsWith($value, $prefix, $message = '')
{
null === $value || static::startsWith($value, $prefix, $message);
}

/**
@psalm-pure








*/
public static function allStartsWith($value, $prefix, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::startsWith($entry, $prefix, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrStartsWith($value, $prefix, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::startsWith($entry, $prefix, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrNotStartsWith($value, $prefix, $message = '')
{
null === $value || static::notStartsWith($value, $prefix, $message);
}

/**
@psalm-pure








*/
public static function allNotStartsWith($value, $prefix, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::notStartsWith($entry, $prefix, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrNotStartsWith($value, $prefix, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::notStartsWith($entry, $prefix, $message);
}
}

/**
@psalm-pure







*/
public static function nullOrStartsWithLetter($value, $message = '')
{
null === $value || static::startsWithLetter($value, $message);
}

/**
@psalm-pure







*/
public static function allStartsWithLetter($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::startsWithLetter($entry, $message);
}
}

/**
@psalm-pure







*/
public static function allNullOrStartsWithLetter($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::startsWithLetter($entry, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrEndsWith($value, $suffix, $message = '')
{
null === $value || static::endsWith($value, $suffix, $message);
}

/**
@psalm-pure








*/
public static function allEndsWith($value, $suffix, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::endsWith($entry, $suffix, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrEndsWith($value, $suffix, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::endsWith($entry, $suffix, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrNotEndsWith($value, $suffix, $message = '')
{
null === $value || static::notEndsWith($value, $suffix, $message);
}

/**
@psalm-pure








*/
public static function allNotEndsWith($value, $suffix, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::notEndsWith($entry, $suffix, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrNotEndsWith($value, $suffix, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::notEndsWith($entry, $suffix, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrRegex($value, $pattern, $message = '')
{
null === $value || static::regex($value, $pattern, $message);
}

/**
@psalm-pure








*/
public static function allRegex($value, $pattern, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::regex($entry, $pattern, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrRegex($value, $pattern, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::regex($entry, $pattern, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrNotRegex($value, $pattern, $message = '')
{
null === $value || static::notRegex($value, $pattern, $message);
}

/**
@psalm-pure








*/
public static function allNotRegex($value, $pattern, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::notRegex($entry, $pattern, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrNotRegex($value, $pattern, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::notRegex($entry, $pattern, $message);
}
}

/**
@psalm-pure







*/
public static function nullOrUnicodeLetters($value, $message = '')
{
null === $value || static::unicodeLetters($value, $message);
}

/**
@psalm-pure







*/
public static function allUnicodeLetters($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::unicodeLetters($entry, $message);
}
}

/**
@psalm-pure







*/
public static function allNullOrUnicodeLetters($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::unicodeLetters($entry, $message);
}
}

/**
@psalm-pure







*/
public static function nullOrAlpha($value, $message = '')
{
null === $value || static::alpha($value, $message);
}

/**
@psalm-pure







*/
public static function allAlpha($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::alpha($entry, $message);
}
}

/**
@psalm-pure







*/
public static function allNullOrAlpha($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::alpha($entry, $message);
}
}

/**
@psalm-pure







*/
public static function nullOrDigits($value, $message = '')
{
null === $value || static::digits($value, $message);
}

/**
@psalm-pure







*/
public static function allDigits($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::digits($entry, $message);
}
}

/**
@psalm-pure







*/
public static function allNullOrDigits($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::digits($entry, $message);
}
}

/**
@psalm-pure







*/
public static function nullOrAlnum($value, $message = '')
{
null === $value || static::alnum($value, $message);
}

/**
@psalm-pure







*/
public static function allAlnum($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::alnum($entry, $message);
}
}

/**
@psalm-pure







*/
public static function allNullOrAlnum($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::alnum($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrLower($value, $message = '')
{
null === $value || static::lower($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allLower($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::lower($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrLower($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::lower($entry, $message);
}
}

/**
@psalm-pure







*/
public static function nullOrUpper($value, $message = '')
{
null === $value || static::upper($value, $message);
}

/**
@psalm-pure







*/
public static function allUpper($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::upper($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrUpper($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::upper($entry, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrLength($value, $length, $message = '')
{
null === $value || static::length($value, $length, $message);
}

/**
@psalm-pure








*/
public static function allLength($value, $length, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::length($entry, $length, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrLength($value, $length, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::length($entry, $length, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrMinLength($value, $min, $message = '')
{
null === $value || static::minLength($value, $min, $message);
}

/**
@psalm-pure








*/
public static function allMinLength($value, $min, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::minLength($entry, $min, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrMinLength($value, $min, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::minLength($entry, $min, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrMaxLength($value, $max, $message = '')
{
null === $value || static::maxLength($value, $max, $message);
}

/**
@psalm-pure








*/
public static function allMaxLength($value, $max, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::maxLength($entry, $max, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrMaxLength($value, $max, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::maxLength($entry, $max, $message);
}
}

/**
@psalm-pure









*/
public static function nullOrLengthBetween($value, $min, $max, $message = '')
{
null === $value || static::lengthBetween($value, $min, $max, $message);
}

/**
@psalm-pure









*/
public static function allLengthBetween($value, $min, $max, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::lengthBetween($entry, $min, $max, $message);
}
}

/**
@psalm-pure









*/
public static function allNullOrLengthBetween($value, $min, $max, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::lengthBetween($entry, $min, $max, $message);
}
}









public static function nullOrFileExists($value, $message = '')
{
null === $value || static::fileExists($value, $message);
}









public static function allFileExists($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::fileExists($entry, $message);
}
}









public static function allNullOrFileExists($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::fileExists($entry, $message);
}
}









public static function nullOrFile($value, $message = '')
{
null === $value || static::file($value, $message);
}









public static function allFile($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::file($entry, $message);
}
}









public static function allNullOrFile($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::file($entry, $message);
}
}









public static function nullOrDirectory($value, $message = '')
{
null === $value || static::directory($value, $message);
}









public static function allDirectory($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::directory($entry, $message);
}
}









public static function allNullOrDirectory($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::directory($entry, $message);
}
}









public static function nullOrReadable($value, $message = '')
{
null === $value || static::readable($value, $message);
}









public static function allReadable($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::readable($entry, $message);
}
}









public static function allNullOrReadable($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::readable($entry, $message);
}
}









public static function nullOrWritable($value, $message = '')
{
null === $value || static::writable($value, $message);
}









public static function allWritable($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::writable($entry, $message);
}
}









public static function allNullOrWritable($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::writable($entry, $message);
}
}

/**
@psalm-assert







*/
public static function nullOrClassExists($value, $message = '')
{
null === $value || static::classExists($value, $message);
}

/**
@psalm-assert







*/
public static function allClassExists($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::classExists($entry, $message);
}
}

/**
@psalm-assert







*/
public static function allNullOrClassExists($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::classExists($entry, $message);
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert








*/
public static function nullOrSubclassOf($value, $class, $message = '')
{
null === $value || static::subclassOf($value, $class, $message);
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert








*/
public static function allSubclassOf($value, $class, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::subclassOf($entry, $class, $message);
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert








*/
public static function allNullOrSubclassOf($value, $class, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::subclassOf($entry, $class, $message);
}
}

/**
@psalm-assert







*/
public static function nullOrInterfaceExists($value, $message = '')
{
null === $value || static::interfaceExists($value, $message);
}

/**
@psalm-assert







*/
public static function allInterfaceExists($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::interfaceExists($entry, $message);
}
}

/**
@psalm-assert







*/
public static function allNullOrInterfaceExists($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::interfaceExists($entry, $message);
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert








*/
public static function nullOrImplementsInterface($value, $interface, $message = '')
{
null === $value || static::implementsInterface($value, $interface, $message);
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert








*/
public static function allImplementsInterface($value, $interface, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::implementsInterface($entry, $interface, $message);
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert








*/
public static function allNullOrImplementsInterface($value, $interface, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::implementsInterface($entry, $interface, $message);
}
}

/**
@psalm-pure
@psalm-param








*/
public static function nullOrPropertyExists($classOrObject, $property, $message = '')
{
null === $classOrObject || static::propertyExists($classOrObject, $property, $message);
}

/**
@psalm-pure
@psalm-param








*/
public static function allPropertyExists($classOrObject, $property, $message = '')
{
static::isIterable($classOrObject);

foreach ($classOrObject as $entry) {
static::propertyExists($entry, $property, $message);
}
}

/**
@psalm-pure
@psalm-param








*/
public static function allNullOrPropertyExists($classOrObject, $property, $message = '')
{
static::isIterable($classOrObject);

foreach ($classOrObject as $entry) {
null === $entry || static::propertyExists($entry, $property, $message);
}
}

/**
@psalm-pure
@psalm-param








*/
public static function nullOrPropertyNotExists($classOrObject, $property, $message = '')
{
null === $classOrObject || static::propertyNotExists($classOrObject, $property, $message);
}

/**
@psalm-pure
@psalm-param








*/
public static function allPropertyNotExists($classOrObject, $property, $message = '')
{
static::isIterable($classOrObject);

foreach ($classOrObject as $entry) {
static::propertyNotExists($entry, $property, $message);
}
}

/**
@psalm-pure
@psalm-param








*/
public static function allNullOrPropertyNotExists($classOrObject, $property, $message = '')
{
static::isIterable($classOrObject);

foreach ($classOrObject as $entry) {
null === $entry || static::propertyNotExists($entry, $property, $message);
}
}

/**
@psalm-pure
@psalm-param








*/
public static function nullOrMethodExists($classOrObject, $method, $message = '')
{
null === $classOrObject || static::methodExists($classOrObject, $method, $message);
}

/**
@psalm-pure
@psalm-param








*/
public static function allMethodExists($classOrObject, $method, $message = '')
{
static::isIterable($classOrObject);

foreach ($classOrObject as $entry) {
static::methodExists($entry, $method, $message);
}
}

/**
@psalm-pure
@psalm-param








*/
public static function allNullOrMethodExists($classOrObject, $method, $message = '')
{
static::isIterable($classOrObject);

foreach ($classOrObject as $entry) {
null === $entry || static::methodExists($entry, $method, $message);
}
}

/**
@psalm-pure
@psalm-param








*/
public static function nullOrMethodNotExists($classOrObject, $method, $message = '')
{
null === $classOrObject || static::methodNotExists($classOrObject, $method, $message);
}

/**
@psalm-pure
@psalm-param








*/
public static function allMethodNotExists($classOrObject, $method, $message = '')
{
static::isIterable($classOrObject);

foreach ($classOrObject as $entry) {
static::methodNotExists($entry, $method, $message);
}
}

/**
@psalm-pure
@psalm-param








*/
public static function allNullOrMethodNotExists($classOrObject, $method, $message = '')
{
static::isIterable($classOrObject);

foreach ($classOrObject as $entry) {
null === $entry || static::methodNotExists($entry, $method, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrKeyExists($array, $key, $message = '')
{
null === $array || static::keyExists($array, $key, $message);
}

/**
@psalm-pure








*/
public static function allKeyExists($array, $key, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
static::keyExists($entry, $key, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrKeyExists($array, $key, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
null === $entry || static::keyExists($entry, $key, $message);
}
}

/**
@psalm-pure








*/
public static function nullOrKeyNotExists($array, $key, $message = '')
{
null === $array || static::keyNotExists($array, $key, $message);
}

/**
@psalm-pure








*/
public static function allKeyNotExists($array, $key, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
static::keyNotExists($entry, $key, $message);
}
}

/**
@psalm-pure








*/
public static function allNullOrKeyNotExists($array, $key, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
null === $entry || static::keyNotExists($entry, $key, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrValidArrayKey($value, $message = '')
{
null === $value || static::validArrayKey($value, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allValidArrayKey($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::validArrayKey($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrValidArrayKey($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::validArrayKey($entry, $message);
}
}










public static function nullOrCount($array, $number, $message = '')
{
null === $array || static::count($array, $number, $message);
}










public static function allCount($array, $number, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
static::count($entry, $number, $message);
}
}










public static function allNullOrCount($array, $number, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
null === $entry || static::count($entry, $number, $message);
}
}










public static function nullOrMinCount($array, $min, $message = '')
{
null === $array || static::minCount($array, $min, $message);
}










public static function allMinCount($array, $min, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
static::minCount($entry, $min, $message);
}
}










public static function allNullOrMinCount($array, $min, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
null === $entry || static::minCount($entry, $min, $message);
}
}










public static function nullOrMaxCount($array, $max, $message = '')
{
null === $array || static::maxCount($array, $max, $message);
}










public static function allMaxCount($array, $max, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
static::maxCount($entry, $max, $message);
}
}










public static function allNullOrMaxCount($array, $max, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
null === $entry || static::maxCount($entry, $max, $message);
}
}











public static function nullOrCountBetween($array, $min, $max, $message = '')
{
null === $array || static::countBetween($array, $min, $max, $message);
}











public static function allCountBetween($array, $min, $max, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
static::countBetween($entry, $min, $max, $message);
}
}











public static function allNullOrCountBetween($array, $min, $max, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
null === $entry || static::countBetween($entry, $min, $max, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrIsList($array, $message = '')
{
null === $array || static::isList($array, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allIsList($array, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
static::isList($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrIsList($array, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
null === $entry || static::isList($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function nullOrIsNonEmptyList($array, $message = '')
{
null === $array || static::isNonEmptyList($array, $message);
}

/**
@psalm-pure
@psalm-assert







*/
public static function allIsNonEmptyList($array, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
static::isNonEmptyList($entry, $message);
}
}

/**
@psalm-pure
@psalm-assert







*/
public static function allNullOrIsNonEmptyList($array, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
null === $entry || static::isNonEmptyList($entry, $message);
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert







*/
public static function nullOrIsMap($array, $message = '')
{
null === $array || static::isMap($array, $message);
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert







*/
public static function allIsMap($array, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
static::isMap($entry, $message);
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert







*/
public static function allNullOrIsMap($array, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
null === $entry || static::isMap($entry, $message);
}
}

/**
@psalm-pure
@psalm-template
@psalm-param







*/
public static function nullOrIsNonEmptyMap($array, $message = '')
{
null === $array || static::isNonEmptyMap($array, $message);
}

/**
@psalm-pure
@psalm-template
@psalm-param







*/
public static function allIsNonEmptyMap($array, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
static::isNonEmptyMap($entry, $message);
}
}

/**
@psalm-pure
@psalm-template
@psalm-param
@psalm-assert
@psalm-assert







*/
public static function allNullOrIsNonEmptyMap($array, $message = '')
{
static::isIterable($array);

foreach ($array as $entry) {
null === $entry || static::isNonEmptyMap($entry, $message);
}
}

/**
@psalm-pure







*/
public static function nullOrUuid($value, $message = '')
{
null === $value || static::uuid($value, $message);
}

/**
@psalm-pure







*/
public static function allUuid($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
static::uuid($entry, $message);
}
}

/**
@psalm-pure







*/
public static function allNullOrUuid($value, $message = '')
{
static::isIterable($value);

foreach ($value as $entry) {
null === $entry || static::uuid($entry, $message);
}
}

/**
@psalm-param








*/
public static function nullOrThrows($expression, $class = 'Exception', $message = '')
{
null === $expression || static::throws($expression, $class, $message);
}

/**
@psalm-param








*/
public static function allThrows($expression, $class = 'Exception', $message = '')
{
static::isIterable($expression);

foreach ($expression as $entry) {
static::throws($entry, $class, $message);
}
}

/**
@psalm-param








*/
public static function allNullOrThrows($expression, $class = 'Exception', $message = '')
{
static::isIterable($expression);

foreach ($expression as $entry) {
null === $entry || static::throws($entry, $class, $message);
}
}
}
<?php










namespace Webmozart\Assert;

class InvalidArgumentException extends \InvalidArgumentException
{
}
<?php










namespace Webmozart\PathUtil;

use InvalidArgumentException;
use RuntimeException;
use Webmozart\Assert\Assert;













final class Path
{



const CLEANUP_THRESHOLD = 1250;




const CLEANUP_SIZE = 1000;






private static $buffer = array();






private static $bufferSize = 0;


























public static function canonicalize($path)
{
if ('' === $path) {
return '';
}

Assert::string($path, 'The path must be a string. Got: %s');




if (isset(self::$buffer[$path])) {
return self::$buffer[$path];
}


if ('~' === $path[0]) {
$path = static::getHomeDirectory().substr($path, 1);
}

$path = str_replace('\\', '/', $path);

list($root, $pathWithoutRoot) = self::split($path);

$parts = explode('/', $pathWithoutRoot);
$canonicalParts = array();


foreach ($parts as $part) {
if ('.' === $part || '' === $part) {
continue;
}



if ('..' === $part && count($canonicalParts) > 0
&& '..' !== $canonicalParts[count($canonicalParts) - 1]) {
array_pop($canonicalParts);

continue;
}


if ('..' !== $part || '' === $root) {
$canonicalParts[] = $part;
}
}


self::$buffer[$path] = $canonicalPath = $root.implode('/', $canonicalParts);
++self::$bufferSize;


if (self::$bufferSize > self::CLEANUP_THRESHOLD) {
self::$buffer = array_slice(self::$buffer, -self::CLEANUP_SIZE, null, true);
self::$bufferSize = self::CLEANUP_SIZE;
}

return $canonicalPath;
}


















public static function normalize($path)
{
Assert::string($path, 'The path must be a string. Got: %s');

return str_replace('\\', '/', $path);
}





























public static function getDirectory($path)
{
if ('' === $path) {
return '';
}

$path = static::canonicalize($path);


if (false !== ($pos = strpos($path, '://'))) {
$scheme = substr($path, 0, $pos + 3);
$path = substr($path, $pos + 3);
} else {
$scheme = '';
}

if (false !== ($pos = strrpos($path, '/'))) {

if (0 === $pos) {
return $scheme.'/';
}


if (2 === $pos && ctype_alpha($path[0]) && ':' === $path[1]) {
return $scheme.substr($path, 0, 3);
}

return $scheme.substr($path, 0, $pos);
}

return '';
}



















public static function getHomeDirectory()
{

if (getenv('HOME')) {
return static::canonicalize(getenv('HOME'));
}


if (getenv('HOMEDRIVE') && getenv('HOMEPATH')) {
return static::canonicalize(getenv('HOMEDRIVE').getenv('HOMEPATH'));
}

throw new RuntimeException("Your environment or operation system isn't supported");
}














public static function getRoot($path)
{
if ('' === $path) {
return '';
}

Assert::string($path, 'The path must be a string. Got: %s');


if (false !== ($pos = strpos($path, '://'))) {
$scheme = substr($path, 0, $pos + 3);
$path = substr($path, $pos + 3);
} else {
$scheme = '';
}


if ('/' === $path[0] || '\\' === $path[0]) {
return $scheme.'/';
}

$length = strlen($path);


if ($length > 1 && ctype_alpha($path[0]) && ':' === $path[1]) {

if (2 === $length) {
return $scheme.$path.'/';
}


if ('/' === $path[2] || '\\' === $path[2]) {
return $scheme.$path[0].$path[1].'/';
}
}

return '';
}











public static function getFilename($path)
{
if ('' === $path) {
return '';
}

Assert::string($path, 'The path must be a string. Got: %s');

return basename($path);
}













public static function getFilenameWithoutExtension($path, $extension = null)
{
if ('' === $path) {
return '';
}

Assert::string($path, 'The path must be a string. Got: %s');
Assert::nullOrString($extension, 'The extension must be a string or null. Got: %s');

if (null !== $extension) {

return rtrim(basename($path, $extension), '.');
}

return pathinfo($path, PATHINFO_FILENAME);
}














public static function getExtension($path, $forceLowerCase = false)
{
if ('' === $path) {
return '';
}

Assert::string($path, 'The path must be a string. Got: %s');

$extension = pathinfo($path, PATHINFO_EXTENSION);

if ($forceLowerCase) {
$extension = self::toLower($extension);
}

return $extension;
}





















public static function hasExtension($path, $extensions = null, $ignoreCase = false)
{
if ('' === $path) {
return false;
}

$extensions = is_object($extensions) ? array($extensions) : (array) $extensions;

Assert::allString($extensions, 'The extensions must be strings. Got: %s');

$actualExtension = self::getExtension($path, $ignoreCase);


if (empty($extensions)) {
return '' !== $actualExtension;
}

foreach ($extensions as $key => $extension) {
if ($ignoreCase) {
$extension = self::toLower($extension);
}


$extensions[$key] = ltrim($extension, '.');
}

return in_array($actualExtension, $extensions);
}












public static function changeExtension($path, $extension)
{
if ('' === $path) {
return '';
}

Assert::string($extension, 'The extension must be a string. Got: %s');

$actualExtension = self::getExtension($path);
$extension = ltrim($extension, '.');


if ('/' === substr($path, -1)) {
return $path;
}


if (empty($actualExtension)) {
return $path.('.' === substr($path, -1) ? '' : '.').$extension;
}

return substr($path, 0, -strlen($actualExtension)).$extension;
}












public static function isAbsolute($path)
{
if ('' === $path) {
return false;
}

Assert::string($path, 'The path must be a string. Got: %s');


if (false !== ($pos = strpos($path, '://'))) {
$path = substr($path, $pos + 3);
}


if ('/' === $path[0] || '\\' === $path[0]) {
return true;
}


if (strlen($path) > 1 && ctype_alpha($path[0]) && ':' === $path[1]) {

if (2 === strlen($path)) {
return true;
}


if ('/' === $path[2] || '\\' === $path[2]) {
return true;
}
}

return false;
}












public static function isRelative($path)
{
return !static::isAbsolute($path);
}














































public static function makeAbsolute($path, $basePath)
{
Assert::stringNotEmpty($basePath, 'The base path must be a non-empty string. Got: %s');

if (!static::isAbsolute($basePath)) {
throw new InvalidArgumentException(sprintf(
'The base path "%s" is not an absolute path.',
$basePath
));
}

if (static::isAbsolute($path)) {
return static::canonicalize($path);
}

if (false !== ($pos = strpos($basePath, '://'))) {
$scheme = substr($basePath, 0, $pos + 3);
$basePath = substr($basePath, $pos + 3);
} else {
$scheme = '';
}

return $scheme.self::canonicalize(rtrim($basePath, '/\\').'/'.$path);
}



























































public static function makeRelative($path, $basePath)
{
Assert::string($basePath, 'The base path must be a string. Got: %s');

$path = static::canonicalize($path);
$basePath = static::canonicalize($basePath);

list($root, $relativePath) = self::split($path);
list($baseRoot, $relativeBasePath) = self::split($basePath);




if ('' === $root && '' !== $baseRoot) {

if ('' === $relativeBasePath) {
$relativePath = ltrim($relativePath, './\\');
}

return $relativePath;
}



if ('' !== $root && '' === $baseRoot) {
throw new InvalidArgumentException(sprintf(
'The absolute path "%s" cannot be made relative to the '.
'relative path "%s". You should provide an absolute base '.
'path instead.',
$path,
$basePath
));
}


if ($baseRoot && $root !== $baseRoot) {
throw new InvalidArgumentException(sprintf(
'The path "%s" cannot be made relative to "%s", because they '.
'have different roots ("%s" and "%s").',
$path,
$basePath,
$root,
$baseRoot
));
}

if ('' === $relativeBasePath) {
return $relativePath;
}


$parts = explode('/', $relativePath);
$baseParts = explode('/', $relativeBasePath);
$dotDotPrefix = '';



$match = true;

foreach ($baseParts as $i => $basePart) {
if ($match && isset($parts[$i]) && $basePart === $parts[$i]) {
unset($parts[$i]);

continue;
}

$match = false;
$dotDotPrefix .= '../';
}

return rtrim($dotDotPrefix.implode('/', $parts), '/');
}











public static function isLocal($path)
{
Assert::string($path, 'The path must be a string. Got: %s');

return '' !== $path && false === strpos($path, '://');
}













































public static function getLongestCommonBasePath(array $paths)
{
Assert::allString($paths, 'The paths must be strings. Got: %s');

list($bpRoot, $basePath) = self::split(self::canonicalize(reset($paths)));

for (next($paths); null !== key($paths) && '' !== $basePath; next($paths)) {
list($root, $path) = self::split(self::canonicalize(current($paths)));



if ($root !== $bpRoot) {
return null;
}


while (true) {
if ('.' === $basePath) {

$basePath = '';


continue 2;
}



if (0 === strpos($path.'/', $basePath.'/')) {

continue 2;
}

$basePath = dirname($basePath);
}
}

return $bpRoot.$basePath;
}












public static function join($paths)
{
if (!is_array($paths)) {
$paths = func_get_args();
}

Assert::allString($paths, 'The paths must be strings. Got: %s');

$finalPath = null;
$wasScheme = false;

foreach ($paths as $path) {
$path = (string) $path;

if ('' === $path) {
continue;
}

if (null === $finalPath) {

$finalPath = $path;
$wasScheme = (strpos($path, '://') !== false);
continue;
}


if (!in_array(substr($finalPath, -1), array('/', '\\'))) {
$finalPath .= '/';
}


$finalPath .= $wasScheme ? $path : ltrim($path, '/');
$wasScheme = false;
}

if (null === $finalPath) {
return '';
}

return self::canonicalize($finalPath);
}





























public static function isBasePath($basePath, $ofPath)
{
Assert::string($basePath, 'The base path must be a string. Got: %s');

$basePath = self::canonicalize($basePath);
$ofPath = self::canonicalize($ofPath);






return 0 === strpos($ofPath.'/', rtrim($basePath, '/').'/');
}





















private static function split($path)
{
if ('' === $path) {
return array('', '');
}


if (false !== ($pos = strpos($path, '://'))) {
$root = substr($path, 0, $pos + 3);
$path = substr($path, $pos + 3);
} else {
$root = '';
}

$length = strlen($path);


if ('/' === $path[0]) {
$root .= '/';
$path = $length > 1 ? substr($path, 1) : '';
} elseif ($length > 1 && ctype_alpha($path[0]) && ':' === $path[1]) {
if (2 === $length) {

$root .= $path.'/';
$path = '';
} elseif ('/' === $path[2]) {

$root .= substr($path, 0, 3);
$path = $length > 3 ? substr($path, 3) : '';
}
}

return array($root, $path);
}








private static function toLower($str)
{
if (function_exists('mb_strtolower')) {
return mb_strtolower($str, mb_detect_encoding($str));
}

return strtolower($str);
}

private function __construct()
{
}
}
<?php










namespace Webmozart\PathUtil;

use InvalidArgumentException;
use Webmozart\Assert\Assert;











final class Url
{















public static function makeRelative($url, $baseUrl)
{
Assert::string($url, 'The URL must be a string. Got: %s');
Assert::string($baseUrl, 'The base URL must be a string. Got: %s');
Assert::contains($baseUrl, '://', '%s is not an absolute Url.');

list($baseHost, $basePath) = self::split($baseUrl);

if (false === strpos($url, '://')) {
if (0 === strpos($url, '/')) {
$host = $baseHost;
} else {
$host = '';
}
$path = $url;
} else {
list($host, $path) = self::split($url);
}

if ('' !== $host && $host !== $baseHost) {
throw new InvalidArgumentException(sprintf(
'The URL "%s" cannot be made relative to "%s" since their host names are different.',
$host,
$baseHost
));
}

return Path::makeRelative($path, $basePath);
}


















private static function split($url)
{
$pos = strpos($url, '://');
$scheme = substr($url, 0, $pos + 3);
$url = substr($url, $pos + 3);

if (false !== ($pos = strpos($url, '/'))) {
$host = substr($url, 0, $pos);
$url = substr($url, $pos);
} else {

$host = $url;
$url = '/';
}


$root = $scheme.$host;

return array($root, $url);
}
}
<?php

namespace Psr\Log;
















interface LoggerInterface
{








public function emergency($message, array $context = array());












public function alert($message, array $context = array());











public function critical($message, array $context = array());










public function error($message, array $context = array());












public function warning($message, array $context = array());









public function notice($message, array $context = array());











public function info($message, array $context = array());









public function debug($message, array $context = array());












public function log($level, $message, array $context = array());
}
<?php

namespace Psr\Log;




interface LoggerAwareInterface
{







public function setLogger(LoggerInterface $logger);
}
<?php

namespace Psr\Log;








abstract class AbstractLogger implements LoggerInterface
{








public function emergency($message, array $context = array())
{
$this->log(LogLevel::EMERGENCY, $message, $context);
}












public function alert($message, array $context = array())
{
$this->log(LogLevel::ALERT, $message, $context);
}











public function critical($message, array $context = array())
{
$this->log(LogLevel::CRITICAL, $message, $context);
}










public function error($message, array $context = array())
{
$this->log(LogLevel::ERROR, $message, $context);
}












public function warning($message, array $context = array())
{
$this->log(LogLevel::WARNING, $message, $context);
}









public function notice($message, array $context = array())
{
$this->log(LogLevel::NOTICE, $message, $context);
}











public function info($message, array $context = array())
{
$this->log(LogLevel::INFO, $message, $context);
}









public function debug($message, array $context = array())
{
$this->log(LogLevel::DEBUG, $message, $context);
}
}
<?php

namespace Psr\Log;




class LogLevel
{
const EMERGENCY = 'emergency';
const ALERT = 'alert';
const CRITICAL = 'critical';
const ERROR = 'error';
const WARNING = 'warning';
const NOTICE = 'notice';
const INFO = 'info';
const DEBUG = 'debug';
}
<?php

namespace Psr\Log;









trait LoggerTrait
{








public function emergency($message, array $context = array())
{
$this->log(LogLevel::EMERGENCY, $message, $context);
}












public function alert($message, array $context = array())
{
$this->log(LogLevel::ALERT, $message, $context);
}











public function critical($message, array $context = array())
{
$this->log(LogLevel::CRITICAL, $message, $context);
}










public function error($message, array $context = array())
{
$this->log(LogLevel::ERROR, $message, $context);
}












public function warning($message, array $context = array())
{
$this->log(LogLevel::WARNING, $message, $context);
}









public function notice($message, array $context = array())
{
$this->log(LogLevel::NOTICE, $message, $context);
}











public function info($message, array $context = array())
{
$this->log(LogLevel::INFO, $message, $context);
}









public function debug($message, array $context = array())
{
$this->log(LogLevel::DEBUG, $message, $context);
}












abstract public function log($level, $message, array $context = array());
}
<?php

namespace Psr\Log;









class NullLogger extends AbstractLogger
{











public function log($level, $message, array $context = array())
{

}
}
<?php

namespace Psr\Log\Test;

use Psr\Log\AbstractLogger;



















































class TestLogger extends AbstractLogger
{



public $records = [];

public $recordsByLevel = [];




public function log($level, $message, array $context = [])
{
$record = [
'level' => $level,
'message' => $message,
'context' => $context,
];

$this->recordsByLevel[$record['level']][] = $record;
$this->records[] = $record;
}

public function hasRecords($level)
{
return isset($this->recordsByLevel[$level]);
}

public function hasRecord($record, $level)
{
if (is_string($record)) {
$record = ['message' => $record];
}
return $this->hasRecordThatPasses(function ($rec) use ($record) {
if ($rec['message'] !== $record['message']) {
return false;
}
if (isset($record['context']) && $rec['context'] !== $record['context']) {
return false;
}
return true;
}, $level);
}

public function hasRecordThatContains($message, $level)
{
return $this->hasRecordThatPasses(function ($rec) use ($message) {
return strpos($rec['message'], $message) !== false;
}, $level);
}

public function hasRecordThatMatches($regex, $level)
{
return $this->hasRecordThatPasses(function ($rec) use ($regex) {
return preg_match($regex, $rec['message']) > 0;
}, $level);
}

public function hasRecordThatPasses(callable $predicate, $level)
{
if (!isset($this->recordsByLevel[$level])) {
return false;
}
foreach ($this->recordsByLevel[$level] as $i => $rec) {
if (call_user_func($predicate, $rec, $i)) {
return true;
}
}
return false;
}

public function __call($method, $args)
{
if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) {
$genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3];
$level = strtolower($matches[2]);
if (method_exists($this, $genericMethod)) {
$args[] = $level;
return call_user_func_array([$this, $genericMethod], $args);
}
}
throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()');
}

public function reset()
{
$this->records = [];
$this->recordsByLevel = [];
}
}
<?php

namespace Psr\Log\Test;








class DummyTest
{
public function __toString()
{
return 'DummyTest';
}
}
<?php

namespace Psr\Log\Test;

use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;
use PHPUnit\Framework\TestCase;







abstract class LoggerInterfaceTest extends TestCase
{



abstract public function getLogger();










abstract public function getLogs();

public function testImplements()
{
$this->assertInstanceOf('Psr\Log\LoggerInterface', $this->getLogger());
}

/**
@dataProvider
*/
public function testLogsAtAllLevels($level, $message)
{
$logger = $this->getLogger();
$logger->{$level}($message, array('user' => 'Bob'));
$logger->log($level, $message, array('user' => 'Bob'));

$expected = array(
$level.' message of level '.$level.' with context: Bob',
$level.' message of level '.$level.' with context: Bob',
);
$this->assertEquals($expected, $this->getLogs());
}

public function provideLevelsAndMessages()
{
return array(
LogLevel::EMERGENCY => array(LogLevel::EMERGENCY, 'message of level emergency with context: {user}'),
LogLevel::ALERT => array(LogLevel::ALERT, 'message of level alert with context: {user}'),
LogLevel::CRITICAL => array(LogLevel::CRITICAL, 'message of level critical with context: {user}'),
LogLevel::ERROR => array(LogLevel::ERROR, 'message of level error with context: {user}'),
LogLevel::WARNING => array(LogLevel::WARNING, 'message of level warning with context: {user}'),
LogLevel::NOTICE => array(LogLevel::NOTICE, 'message of level notice with context: {user}'),
LogLevel::INFO => array(LogLevel::INFO, 'message of level info with context: {user}'),
LogLevel::DEBUG => array(LogLevel::DEBUG, 'message of level debug with context: {user}'),
);
}

/**
@expectedException
*/
public function testThrowsOnInvalidLevel()
{
$logger = $this->getLogger();
$logger->log('invalid level', 'Foo');
}

public function testContextReplacement()
{
$logger = $this->getLogger();
$logger->info('{Message {nothing} {user} {foo.bar} a}', array('user' => 'Bob', 'foo.bar' => 'Bar'));

$expected = array('info {Message {nothing} Bob Bar a}');
$this->assertEquals($expected, $this->getLogs());
}

public function testObjectCastToString()
{
if (method_exists($this, 'createPartialMock')) {
$dummy = $this->createPartialMock('Psr\Log\Test\DummyTest', array('__toString'));
} else {
$dummy = $this->getMock('Psr\Log\Test\DummyTest', array('__toString'));
}
$dummy->expects($this->once())
->method('__toString')
->will($this->returnValue('DUMMY'));

$this->getLogger()->warning($dummy);

$expected = array('warning DUMMY');
$this->assertEquals($expected, $this->getLogs());
}

public function testContextCanContainAnything()
{
$closed = fopen('php://memory', 'r');
fclose($closed);

$context = array(
'bool' => true,
'null' => null,
'string' => 'Foo',
'int' => 0,
'float' => 0.5,
'nested' => array('with object' => new DummyTest),
'object' => new \DateTime,
'resource' => fopen('php://memory', 'r'),
'closed' => $closed,
);

$this->getLogger()->warning('Crazy context data', $context);

$expected = array('warning Crazy context data');
$this->assertEquals($expected, $this->getLogs());
}

public function testContextExceptionKeyCanBeExceptionOrOtherValues()
{
$logger = $this->getLogger();
$logger->warning('Random message', array('exception' => 'oops'));
$logger->critical('Uncaught Exception!', array('exception' => new \LogicException('Fail')));

$expected = array(
'warning Random message',
'critical Uncaught Exception!'
);
$this->assertEquals($expected, $this->getLogs());
}
}
<?php

namespace Psr\Log;




trait LoggerAwareTrait
{





protected $logger;






public function setLogger(LoggerInterface $logger)
{
$this->logger = $logger;
}
}
<?php

namespace Psr\Log;

class InvalidArgumentException extends \InvalidArgumentException
{
}
<?php

/**
@file

*/

namespace DrupalFinder;

class DrupalFinder
{





private $drupalRoot;






private $composerRoot;








private $vendorDir;

public function locateRoot($start_path)
{
$this->drupalRoot = false;
$this->composerRoot = false;
$this->vendorDir = false;

foreach (array(true, false) as $follow_symlinks) {
$path = $start_path;
if ($follow_symlinks && is_link($path)) {
$path = realpath($path);
}

if ($this->isValidRoot($path)) {
return true;
} else {

while ($path = $this->shiftPathUp($path)) {
if ($follow_symlinks && is_link($path)) {
$path = realpath($path);
}
if ($this->isValidRoot($path)) {
return true;
}
}
}
}

return false;
}










private function shiftPathUp($path)
{
$parent = dirname($path);

return in_array($parent, ['.', $path]) ? false : $parent;
}






protected function isValidRoot($path)
{
if (!empty($path) && is_dir($path) && file_exists($path . '/autoload.php') && file_exists($path . '/' . $this->getComposerFileName())) {


$candidate = 'core/includes/common.inc';
if (file_exists($path . '/' . $candidate) && file_exists($path . '/core/core.services.yml')) {
if (file_exists($path . '/core/misc/drupal.js') || file_exists($path . '/core/assets/js/drupal.js')) {
$this->composerRoot = $path;
$this->drupalRoot = $path;
$this->vendorDir = $this->composerRoot . '/vendor';
}
}
}
if (!empty($path) && is_dir($path) && file_exists($path . '/' . $this->getComposerFileName())) {
$json = json_decode(
file_get_contents($path . '/' . $this->getComposerFileName()),
true
);

if (is_null($json)) {
throw new \Exception('Unable to decode ' . $path . '/' . $this->getComposerFileName());
}

if (is_array($json)) {
if (isset($json['extra']['installer-paths']) && is_array($json['extra']['installer-paths'])) {
foreach ($json['extra']['installer-paths'] as $install_path => $items) {
if (in_array('type:drupal-core', $items) ||
in_array('drupal/core', $items) ||
in_array('drupal/drupal', $items)) {
$this->composerRoot = $path;

if (($install_path == 'core') || ((isset($json['name'])) && ($json['name'] == 'drupal/drupal'))) {
$install_path = '';
} elseif (substr($install_path, -5) == '/core') {
$install_path = substr($install_path, 0, -5);
}
$this->drupalRoot = rtrim($path . '/' . $install_path, '/');
$this->vendorDir = $this->composerRoot . '/vendor';
}
}
}
}
}
if ($this->composerRoot && file_exists($this->composerRoot . '/' . $this->getComposerFileName())) {
$json = json_decode(
file_get_contents($path . '/' . $this->getComposerFileName()),
true
);
if (is_array($json) && isset($json['config']['vendor-dir'])) {
$this->vendorDir = $this->composerRoot . '/' . $json['config']['vendor-dir'];
}
}

return $this->drupalRoot && $this->composerRoot && $this->vendorDir;
}




public function getDrupalRoot()
{
return $this->drupalRoot;
}




public function getComposerRoot()
{
return $this->composerRoot;
}




protected function getComposerFileName()
{
return trim(getenv('COMPOSER')) ?: 'composer.json';
}




public function getVendorDir()
{
return $this->vendorDir;
}
}
<?php

use Composer\XdebugHandler\XdebugHandler;
use DrupalFinder\DrupalFinder;
use Webmozart\PathUtil\Path;
use Humbug\SelfUpdate\Updater;

set_time_limit(0);

$autoloaders = [
__DIR__ . '/../../../autoload.php',
__DIR__ . '/../vendor/autoload.php'
];

foreach ($autoloaders as $file) {
if (file_exists($file)) {
$autoloader = $file;
break;
}
}

if (isset($autoloader)) {
require_once $autoloader;
}
else {
echo 'You must set up the project dependencies using `composer install`' . PHP_EOL;
exit(1);
}

$DRUSH_LAUNCHER_VERSION = '0.10.2';

$ROOT = FALSE;
$DEBUG = FALSE;
$VAR = FALSE;
$VERSION = FALSE;
$VERSION_LAUNCHER = FALSE;
$DRUSH_VERSION = NULL;
$SELF_UPDATE = FALSE;
$FALLBACK = getenv('DRUSH_LAUNCHER_FALLBACK') ?: FALSE;

foreach ($_SERVER['argv'] as $arg) {



if ($VAR) {
$$VAR = "$arg";
$VAR = FALSE;
}
else {
switch ($arg) {
case "-r":
$VAR = "ROOT";
break;
case "--debug":
$DEBUG = TRUE;
break;
case "--version":
$VERSION = TRUE;
break;
case "--drush-launcher-version":
$VERSION_LAUNCHER = TRUE;
break;
case "self-update":
$SELF_UPDATE = TRUE;
break;
}
if (substr($arg, 0, 7) == "--root=") {
$ROOT = substr($arg, 7);
}
}
}

if ($ROOT === FALSE) {
$ROOT = getcwd();
}
else {
$ROOT = Path::canonicalize($ROOT);
}

$drupalFinder = new DrupalFinder();

if ($VERSION || $VERSION_LAUNCHER || $DEBUG || $SELF_UPDATE) {
echo "Drush Launcher Version: {$DRUSH_LAUNCHER_VERSION}" . PHP_EOL;
}

if ($VERSION_LAUNCHER) {
exit(0);
}

if ($SELF_UPDATE) {
if ($DRUSH_LAUNCHER_VERSION === '@' . 'git-version' . '@') {
echo "Automatic update not supported.\n";
exit(1);
}
$updater = new Updater(null, false);
$updater->setStrategy(Updater::STRATEGY_GITHUB);
$updater->getStrategy()->setPackageName('drush/drush-launcher');
$updater->getStrategy()->setPharName('drush.phar');
$updater->getStrategy()->setCurrentLocalVersion($DRUSH_LAUNCHER_VERSION);
try {
$result = $updater->update();
echo $result ? "Updated!\n" : "No update needed!\n";
exit(0);
} catch (\Exception $e) {
echo "Automatic update failed, please download the latest version from https://github.com/drush-ops/drush-launcher/releases\n";
exit(1);
}
}

if ($DEBUG) {
echo "ROOT: " . $ROOT . PHP_EOL;
}

if ($drupalFinder->locateRoot($ROOT)) {
$drupalRoot = $drupalFinder->getDrupalRoot();


$drush_info_file = Path::join($drupalFinder->getVendorDir(), 'drush/drush/drush.info');
if (file_exists($drush_info_file)) {
$drush_info_values = parse_ini_file($drush_info_file);
if (isset($drush_info_values['drush_version'])) {
list($DRUSH_VERSION) = explode('.', $drush_info_values['drush_version'], 2);
$DRUSH_VERSION = (int) $DRUSH_VERSION;
}
}

if ($DRUSH_VERSION === 11 || $DRUSH_VERSION === 10 || $DRUSH_VERSION === 9) {
$xdebug = new XdebugHandler('drush', '--ansi');
$xdebug->check();
unset($xdebug);
}

if ($DEBUG) {
echo "DRUSH VERSION: " . $DRUSH_VERSION . PHP_EOL;
echo "DRUPAL ROOT: " . $drupalRoot . PHP_EOL;
echo "COMPOSER ROOT: " . $drupalFinder->getComposerRoot() . PHP_EOL;
echo "VENDOR ROOT: " . $drupalFinder->getVendorDir() . PHP_EOL;
}

if ($DRUSH_VERSION === 11 || $DRUSH_VERSION === 10 || $DRUSH_VERSION === 9) {
require_once $drupalFinder->getVendorDir() . '/drush/drush/includes/preflight.inc';

exit(drush_main());
}
if ($DRUSH_VERSION === 8) {
if (file_exists($drupalRoot . '/autoload.php')) {
require_once $drupalRoot . '/autoload.php';
}
else {
require_once $drupalFinder->getVendorDir() . '/autoload.php';
}
require_once $drupalFinder->getVendorDir() . '/drush/drush/includes/preflight.inc';
require_once $drupalFinder->getVendorDir() . '/drush/drush/includes/context.inc';
drush_set_option('root', $drupalRoot);
exit(drush_main());
}
if (!$DRUSH_VERSION && !$FALLBACK) {
echo 'The Drush launcher could not find a local Drush in your Drupal site.' . PHP_EOL;
echo 'Please add Drush with Composer to your project.' . PHP_EOL;
echo 'Run \'cd "' . $drupalFinder->getComposerRoot() . '" && composer require drush/drush\'' . PHP_EOL;
exit(1);
}
}

if ($FALLBACK) {
$args = array_map('prepareArgument', $_SERVER['argv']);
$cmd = $FALLBACK . ' ' . implode(' ', $args);
if ($DEBUG) {
echo "Calling fallback: ". $cmd . PHP_EOL;
}
$process = proc_open($cmd, [0 => STDIN, 1 => STDOUT, 2 => STDERR], $pipes);
$proc_status = proc_get_status($process);
$exit_code = proc_close($process);
$exit_code = $proc_status["running"] ? $exit_code : $proc_status["exitcode"];
exit($exit_code);
}

echo 'The Drush launcher could not find a Drupal site to operate on. Please do *one* of the following:' . PHP_EOL;
echo '  - Navigate to any where within your Drupal project and try again.' . PHP_EOL;
echo '  - Add --root=/path/to/drupal so Drush knows where your site is located.' . PHP_EOL;
exit(1);








function prepareArgument($argument) {
static $first = true;
if ($first) {

$first = false;
return;
}
return escapeshellarg($argument);
}
<?php

// autoload.php @generated by Composer

if (PHP_VERSION_ID < 50600) {
    if (!headers_sent()) {
        header('HTTP/1.1 500 Internal Server Error');
    }
    $err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
    if (!ini_get('display_errors')) {
        if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
            fwrite(STDERR, $err);
        } elseif (!headers_sent()) {
            echo $err;
        }
    }
    trigger_error(
        $err,
        E_USER_ERROR
    );
}

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInit23c55aa5b07d538a890070ceeebb6210::getLoader();
<?php

/*
 * This file is part of Composer.
 *
 * (c) Nils Adermann <naderman@naderman.de>
 *     Jordi Boggiano <j.boggiano@seld.be>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Composer\Autoload;

/**
 * ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
 *
 *     $loader = new \Composer\Autoload\ClassLoader();
 *
 *     // register classes with namespaces
 *     $loader->add('Symfony\Component', __DIR__.'/component');
 *     $loader->add('Symfony',           __DIR__.'/framework');
 *
 *     // activate the autoloader
 *     $loader->register();
 *
 *     // to enable searching the include path (eg. for PEAR packages)
 *     $loader->setUseIncludePath(true);
 *
 * In this example, if you try to use a class in the Symfony\Component
 * namespace or one of its children (Symfony\Component\Console for instance),
 * the autoloader will first look for the class under the component/
 * directory, and it will then fallback to the framework/ directory if not
 * found before giving up.
 *
 * This class is loosely based on the Symfony UniversalClassLoader.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 * @author Jordi Boggiano <j.boggiano@seld.be>
 * @see    https://www.php-fig.org/psr/psr-0/
 * @see    https://www.php-fig.org/psr/psr-4/
 */
class ClassLoader
{
    /** @var ?string */
    private $vendorDir;

    // PSR-4
    /**
     * @var array[]
     * @psalm-var array<string, array<string, int>>
     */
    private $prefixLengthsPsr4 = array();
    /**
     * @var array[]
     * @psalm-var array<string, array<int, string>>
     */
    private $prefixDirsPsr4 = array();
    /**
     * @var array[]
     * @psalm-var array<string, string>
     */
    private $fallbackDirsPsr4 = array();

    // PSR-0
    /**
     * @var array[]
     * @psalm-var array<string, array<string, string[]>>
     */
    private $prefixesPsr0 = array();
    /**
     * @var array[]
     * @psalm-var array<string, string>
     */
    private $fallbackDirsPsr0 = array();

    /** @var bool */
    private $useIncludePath = false;

    /**
     * @var string[]
     * @psalm-var array<string, string>
     */
    private $classMap = array();

    /** @var bool */
    private $classMapAuthoritative = false;

    /**
     * @var bool[]
     * @psalm-var array<string, bool>
     */
    private $missingClasses = array();

    /** @var ?string */
    private $apcuPrefix;

    /**
     * @var self[]
     */
    private static $registeredLoaders = array();

    /**
     * @param ?string $vendorDir
     */
    public function __construct($vendorDir = null)
    {
        $this->vendorDir = $vendorDir;
    }

    /**
     * @return string[]
     */
    public function getPrefixes()
    {
        if (!empty($this->prefixesPsr0)) {
            return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
        }

        return array();
    }

    /**
     * @return array[]
     * @psalm-return array<string, array<int, string>>
     */
    public function getPrefixesPsr4()
    {
        return $this->prefixDirsPsr4;
    }

    /**
     * @return array[]
     * @psalm-return array<string, string>
     */
    public function getFallbackDirs()
    {
        return $this->fallbackDirsPsr0;
    }

    /**
     * @return array[]
     * @psalm-return array<string, string>
     */
    public function getFallbackDirsPsr4()
    {
        return $this->fallbackDirsPsr4;
    }

    /**
     * @return string[] Array of classname => path
     * @psalm-return array<string, string>
     */
    public function getClassMap()
    {
        return $this->classMap;
    }

    /**
     * @param string[] $classMap Class to filename map
     * @psalm-param array<string, string> $classMap
     *
     * @return void
     */
    public function addClassMap(array $classMap)
    {
        if ($this->classMap) {
            $this->classMap = array_merge($this->classMap, $classMap);
        } else {
            $this->classMap = $classMap;
        }
    }

    /**
     * Registers a set of PSR-0 directories for a given prefix, either
     * appending or prepending to the ones previously set for this prefix.
     *
     * @param string          $prefix  The prefix
     * @param string[]|string $paths   The PSR-0 root directories
     * @param bool            $prepend Whether to prepend the directories
     *
     * @return void
     */
    public function add($prefix, $paths, $prepend = false)
    {
        if (!$prefix) {
            if ($prepend) {
                $this->fallbackDirsPsr0 = array_merge(
                    (array) $paths,
                    $this->fallbackDirsPsr0
                );
            } else {
                $this->fallbackDirsPsr0 = array_merge(
                    $this->fallbackDirsPsr0,
                    (array) $paths
                );
            }

            return;
        }

        $first = $prefix[0];
        if (!isset($this->prefixesPsr0[$first][$prefix])) {
            $this->prefixesPsr0[$first][$prefix] = (array) $paths;

            return;
        }
        if ($prepend) {
            $this->prefixesPsr0[$first][$prefix] = array_merge(
                (array) $paths,
                $this->prefixesPsr0[$first][$prefix]
            );
        } else {
            $this->prefixesPsr0[$first][$prefix] = array_merge(
                $this->prefixesPsr0[$first][$prefix],
                (array) $paths
            );
        }
    }

    /**
     * Registers a set of PSR-4 directories for a given namespace, either
     * appending or prepending to the ones previously set for this namespace.
     *
     * @param string          $prefix  The prefix/namespace, with trailing '\\'
     * @param string[]|string $paths   The PSR-4 base directories
     * @param bool            $prepend Whether to prepend the directories
     *
     * @throws \InvalidArgumentException
     *
     * @return void
     */
    public function addPsr4($prefix, $paths, $prepend = false)
    {
        if (!$prefix) {
            // Register directories for the root namespace.
            if ($prepend) {
                $this->fallbackDirsPsr4 = array_merge(
                    (array) $paths,
                    $this->fallbackDirsPsr4
                );
            } else {
                $this->fallbackDirsPsr4 = array_merge(
                    $this->fallbackDirsPsr4,
                    (array) $paths
                );
            }
        } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
            // Register directories for a new namespace.
            $length = strlen($prefix);
            if ('\\' !== $prefix[$length - 1]) {
                throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
            }
            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
            $this->prefixDirsPsr4[$prefix] = (array) $paths;
        } elseif ($prepend) {
            // Prepend directories for an already registered namespace.
            $this->prefixDirsPsr4[$prefix] = array_merge(
                (array) $paths,
                $this->prefixDirsPsr4[$prefix]
            );
        } else {
            // Append directories for an already registered namespace.
            $this->prefixDirsPsr4[$prefix] = array_merge(
                $this->prefixDirsPsr4[$prefix],
                (array) $paths
            );
        }
    }

    /**
     * Registers a set of PSR-0 directories for a given prefix,
     * replacing any others previously set for this prefix.
     *
     * @param string          $prefix The prefix
     * @param string[]|string $paths  The PSR-0 base directories
     *
     * @return void
     */
    public function set($prefix, $paths)
    {
        if (!$prefix) {
            $this->fallbackDirsPsr0 = (array) $paths;
        } else {
            $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
        }
    }

    /**
     * Registers a set of PSR-4 directories for a given namespace,
     * replacing any others previously set for this namespace.
     *
     * @param string          $prefix The prefix/namespace, with trailing '\\'
     * @param string[]|string $paths  The PSR-4 base directories
     *
     * @throws \InvalidArgumentException
     *
     * @return void
     */
    public function setPsr4($prefix, $paths)
    {
        if (!$prefix) {
            $this->fallbackDirsPsr4 = (array) $paths;
        } else {
            $length = strlen($prefix);
            if ('\\' !== $prefix[$length - 1]) {
                throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
            }
            $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
            $this->prefixDirsPsr4[$prefix] = (array) $paths;
        }
    }

    /**
     * Turns on searching the include path for class files.
     *
     * @param bool $useIncludePath
     *
     * @return void
     */
    public function setUseIncludePath($useIncludePath)
    {
        $this->useIncludePath = $useIncludePath;
    }

    /**
     * Can be used to check if the autoloader uses the include path to check
     * for classes.
     *
     * @return bool
     */
    public function getUseIncludePath()
    {
        return $this->useIncludePath;
    }

    /**
     * Turns off searching the prefix and fallback directories for classes
     * that have not been registered with the class map.
     *
     * @param bool $classMapAuthoritative
     *
     * @return void
     */
    public function setClassMapAuthoritative($classMapAuthoritative)
    {
        $this->classMapAuthoritative = $classMapAuthoritative;
    }

    /**
     * Should class lookup fail if not found in the current class map?
     *
     * @return bool
     */
    public function isClassMapAuthoritative()
    {
        return $this->classMapAuthoritative;
    }

    /**
     * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
     *
     * @param string|null $apcuPrefix
     *
     * @return void
     */
    public function setApcuPrefix($apcuPrefix)
    {
        $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
    }

    /**
     * The APCu prefix in use, or null if APCu caching is not enabled.
     *
     * @return string|null
     */
    public function getApcuPrefix()
    {
        return $this->apcuPrefix;
    }

    /**
     * Registers this instance as an autoloader.
     *
     * @param bool $prepend Whether to prepend the autoloader or not
     *
     * @return void
     */
    public function register($prepend = false)
    {
        spl_autoload_register(array($this, 'loadClass'), true, $prepend);

        if (null === $this->vendorDir) {
            return;
        }

        if ($prepend) {
            self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
        } else {
            unset(self::$registeredLoaders[$this->vendorDir]);
            self::$registeredLoaders[$this->vendorDir] = $this;
        }
    }

    /**
     * Unregisters this instance as an autoloader.
     *
     * @return void
     */
    public function unregister()
    {
        spl_autoload_unregister(array($this, 'loadClass'));

        if (null !== $this->vendorDir) {
            unset(self::$registeredLoaders[$this->vendorDir]);
        }
    }

    /**
     * Loads the given class or interface.
     *
     * @param  string    $class The name of the class
     * @return true|null True if loaded, null otherwise
     */
    public function loadClass($class)
    {
        if ($file = $this->findFile($class)) {
            includeFile($file);

            return true;
        }

        return null;
    }

    /**
     * Finds the path to the file where the class is defined.
     *
     * @param string $class The name of the class
     *
     * @return string|false The path if found, false otherwise
     */
    public function findFile($class)
    {
        // class map lookup
        if (isset($this->classMap[$class])) {
            return $this->classMap[$class];
        }
        if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) {
            return false;
        }
        if (null !== $this->apcuPrefix) {
            $file = apcu_fetch($this->apcuPrefix.$class, $hit);
            if ($hit) {
                return $file;
            }
        }

        $file = $this->findFileWithExtension($class, '.php');

        // Search for Hack files if we are running on HHVM
        if (false === $file && defined('HHVM_VERSION')) {
            $file = $this->findFileWithExtension($class, '.hh');
        }

        if (null !== $this->apcuPrefix) {
            apcu_add($this->apcuPrefix.$class, $file);
        }

        if (false === $file) {
            // Remember that this class does not exist.
            $this->missingClasses[$class] = true;
        }

        return $file;
    }

    /**
     * Returns the currently registered loaders indexed by their corresponding vendor directories.
     *
     * @return self[]
     */
    public static function getRegisteredLoaders()
    {
        return self::$registeredLoaders;
    }

    /**
     * @param  string       $class
     * @param  string       $ext
     * @return string|false
     */
    private function findFileWithExtension($class, $ext)
    {
        // PSR-4 lookup
        $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;

        $first = $class[0];
        if (isset($this->prefixLengthsPsr4[$first])) {
            $subPath = $class;
            while (false !== $lastPos = strrpos($subPath, '\\')) {
                $subPath = substr($subPath, 0, $lastPos);
                $search = $subPath . '\\';
                if (isset($this->prefixDirsPsr4[$search])) {
                    $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
                    foreach ($this->prefixDirsPsr4[$search] as $dir) {
                        if (file_exists($file = $dir . $pathEnd)) {
                            return $file;
                        }
                    }
                }
            }
        }

        // PSR-4 fallback dirs
        foreach ($this->fallbackDirsPsr4 as $dir) {
            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) {
                return $file;
            }
        }

        // PSR-0 lookup
        if (false !== $pos = strrpos($class, '\\')) {
            // namespaced class name
            $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
                . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
        } else {
            // PEAR-like class name
            $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
        }

        if (isset($this->prefixesPsr0[$first])) {
            foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) {
                if (0 === strpos($class, $prefix)) {
                    foreach ($dirs as $dir) {
                        if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
                            return $file;
                        }
                    }
                }
            }
        }

        // PSR-0 fallback dirs
        foreach ($this->fallbackDirsPsr0 as $dir) {
            if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) {
                return $file;
            }
        }

        // PSR-0 include paths.
        if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) {
            return $file;
        }

        return false;
    }
}

/**
 * Scope isolated include.
 *
 * Prevents access to $this/self from included files.
 *
 * @param  string $file
 * @return void
 * @private
 */
function includeFile($file)
{
    include $file;
}
<?php

// autoload_classmap.php @generated by Composer

$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);

return array(
    'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
    'HumbugBox420\\Composer\\Semver\\Comparator' => $vendorDir . '/composer/semver/src/Comparator.php',
    'HumbugBox420\\Composer\\Semver\\CompilingMatcher' => $vendorDir . '/composer/semver/src/CompilingMatcher.php',
    'HumbugBox420\\Composer\\Semver\\Constraint\\Bound' => $vendorDir . '/composer/semver/src/Constraint/Bound.php',
    'HumbugBox420\\Composer\\Semver\\Constraint\\Constraint' => $vendorDir . '/composer/semver/src/Constraint/Constraint.php',
    'HumbugBox420\\Composer\\Semver\\Constraint\\ConstraintInterface' => $vendorDir . '/composer/semver/src/Constraint/ConstraintInterface.php',
    'HumbugBox420\\Composer\\Semver\\Constraint\\MatchAllConstraint' => $vendorDir . '/composer/semver/src/Constraint/MatchAllConstraint.php',
    'HumbugBox420\\Composer\\Semver\\Constraint\\MatchNoneConstraint' => $vendorDir . '/composer/semver/src/Constraint/MatchNoneConstraint.php',
    'HumbugBox420\\Composer\\Semver\\Constraint\\MultiConstraint' => $vendorDir . '/composer/semver/src/Constraint/MultiConstraint.php',
    'HumbugBox420\\Composer\\Semver\\Interval' => $vendorDir . '/composer/semver/src/Interval.php',
    'HumbugBox420\\Composer\\Semver\\Intervals' => $vendorDir . '/composer/semver/src/Intervals.php',
    'HumbugBox420\\Composer\\Semver\\Semver' => $vendorDir . '/composer/semver/src/Semver.php',
    'HumbugBox420\\Composer\\Semver\\VersionParser' => $vendorDir . '/composer/semver/src/VersionParser.php',
    'HumbugBox420\\KevinGH\\RequirementChecker\\Checker' => $baseDir . '/src/Checker.php',
    'HumbugBox420\\KevinGH\\RequirementChecker\\IO' => $baseDir . '/src/IO.php',
    'HumbugBox420\\KevinGH\\RequirementChecker\\IsExtensionFulfilled' => $baseDir . '/src/IsExtensionFulfilled.php',
    'HumbugBox420\\KevinGH\\RequirementChecker\\IsFulfilled' => $baseDir . '/src/IsFulfilled.php',
    'HumbugBox420\\KevinGH\\RequirementChecker\\IsPhpVersionFulfilled' => $baseDir . '/src/IsPhpVersionFulfilled.php',
    'HumbugBox420\\KevinGH\\RequirementChecker\\Printer' => $baseDir . '/src/Printer.php',
    'HumbugBox420\\KevinGH\\RequirementChecker\\Requirement' => $baseDir . '/src/Requirement.php',
    'HumbugBox420\\KevinGH\\RequirementChecker\\RequirementCollection' => $baseDir . '/src/RequirementCollection.php',
    'HumbugBox420\\KevinGH\\RequirementChecker\\Terminal' => $baseDir . '/src/Terminal.php',
);
<?php

namespace HumbugBox420;

return array('root' => array('name' => 'humbug/requirement-checker', 'pretty_version' => '4.2.0', 'version' => '4.2.0.0', 'reference' => 'afc3a4742c2a3a777e521af5e8e784a14e5c5958', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \true), 'versions' => array('composer/semver' => array('pretty_version' => '3.3.2', 'version' => '3.3.2.0', 'reference' => '3953f23262f2bff1919fc82183ad9acb13ff62c9', 'type' => 'library', 'install_path' => __DIR__ . '/./semver', 'aliases' => array(), 'dev_requirement' => \false), 'doctrine/instantiator' => array('pretty_version' => '1.4.1', 'version' => '1.4.1.0', 'reference' => '10dcfce151b967d20fde1b34ae6640712c3891bc', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/instantiator', 'aliases' => array(), 'dev_requirement' => \true), 'humbug/requirement-checker' => array('pretty_version' => '4.2.0', 'version' => '4.2.0.0', 'reference' => 'afc3a4742c2a3a777e521af5e8e784a14e5c5958', 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'myclabs/deep-copy' => array('pretty_version' => '1.11.0', 'version' => '1.11.0.0', 'reference' => '14daed4296fae74d9e3201d2c4925d1acb7aa614', 'type' => 'library', 'install_path' => __DIR__ . '/../myclabs/deep-copy', 'aliases' => array(), 'dev_requirement' => \true), 'nikic/php-parser' => array('pretty_version' => 'v4.14.0', 'version' => '4.14.0.0', 'reference' => '34bea19b6e03d8153165d8f30bba4c3be86184c1', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'dev_requirement' => \true), 'phar-io/manifest' => array('pretty_version' => '2.0.3', 'version' => '2.0.3.0', 'reference' => '97803eca37d319dfa7826cc2437fc020857acb53', 'type' => 'library', 'install_path' => __DIR__ . '/../phar-io/manifest', 'aliases' => array(), 'dev_requirement' => \true), 'phar-io/version' => array('pretty_version' => '3.2.1', 'version' => '3.2.1.0', 'reference' => '4f7fd7836c6f332bb2933569e566a0d6c4cbed74', 'type' => 'library', 'install_path' => __DIR__ . '/../phar-io/version', 'aliases' => array(), 'dev_requirement' => \true), 'phpdocumentor/reflection-common' => array('pretty_version' => '2.2.0', 'version' => '2.2.0.0', 'reference' => '1d01c49d4ed62f25aa84a747ad35d5a16924662b', 'type' => 'library', 'install_path' => __DIR__ . '/../phpdocumentor/reflection-common', 'aliases' => array(), 'dev_requirement' => \true), 'phpdocumentor/reflection-docblock' => array('pretty_version' => '5.3.0', 'version' => '5.3.0.0', 'reference' => '622548b623e81ca6d78b721c5e029f4ce664f170', 'type' => 'library', 'install_path' => __DIR__ . '/../phpdocumentor/reflection-docblock', 'aliases' => array(), 'dev_requirement' => \true), 'phpdocumentor/type-resolver' => array('pretty_version' => '1.6.1', 'version' => '1.6.1.0', 'reference' => '77a32518733312af16a44300404e945338981de3', 'type' => 'library', 'install_path' => __DIR__ . '/../phpdocumentor/type-resolver', 'aliases' => array(), 'dev_requirement' => \true), 'phpspec/prophecy' => array('pretty_version' => 'v1.15.0', 'version' => '1.15.0.0', 'reference' => 'bbcd7380b0ebf3961ee21409db7b38bc31d69a13', 'type' => 'library', 'install_path' => __DIR__ . '/../phpspec/prophecy', 'aliases' => array(), 'dev_requirement' => \true), 'phpunit/php-code-coverage' => array('pretty_version' => '9.2.15', 'version' => '9.2.15.0', 'reference' => '2e9da11878c4202f97915c1cb4bb1ca318a63f5f', 'type' => 'library', 'install_path' => __DIR__ . '/../phpunit/php-code-coverage', 'aliases' => array(), 'dev_requirement' => \true), 'phpunit/php-file-iterator' => array('pretty_version' => '3.0.6', 'version' => '3.0.6.0', 'reference' => 'cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf', 'type' => 'library', 'install_path' => __DIR__ . '/../phpunit/php-file-iterator', 'aliases' => array(), 'dev_requirement' => \true), 'phpunit/php-invoker' => array('pretty_version' => '3.1.1', 'version' => '3.1.1.0', 'reference' => '5a10147d0aaf65b58940a0b72f71c9ac0423cc67', 'type' => 'library', 'install_path' => __DIR__ . '/../phpunit/php-invoker', 'aliases' => array(), 'dev_requirement' => \true), 'phpunit/php-text-template' => array('pretty_version' => '2.0.4', 'version' => '2.0.4.0', 'reference' => '5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28', 'type' => 'library', 'install_path' => __DIR__ . '/../phpunit/php-text-template', 'aliases' => array(), 'dev_requirement' => \true), 'phpunit/php-timer' => array('pretty_version' => '5.0.3', 'version' => '5.0.3.0', 'reference' => '5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2', 'type' => 'library', 'install_path' => __DIR__ . '/../phpunit/php-timer', 'aliases' => array(), 'dev_requirement' => \true), 'phpunit/phpunit' => array('pretty_version' => '9.5.21', 'version' => '9.5.21.0', 'reference' => '0e32b76be457de00e83213528f6bb37e2a38fcb1', 'type' => 'library', 'install_path' => __DIR__ . '/../phpunit/phpunit', 'aliases' => array(), 'dev_requirement' => \true), 'sebastian/cli-parser' => array('pretty_version' => '1.0.1', 'version' => '1.0.1.0', 'reference' => '442e7c7e687e42adc03470c7b668bc4b2402c0b2', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/cli-parser', 'aliases' => array(), 'dev_requirement' => \true), 'sebastian/code-unit' => array('pretty_version' => '1.0.8', 'version' => '1.0.8.0', 'reference' => '1fc9f64c0927627ef78ba436c9b17d967e68e120', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/code-unit', 'aliases' => array(), 'dev_requirement' => \true), 'sebastian/code-unit-reverse-lookup' => array('pretty_version' => '2.0.3', 'version' => '2.0.3.0', 'reference' => 'ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/code-unit-reverse-lookup', 'aliases' => array(), 'dev_requirement' => \true), 'sebastian/comparator' => array('pretty_version' => '4.0.6', 'version' => '4.0.6.0', 'reference' => '55f4261989e546dc112258c7a75935a81a7ce382', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/comparator', 'aliases' => array(), 'dev_requirement' => \true), 'sebastian/complexity' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'reference' => '739b35e53379900cc9ac327b2147867b8b6efd88', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/complexity', 'aliases' => array(), 'dev_requirement' => \true), 'sebastian/diff' => array('pretty_version' => '4.0.4', 'version' => '4.0.4.0', 'reference' => '3461e3fccc7cfdfc2720be910d3bd73c69be590d', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'dev_requirement' => \true), 'sebastian/environment' => array('pretty_version' => '5.1.4', 'version' => '5.1.4.0', 'reference' => '1b5dff7bb151a4db11d49d90e5408e4e938270f7', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/environment', 'aliases' => array(), 'dev_requirement' => \true), 'sebastian/exporter' => array('pretty_version' => '4.0.4', 'version' => '4.0.4.0', 'reference' => '65e8b7db476c5dd267e65eea9cab77584d3cfff9', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/exporter', 'aliases' => array(), 'dev_requirement' => \true), 'sebastian/global-state' => array('pretty_version' => '5.0.5', 'version' => '5.0.5.0', 'reference' => '0ca8db5a5fc9c8646244e629625ac486fa286bf2', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/global-state', 'aliases' => array(), 'dev_requirement' => \true), 'sebastian/lines-of-code' => array('pretty_version' => '1.0.3', 'version' => '1.0.3.0', 'reference' => 'c1c2e997aa3146983ed888ad08b15470a2e22ecc', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/lines-of-code', 'aliases' => array(), 'dev_requirement' => \true), 'sebastian/object-enumerator' => array('pretty_version' => '4.0.4', 'version' => '4.0.4.0', 'reference' => '5c9eeac41b290a3712d88851518825ad78f45c71', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/object-enumerator', 'aliases' => array(), 'dev_requirement' => \true), 'sebastian/object-reflector' => array('pretty_version' => '2.0.4', 'version' => '2.0.4.0', 'reference' => 'b4f479ebdbf63ac605d183ece17d8d7fe49c15c7', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/object-reflector', 'aliases' => array(), 'dev_requirement' => \true), 'sebastian/recursion-context' => array('pretty_version' => '4.0.4', 'version' => '4.0.4.0', 'reference' => 'cd9d8cf3c5804de4341c283ed787f099f5506172', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/recursion-context', 'aliases' => array(), 'dev_requirement' => \true), 'sebastian/resource-operations' => array('pretty_version' => '3.0.3', 'version' => '3.0.3.0', 'reference' => '0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/resource-operations', 'aliases' => array(), 'dev_requirement' => \true), 'sebastian/type' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'b233b84bc4465aff7b57cf1c4bc75c86d00d6dad', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/type', 'aliases' => array(), 'dev_requirement' => \true), 'sebastian/version' => array('pretty_version' => '3.0.2', 'version' => '3.0.2.0', 'reference' => 'c6c1022351a901512170118436c764e473f6de8c', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/version', 'aliases' => array(), 'dev_requirement' => \true), 'theseer/tokenizer' => array('pretty_version' => '1.2.1', 'version' => '1.2.1.0', 'reference' => '34a41e998c2183e22995f158c581e7b5e755ab9e', 'type' => 'library', 'install_path' => __DIR__ . '/../theseer/tokenizer', 'aliases' => array(), 'dev_requirement' => \true), 'webmozart/assert' => array('pretty_version' => '1.11.0', 'version' => '1.11.0.0', 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', 'type' => 'library', 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), 'dev_requirement' => \true)));
<?php

// autoload_static.php @generated by Composer

namespace Composer\Autoload;

class ComposerStaticInit23c55aa5b07d538a890070ceeebb6210
{
    public static $prefixLengthsPsr4 = array (
        'H' => 
        array (
            'HumbugBox420\\KevinGH\\RequirementChecker\\' => 40,
            'HumbugBox420\\Composer\\Semver\\' => 29,
        ),
    );

    public static $prefixDirsPsr4 = array (
        'HumbugBox420\\KevinGH\\RequirementChecker\\' => 
        array (
            0 => __DIR__ . '/../..' . '/src',
        ),
        'HumbugBox420\\Composer\\Semver\\' => 
        array (
            0 => __DIR__ . '/..' . '/composer/semver/src',
        ),
    );

    public static $classMap = array (
        'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
        'HumbugBox420\\Composer\\Semver\\Comparator' => __DIR__ . '/..' . '/composer/semver/src/Comparator.php',
        'HumbugBox420\\Composer\\Semver\\CompilingMatcher' => __DIR__ . '/..' . '/composer/semver/src/CompilingMatcher.php',
        'HumbugBox420\\Composer\\Semver\\Constraint\\Bound' => __DIR__ . '/..' . '/composer/semver/src/Constraint/Bound.php',
        'HumbugBox420\\Composer\\Semver\\Constraint\\Constraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/Constraint.php',
        'HumbugBox420\\Composer\\Semver\\Constraint\\ConstraintInterface' => __DIR__ . '/..' . '/composer/semver/src/Constraint/ConstraintInterface.php',
        'HumbugBox420\\Composer\\Semver\\Constraint\\MatchAllConstraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/MatchAllConstraint.php',
        'HumbugBox420\\Composer\\Semver\\Constraint\\MatchNoneConstraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/MatchNoneConstraint.php',
        'HumbugBox420\\Composer\\Semver\\Constraint\\MultiConstraint' => __DIR__ . '/..' . '/composer/semver/src/Constraint/MultiConstraint.php',
        'HumbugBox420\\Composer\\Semver\\Interval' => __DIR__ . '/..' . '/composer/semver/src/Interval.php',
        'HumbugBox420\\Composer\\Semver\\Intervals' => __DIR__ . '/..' . '/composer/semver/src/Intervals.php',
        'HumbugBox420\\Composer\\Semver\\Semver' => __DIR__ . '/..' . '/composer/semver/src/Semver.php',
        'HumbugBox420\\Composer\\Semver\\VersionParser' => __DIR__ . '/..' . '/composer/semver/src/VersionParser.php',
        'HumbugBox420\\KevinGH\\RequirementChecker\\Checker' => __DIR__ . '/../..' . '/src/Checker.php',
        'HumbugBox420\\KevinGH\\RequirementChecker\\IO' => __DIR__ . '/../..' . '/src/IO.php',
        'HumbugBox420\\KevinGH\\RequirementChecker\\IsExtensionFulfilled' => __DIR__ . '/../..' . '/src/IsExtensionFulfilled.php',
        'HumbugBox420\\KevinGH\\RequirementChecker\\IsFulfilled' => __DIR__ . '/../..' . '/src/IsFulfilled.php',
        'HumbugBox420\\KevinGH\\RequirementChecker\\IsPhpVersionFulfilled' => __DIR__ . '/../..' . '/src/IsPhpVersionFulfilled.php',
        'HumbugBox420\\KevinGH\\RequirementChecker\\Printer' => __DIR__ . '/../..' . '/src/Printer.php',
        'HumbugBox420\\KevinGH\\RequirementChecker\\Requirement' => __DIR__ . '/../..' . '/src/Requirement.php',
        'HumbugBox420\\KevinGH\\RequirementChecker\\RequirementCollection' => __DIR__ . '/../..' . '/src/RequirementCollection.php',
        'HumbugBox420\\KevinGH\\RequirementChecker\\Terminal' => __DIR__ . '/../..' . '/src/Terminal.php',
    );

    public static function getInitializer(ClassLoader $loader)
    {
        return \Closure::bind(function () use ($loader) {
            $loader->prefixLengthsPsr4 = ComposerStaticInit23c55aa5b07d538a890070ceeebb6210::$prefixLengthsPsr4;
            $loader->prefixDirsPsr4 = ComposerStaticInit23c55aa5b07d538a890070ceeebb6210::$prefixDirsPsr4;
            $loader->classMap = ComposerStaticInit23c55aa5b07d538a890070ceeebb6210::$classMap;

        }, null, ClassLoader::class);
    }
}
<?php

// autoload_real.php @generated by Composer

class ComposerAutoloaderInit23c55aa5b07d538a890070ceeebb6210
{
    private static $loader;

    public static function loadClassLoader($class)
    {
        if ('Composer\Autoload\ClassLoader' === $class) {
            require __DIR__ . '/ClassLoader.php';
        }
    }

    /**
     * @return \Composer\Autoload\ClassLoader
     */
    public static function getLoader()
    {
        if (null !== self::$loader) {
            return self::$loader;
        }

        spl_autoload_register(array('ComposerAutoloaderInit23c55aa5b07d538a890070ceeebb6210', 'loadClassLoader'), true, true);
        self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
        spl_autoload_unregister(array('ComposerAutoloaderInit23c55aa5b07d538a890070ceeebb6210', 'loadClassLoader'));

        require __DIR__ . '/autoload_static.php';
        call_user_func(\Composer\Autoload\ComposerStaticInit23c55aa5b07d538a890070ceeebb6210::getInitializer($loader));

        $loader->setClassMapAuthoritative(true);
        $loader->register(true);

        return $loader;
    }
}

Copyright (c) Nils Adermann, Jordi Boggiano

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

<?php

// autoload_psr4.php @generated by Composer

$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);

return array(
    'HumbugBox420\\KevinGH\\RequirementChecker\\' => array($baseDir . '/src'),
    'HumbugBox420\\Composer\\Semver\\' => array($vendorDir . '/composer/semver/src'),
);
<?php

namespace HumbugBox420\Composer\Semver;

use HumbugBox420\Composer\Semver\Constraint\Constraint;
use HumbugBox420\Composer\Semver\Constraint\ConstraintInterface;
use HumbugBox420\Composer\Semver\Constraint\MatchAllConstraint;
use HumbugBox420\Composer\Semver\Constraint\MatchNoneConstraint;
use HumbugBox420\Composer\Semver\Constraint\MultiConstraint;
class Intervals
{
    /**
    @phpstan-var
    */
    private static $intervalsCache = array();
    /**
    @phpstan-var
    */
    private static $opSortOrder = array('>=' => -3, '<' => -2, '>' => 2, '<=' => 3);
    public static function clear()
    {
        self::$intervalsCache = array();
    }
    public static function isSubsetOf(ConstraintInterface $candidate, ConstraintInterface $constraint)
    {
        if ($constraint instanceof MatchAllConstraint) {
            return \true;
        }
        if ($candidate instanceof MatchNoneConstraint || $constraint instanceof MatchNoneConstraint) {
            return \false;
        }
        $intersectionIntervals = self::get(new MultiConstraint(array($candidate, $constraint), \true));
        $candidateIntervals = self::get($candidate);
        if (\count($intersectionIntervals['numeric']) !== \count($candidateIntervals['numeric'])) {
            return \false;
        }
        foreach ($intersectionIntervals['numeric'] as $index => $interval) {
            if (!isset($candidateIntervals['numeric'][$index])) {
                return \false;
            }
            if ((string) $candidateIntervals['numeric'][$index]->getStart() !== (string) $interval->getStart()) {
                return \false;
            }
            if ((string) $candidateIntervals['numeric'][$index]->getEnd() !== (string) $interval->getEnd()) {
                return \false;
            }
        }
        if ($intersectionIntervals['branches']['exclude'] !== $candidateIntervals['branches']['exclude']) {
            return \false;
        }
        if (\count($intersectionIntervals['branches']['names']) !== \count($candidateIntervals['branches']['names'])) {
            return \false;
        }
        foreach ($intersectionIntervals['branches']['names'] as $index => $name) {
            if ($name !== $candidateIntervals['branches']['names'][$index]) {
                return \false;
            }
        }
        return \true;
    }
    public static function haveIntersections(ConstraintInterface $a, ConstraintInterface $b)
    {
        if ($a instanceof MatchAllConstraint || $b instanceof MatchAllConstraint) {
            return \true;
        }
        if ($a instanceof MatchNoneConstraint || $b instanceof MatchNoneConstraint) {
            return \false;
        }
        $intersectionIntervals = self::generateIntervals(new MultiConstraint(array($a, $b), \true), \true);
        return \count($intersectionIntervals['numeric']) > 0 || $intersectionIntervals['branches']['exclude'] || \count($intersectionIntervals['branches']['names']) > 0;
    }
    public static function compactConstraint(ConstraintInterface $constraint)
    {
        if (!$constraint instanceof MultiConstraint) {
            return $constraint;
        }
        $intervals = self::generateIntervals($constraint);
        $constraints = array();
        $hasNumericMatchAll = \false;
        if (\count($intervals['numeric']) === 1 && (string) $intervals['numeric'][0]->getStart() === (string) Interval::fromZero() && (string) $intervals['numeric'][0]->getEnd() === (string) Interval::untilPositiveInfinity()) {
            $constraints[] = $intervals['numeric'][0]->getStart();
            $hasNumericMatchAll = \true;
        } else {
            $unEqualConstraints = array();
            for ($i = 0, $count = \count($intervals['numeric']); $i < $count; $i++) {
                $interval = $intervals['numeric'][$i];
                if ($interval->getEnd()->getOperator() === '<' && $i + 1 < $count) {
                    $nextInterval = $intervals['numeric'][$i + 1];
                    if ($interval->getEnd()->getVersion() === $nextInterval->getStart()->getVersion() && $nextInterval->getStart()->getOperator() === '>') {
                        if (\count($unEqualConstraints) === 0 && (string) $interval->getStart() !== (string) Interval::fromZero()) {
                            $unEqualConstraints[] = $interval->getStart();
                        }
                        $unEqualConstraints[] = new Constraint('!=', $interval->getEnd()->getVersion());
                        continue;
                    }
                }
                if (\count($unEqualConstraints) > 0) {
                    if ((string) $interval->getEnd() !== (string) Interval::untilPositiveInfinity()) {
                        $unEqualConstraints[] = $interval->getEnd();
                    }
                    if (\count($unEqualConstraints) > 1) {
                        $constraints[] = new MultiConstraint($unEqualConstraints, \true);
                    } else {
                        $constraints[] = $unEqualConstraints[0];
                    }
                    $unEqualConstraints = array();
                    continue;
                }
                if ($interval->getStart()->getVersion() === $interval->getEnd()->getVersion() && $interval->getStart()->getOperator() === '>=' && $interval->getEnd()->getOperator() === '<=') {
                    $constraints[] = new Constraint('==', $interval->getStart()->getVersion());
                    continue;
                }
                if ((string) $interval->getStart() === (string) Interval::fromZero()) {
                    $constraints[] = $interval->getEnd();
                } elseif ((string) $interval->getEnd() === (string) Interval::untilPositiveInfinity()) {
                    $constraints[] = $interval->getStart();
                } else {
                    $constraints[] = new MultiConstraint(array($interval->getStart(), $interval->getEnd()), \true);
                }
            }
        }
        $devConstraints = array();
        if (0 === \count($intervals['branches']['names'])) {
            if ($intervals['branches']['exclude']) {
                if ($hasNumericMatchAll) {
                    return new MatchAllConstraint();
                }
            }
        } else {
            foreach ($intervals['branches']['names'] as $branchName) {
                if ($intervals['branches']['exclude']) {
                    $devConstraints[] = new Constraint('!=', $branchName);
                } else {
                    $devConstraints[] = new Constraint('==', $branchName);
                }
            }
            if ($intervals['branches']['exclude']) {
                if (\count($constraints) > 1) {
                    return new MultiConstraint(\array_merge(array(new MultiConstraint($constraints, \false)), $devConstraints), \true);
                }
                if (\count($constraints) === 1 && (string) $constraints[0] === (string) Interval::fromZero()) {
                    if (\count($devConstraints) > 1) {
                        return new MultiConstraint($devConstraints, \true);
                    }
                    return $devConstraints[0];
                }
                return new MultiConstraint(\array_merge($constraints, $devConstraints), \true);
            }
            $constraints = \array_merge($constraints, $devConstraints);
        }
        if (\count($constraints) > 1) {
            return new MultiConstraint($constraints, \false);
        }
        if (\count($constraints) === 1) {
            return $constraints[0];
        }
        return new MatchNoneConstraint();
    }
    /**
    @phpstan-return
    */
    public static function get(ConstraintInterface $constraint)
    {
        $key = (string) $constraint;
        if (!isset(self::$intervalsCache[$key])) {
            self::$intervalsCache[$key] = self::generateIntervals($constraint);
        }
        return self::$intervalsCache[$key];
    }
    /**
    @phpstan-return
    */
    private static function generateIntervals(ConstraintInterface $constraint, $stopOnFirstValidInterval = \false)
    {
        if ($constraint instanceof MatchAllConstraint) {
            return array('numeric' => array(new Interval(Interval::fromZero(), Interval::untilPositiveInfinity())), 'branches' => Interval::anyDev());
        }
        if ($constraint instanceof MatchNoneConstraint) {
            return array('numeric' => array(), 'branches' => array('names' => array(), 'exclude' => \false));
        }
        if ($constraint instanceof Constraint) {
            return self::generateSingleConstraintIntervals($constraint);
        }
        if (!$constraint instanceof MultiConstraint) {
            throw new \UnexpectedValueException('The constraint passed in should be an MatchAllConstraint, Constraint or MultiConstraint instance, got ' . \get_class($constraint) . '.');
        }
        $constraints = $constraint->getConstraints();
        $numericGroups = array();
        $constraintBranches = array();
        foreach ($constraints as $c) {
            $res = self::get($c);
            $numericGroups[] = $res['numeric'];
            $constraintBranches[] = $res['branches'];
        }
        if ($constraint->isDisjunctive()) {
            $branches = Interval::noDev();
            foreach ($constraintBranches as $b) {
                if ($b['exclude']) {
                    if ($branches['exclude']) {
                        $branches['names'] = \array_intersect($branches['names'], $b['names']);
                    } else {
                        $branches['exclude'] = \true;
                        $branches['names'] = \array_diff($b['names'], $branches['names']);
                    }
                } else {
                    if ($branches['exclude']) {
                        $branches['names'] = \array_diff($branches['names'], $b['names']);
                    } else {
                        $branches['names'] = \array_merge($branches['names'], $b['names']);
                    }
                }
            }
        } else {
            $branches = Interval::anyDev();
            foreach ($constraintBranches as $b) {
                if ($b['exclude']) {
                    if ($branches['exclude']) {
                        $branches['names'] = \array_merge($branches['names'], $b['names']);
                    } else {
                        $branches['names'] = \array_diff($branches['names'], $b['names']);
                    }
                } else {
                    if ($branches['exclude']) {
                        $branches['names'] = \array_diff($b['names'], $branches['names']);
                        $branches['exclude'] = \false;
                    } else {
                        $branches['names'] = \array_intersect($branches['names'], $b['names']);
                    }
                }
            }
        }
        $branches['names'] = \array_unique($branches['names']);
        if (\count($numericGroups) === 1) {
            return array('numeric' => $numericGroups[0], 'branches' => $branches);
        }
        $borders = array();
        foreach ($numericGroups as $group) {
            foreach ($group as $interval) {
                $borders[] = array('version' => $interval->getStart()->getVersion(), 'operator' => $interval->getStart()->getOperator(), 'side' => 'start');
                $borders[] = array('version' => $interval->getEnd()->getVersion(), 'operator' => $interval->getEnd()->getOperator(), 'side' => 'end');
            }
        }
        $opSortOrder = self::$opSortOrder;
        \usort($borders, function ($a, $b) use($opSortOrder) {
            $order = \version_compare($a['version'], $b['version']);
            if ($order === 0) {
                return $opSortOrder[$a['operator']] - $opSortOrder[$b['operator']];
            }
            return $order;
        });
        $activeIntervals = 0;
        $intervals = array();
        $index = 0;
        $activationThreshold = $constraint->isConjunctive() ? \count($numericGroups) : 1;
        $start = null;
        foreach ($borders as $border) {
            if ($border['side'] === 'start') {
                $activeIntervals++;
            } else {
                $activeIntervals--;
            }
            if (!$start && $activeIntervals >= $activationThreshold) {
                $start = new Constraint($border['operator'], $border['version']);
            } elseif ($start && $activeIntervals < $activationThreshold) {
                if (\version_compare($start->getVersion(), $border['version'], '=') && ($start->getOperator() === '>' && $border['operator'] === '<=' || $start->getOperator() === '>=' && $border['operator'] === '<')) {
                    unset($intervals[$index]);
                } else {
                    $intervals[$index] = new Interval($start, new Constraint($border['operator'], $border['version']));
                    $index++;
                    if ($stopOnFirstValidInterval) {
                        break;
                    }
                }
                $start = null;
            }
        }
        return array('numeric' => $intervals, 'branches' => $branches);
    }
    /**
    @phpstan-return
    */
    private static function generateSingleConstraintIntervals(Constraint $constraint)
    {
        $op = $constraint->getOperator();
        if (\strpos($constraint->getVersion(), 'dev-') === 0) {
            $intervals = array();
            $branches = array('names' => array(), 'exclude' => \false);
            if ($op === '!=') {
                $intervals[] = new Interval(Interval::fromZero(), Interval::untilPositiveInfinity());
                $branches = array('names' => array($constraint->getVersion()), 'exclude' => \true);
            } elseif ($op === '==') {
                $branches['names'][] = $constraint->getVersion();
            }
            return array('numeric' => $intervals, 'branches' => $branches);
        }
        if ($op[0] === '>') {
            return array('numeric' => array(new Interval($constraint, Interval::untilPositiveInfinity())), 'branches' => Interval::noDev());
        }
        if ($op[0] === '<') {
            return array('numeric' => array(new Interval(Interval::fromZero(), $constraint)), 'branches' => Interval::noDev());
        }
        if ($op === '!=') {
            return array('numeric' => array(new Interval(Interval::fromZero(), new Constraint('<', $constraint->getVersion())), new Interval(new Constraint('>', $constraint->getVersion()), Interval::untilPositiveInfinity())), 'branches' => Interval::anyDev());
        }
        return array('numeric' => array(new Interval(new Constraint('>=', $constraint->getVersion()), new Constraint('<=', $constraint->getVersion()))), 'branches' => Interval::noDev());
    }
}
<?php

namespace HumbugBox420\Composer\Semver;

use HumbugBox420\Composer\Semver\Constraint\Constraint;
class Semver
{
    const SORT_ASC = 1;
    const SORT_DESC = -1;
    private static $versionParser;
    public static function satisfies($version, $constraints)
    {
        if (null === self::$versionParser) {
            self::$versionParser = new VersionParser();
        }
        $versionParser = self::$versionParser;
        $provider = new Constraint('==', $versionParser->normalize($version));
        $parsedConstraints = $versionParser->parseConstraints($constraints);
        return $parsedConstraints->matches($provider);
    }
    public static function satisfiedBy(array $versions, $constraints)
    {
        $versions = \array_filter($versions, function ($version) use($constraints) {
            return Semver::satisfies($version, $constraints);
        });
        return \array_values($versions);
    }
    public static function sort(array $versions)
    {
        return self::usort($versions, self::SORT_ASC);
    }
    public static function rsort(array $versions)
    {
        return self::usort($versions, self::SORT_DESC);
    }
    private static function usort(array $versions, $direction)
    {
        if (null === self::$versionParser) {
            self::$versionParser = new VersionParser();
        }
        $versionParser = self::$versionParser;
        $normalized = array();
        foreach ($versions as $key => $version) {
            $normalizedVersion = $versionParser->normalize($version);
            $normalizedVersion = $versionParser->normalizeDefaultBranch($normalizedVersion);
            $normalized[] = array($normalizedVersion, $key);
        }
        \usort($normalized, function (array $left, array $right) use($direction) {
            if ($left[0] === $right[0]) {
                return 0;
            }
            if (Comparator::lessThan($left[0], $right[0])) {
                return -$direction;
            }
            return $direction;
        });
        $sorted = array();
        foreach ($normalized as $item) {
            $sorted[] = $versions[$item[1]];
        }
        return $sorted;
    }
}
<?php

namespace HumbugBox420\Composer\Semver;

use HumbugBox420\Composer\Semver\Constraint\ConstraintInterface;
use HumbugBox420\Composer\Semver\Constraint\MatchAllConstraint;
use HumbugBox420\Composer\Semver\Constraint\MultiConstraint;
use HumbugBox420\Composer\Semver\Constraint\Constraint;
class VersionParser
{
    private static $modifierRegex = '[._-]?(?:(stable|beta|b|RC|alpha|a|patch|pl|p)((?:[.-]?\\d+)*+)?)?([.-]?dev)?';
    private static $stabilitiesRegex = 'stable|RC|beta|alpha|dev';
    /**
    @phpstan-return
    */
    public static function parseStability($version)
    {
        $version = (string) \preg_replace('{#.+$}', '', (string) $version);
        if (\strpos($version, 'dev-') === 0 || '-dev' === \substr($version, -4)) {
            return 'dev';
        }
        \preg_match('{' . self::$modifierRegex . '(?:\\+.*)?$}i', \strtolower($version), $match);
        if (!empty($match[3])) {
            return 'dev';
        }
        if (!empty($match[1])) {
            if ('beta' === $match[1] || 'b' === $match[1]) {
                return 'beta';
            }
            if ('alpha' === $match[1] || 'a' === $match[1]) {
                return 'alpha';
            }
            if ('rc' === $match[1]) {
                return 'RC';
            }
        }
        return 'stable';
    }
    public static function normalizeStability($stability)
    {
        $stability = \strtolower((string) $stability);
        return $stability === 'rc' ? 'RC' : $stability;
    }
    public function normalize($version, $fullVersion = null)
    {
        $version = \trim((string) $version);
        $origVersion = $version;
        if (null === $fullVersion) {
            $fullVersion = $version;
        }
        if (\preg_match('{^([^,\\s]++) ++as ++([^,\\s]++)$}', $version, $match)) {
            $version = $match[1];
        }
        if (\preg_match('{@(?:' . self::$stabilitiesRegex . ')$}i', $version, $match)) {
            $version = \substr($version, 0, \strlen($version) - \strlen($match[0]));
        }
        if (\in_array($version, array('master', 'trunk', 'default'), \true)) {
            $version = 'dev-' . $version;
        }
        if (\stripos($version, 'dev-') === 0) {
            return 'dev-' . \substr($version, 4);
        }
        if (\preg_match('{^([^,\\s+]++)\\+[^\\s]++$}', $version, $match)) {
            $version = $match[1];
        }
        if (\preg_match('{^v?(\\d{1,5})(\\.\\d++)?(\\.\\d++)?(\\.\\d++)?' . self::$modifierRegex . '$}i', $version, $matches)) {
            $version = $matches[1] . (!empty($matches[2]) ? $matches[2] : '.0') . (!empty($matches[3]) ? $matches[3] : '.0') . (!empty($matches[4]) ? $matches[4] : '.0');
            $index = 5;
        } elseif (\preg_match('{^v?(\\d{4}(?:[.:-]?\\d{2}){1,6}(?:[.:-]?\\d{1,3})?)' . self::$modifierRegex . '$}i', $version, $matches)) {
            $version = \preg_replace('{\\D}', '.', $matches[1]);
            $index = 2;
        }
        if (isset($index)) {
            if (!empty($matches[$index])) {
                if ('stable' === $matches[$index]) {
                    return $version;
                }
                $version .= '-' . $this->expandStability($matches[$index]) . (isset($matches[$index + 1]) && '' !== $matches[$index + 1] ? \ltrim($matches[$index + 1], '.-') : '');
            }
            if (!empty($matches[$index + 2])) {
                $version .= '-dev';
            }
            return $version;
        }
        if (\preg_match('{(.*?)[.-]?dev$}i', $version, $match)) {
            try {
                $normalized = $this->normalizeBranch($match[1]);
                if (\strpos($normalized, 'dev-') === \false) {
                    return $normalized;
                }
            } catch (\Exception $e) {
            }
        }
        $extraMessage = '';
        if (\preg_match('{ +as +' . \preg_quote($version) . '(?:@(?:' . self::$stabilitiesRegex . '))?$}', $fullVersion)) {
            $extraMessage = ' in "' . $fullVersion . '", the alias must be an exact version';
        } elseif (\preg_match('{^' . \preg_quote($version) . '(?:@(?:' . self::$stabilitiesRegex . '))? +as +}', $fullVersion)) {
            $extraMessage = ' in "' . $fullVersion . '", the alias source must be an exact version, if it is a branch name you should prefix it with dev-';
        }
        throw new \UnexpectedValueException('Invalid version string "' . $origVersion . '"' . $extraMessage);
    }
    public function parseNumericAliasPrefix($branch)
    {
        if (\preg_match('{^(?P<version>(\\d++\\.)*\\d++)(?:\\.x)?-dev$}i', (string) $branch, $matches)) {
            return $matches['version'] . '.';
        }
        return \false;
    }
    public function normalizeBranch($name)
    {
        $name = \trim((string) $name);
        if (\preg_match('{^v?(\\d++)(\\.(?:\\d++|[xX*]))?(\\.(?:\\d++|[xX*]))?(\\.(?:\\d++|[xX*]))?$}i', $name, $matches)) {
            $version = '';
            for ($i = 1; $i < 5; ++$i) {
                $version .= isset($matches[$i]) ? \str_replace(array('*', 'X'), 'x', $matches[$i]) : '.x';
            }
            return \str_replace('x', '9999999', $version) . '-dev';
        }
        return 'dev-' . $name;
    }
    public function normalizeDefaultBranch($name)
    {
        if ($name === 'dev-master' || $name === 'dev-default' || $name === 'dev-trunk') {
            return '9999999-dev';
        }
        return (string) $name;
    }
    public function parseConstraints($constraints)
    {
        $prettyConstraint = (string) $constraints;
        $orConstraints = \preg_split('{\\s*\\|\\|?\\s*}', \trim((string) $constraints));
        if (\false === $orConstraints) {
            throw new \RuntimeException('Failed to preg_split string: ' . $constraints);
        }
        $orGroups = array();
        foreach ($orConstraints as $constraints) {
            $andConstraints = \preg_split('{(?<!^|as|[=>< ,]) *(?<!-)[, ](?!-) *(?!,|as|$)}', $constraints);
            if (\false === $andConstraints) {
                throw new \RuntimeException('Failed to preg_split string: ' . $constraints);
            }
            if (\count($andConstraints) > 1) {
                $constraintObjects = array();
                foreach ($andConstraints as $constraint) {
                    foreach ($this->parseConstraint($constraint) as $parsedConstraint) {
                        $constraintObjects[] = $parsedConstraint;
                    }
                }
            } else {
                $constraintObjects = $this->parseConstraint($andConstraints[0]);
            }
            if (1 === \count($constraintObjects)) {
                $constraint = $constraintObjects[0];
            } else {
                $constraint = new MultiConstraint($constraintObjects);
            }
            $orGroups[] = $constraint;
        }
        $constraint = MultiConstraint::create($orGroups, \false);
        $constraint->setPrettyString($prettyConstraint);
        return $constraint;
    }
    /**
    @phpstan-return
    */
    private function parseConstraint($constraint)
    {
        if (\preg_match('{^([^,\\s]++) ++as ++([^,\\s]++)$}', $constraint, $match)) {
            $constraint = $match[1];
        }
        if (\preg_match('{^([^,\\s]*?)@(' . self::$stabilitiesRegex . ')$}i', $constraint, $match)) {
            $constraint = '' !== $match[1] ? $match[1] : '*';
            if ($match[2] !== 'stable') {
                $stabilityModifier = $match[2];
            }
        }
        if (\preg_match('{^(dev-[^,\\s@]+?|[^,\\s@]+?\\.x-dev)#.+$}i', $constraint, $match)) {
            $constraint = $match[1];
        }
        if (\preg_match('{^(v)?[xX*](\\.[xX*])*$}i', $constraint, $match)) {
            if (!empty($match[1]) || !empty($match[2])) {
                return array(new Constraint('>=', '0.0.0.0-dev'));
            }
            return array(new MatchAllConstraint());
        }
        $versionRegex = 'v?(\\d++)(?:\\.(\\d++))?(?:\\.(\\d++))?(?:\\.(\\d++))?(?:' . self::$modifierRegex . '|\\.([xX*][.-]?dev))(?:\\+[^\\s]+)?';
        if (\preg_match('{^~>?' . $versionRegex . '$}i', $constraint, $matches)) {
            if (\strpos($constraint, '~>') === 0) {
                throw new \UnexpectedValueException('Could not parse version constraint ' . $constraint . ': ' . 'Invalid operator "~>", you probably meant to use the "~" operator');
            }
            if (isset($matches[4]) && '' !== $matches[4] && null !== $matches[4]) {
                $position = 4;
            } elseif (isset($matches[3]) && '' !== $matches[3] && null !== $matches[3]) {
                $position = 3;
            } elseif (isset($matches[2]) && '' !== $matches[2] && null !== $matches[2]) {
                $position = 2;
            } else {
                $position = 1;
            }
            if (!empty($matches[8])) {
                $position++;
            }
            $stabilitySuffix = '';
            if (empty($matches[5]) && empty($matches[7]) && empty($matches[8])) {
                $stabilitySuffix .= '-dev';
            }
            $lowVersion = $this->normalize(\substr($constraint . $stabilitySuffix, 1));
            $lowerBound = new Constraint('>=', $lowVersion);
            $highPosition = \max(1, $position - 1);
            $highVersion = $this->manipulateVersionString($matches, $highPosition, 1) . '-dev';
            $upperBound = new Constraint('<', $highVersion);
            return array($lowerBound, $upperBound);
        }
        if (\preg_match('{^\\^' . $versionRegex . '($)}i', $constraint, $matches)) {
            if ('0' !== $matches[1] || '' === $matches[2] || null === $matches[2]) {
                $position = 1;
            } elseif ('0' !== $matches[2] || '' === $matches[3] || null === $matches[3]) {
                $position = 2;
            } else {
                $position = 3;
            }
            $stabilitySuffix = '';
            if (empty($matches[5]) && empty($matches[7]) && empty($matches[8])) {
                $stabilitySuffix .= '-dev';
            }
            $lowVersion = $this->normalize(\substr($constraint . $stabilitySuffix, 1));
            $lowerBound = new Constraint('>=', $lowVersion);
            $highVersion = $this->manipulateVersionString($matches, $position, 1) . '-dev';
            $upperBound = new Constraint('<', $highVersion);
            return array($lowerBound, $upperBound);
        }
        if (\preg_match('{^v?(\\d++)(?:\\.(\\d++))?(?:\\.(\\d++))?(?:\\.[xX*])++$}', $constraint, $matches)) {
            if (isset($matches[3]) && '' !== $matches[3] && null !== $matches[3]) {
                $position = 3;
            } elseif (isset($matches[2]) && '' !== $matches[2] && null !== $matches[2]) {
                $position = 2;
            } else {
                $position = 1;
            }
            $lowVersion = $this->manipulateVersionString($matches, $position) . '-dev';
            $highVersion = $this->manipulateVersionString($matches, $position, 1) . '-dev';
            if ($lowVersion === '0.0.0.0-dev') {
                return array(new Constraint('<', $highVersion));
            }
            return array(new Constraint('>=', $lowVersion), new Constraint('<', $highVersion));
        }
        if (\preg_match('{^(?P<from>' . $versionRegex . ') +- +(?P<to>' . $versionRegex . ')($)}i', $constraint, $matches)) {
            $lowStabilitySuffix = '';
            if (empty($matches[6]) && empty($matches[8]) && empty($matches[9])) {
                $lowStabilitySuffix = '-dev';
            }
            $lowVersion = $this->normalize($matches['from']);
            $lowerBound = new Constraint('>=', $lowVersion . $lowStabilitySuffix);
            $empty = function ($x) {
                return $x === 0 || $x === '0' ? \false : empty($x);
            };
            if (!$empty($matches[12]) && !$empty($matches[13]) || !empty($matches[15]) || !empty($matches[17]) || !empty($matches[18])) {
                $highVersion = $this->normalize($matches['to']);
                $upperBound = new Constraint('<=', $highVersion);
            } else {
                $highMatch = array('', $matches[11], $matches[12], $matches[13], $matches[14]);
                $this->normalize($matches['to']);
                $highVersion = $this->manipulateVersionString($highMatch, $empty($matches[12]) ? 1 : 2, 1) . '-dev';
                $upperBound = new Constraint('<', $highVersion);
            }
            return array($lowerBound, $upperBound);
        }
        if (\preg_match('{^(<>|!=|>=?|<=?|==?)?\\s*(.*)}', $constraint, $matches)) {
            try {
                try {
                    $version = $this->normalize($matches[2]);
                } catch (\UnexpectedValueException $e) {
                    if (\substr($matches[2], -4) === '-dev' && \preg_match('{^[0-9a-zA-Z-./]+$}', $matches[2])) {
                        $version = $this->normalize('dev-' . \substr($matches[2], 0, -4));
                    } else {
                        throw $e;
                    }
                }
                $op = $matches[1] ?: '=';
                if ($op !== '==' && $op !== '=' && !empty($stabilityModifier) && self::parseStability($version) === 'stable') {
                    $version .= '-' . $stabilityModifier;
                } elseif ('<' === $op || '>=' === $op) {
                    if (!\preg_match('/-' . self::$modifierRegex . '$/', \strtolower($matches[2]))) {
                        if (\strpos($matches[2], 'dev-') !== 0) {
                            $version .= '-dev';
                        }
                    }
                }
                return array(new Constraint($matches[1] ?: '=', $version));
            } catch (\Exception $e) {
            }
        }
        $message = 'Could not parse version constraint ' . $constraint;
        if (isset($e)) {
            $message .= ': ' . $e->getMessage();
        }
        throw new \UnexpectedValueException($message);
    }
    /**
    @phpstan-param
    */
    private function manipulateVersionString(array $matches, $position, $increment = 0, $pad = '0')
    {
        for ($i = 4; $i > 0; --$i) {
            if ($i > $position) {
                $matches[$i] = $pad;
            } elseif ($i === $position && $increment) {
                $matches[$i] += $increment;
                if ($matches[$i] < 0) {
                    $matches[$i] = $pad;
                    --$position;
                    if ($i === 1) {
                        return null;
                    }
                }
            }
        }
        return $matches[1] . '.' . $matches[2] . '.' . $matches[3] . '.' . $matches[4];
    }
    private function expandStability($stability)
    {
        $stability = \strtolower($stability);
        switch ($stability) {
            case 'a':
                return 'alpha';
            case 'b':
                return 'beta';
            case 'p':
            case 'pl':
                return 'patch';
            case 'rc':
                return 'RC';
            default:
                return $stability;
        }
    }
}
<?php

namespace HumbugBox420\Composer\Semver\Constraint;

class MatchNoneConstraint implements ConstraintInterface
{
    protected $prettyString;
    public function matches(ConstraintInterface $provider)
    {
        return \false;
    }
    public function compile($otherOperator)
    {
        return 'false';
    }
    public function setPrettyString($prettyString)
    {
        $this->prettyString = $prettyString;
    }
    public function getPrettyString()
    {
        if ($this->prettyString) {
            return $this->prettyString;
        }
        return (string) $this;
    }
    public function __toString()
    {
        return '[]';
    }
    public function getUpperBound()
    {
        return new Bound('0.0.0.0-dev', \false);
    }
    public function getLowerBound()
    {
        return new Bound('0.0.0.0-dev', \false);
    }
}
<?php

namespace HumbugBox420\Composer\Semver\Constraint;

class MatchAllConstraint implements ConstraintInterface
{
    protected $prettyString;
    public function matches(ConstraintInterface $provider)
    {
        return \true;
    }
    public function compile($otherOperator)
    {
        return 'true';
    }
    public function setPrettyString($prettyString)
    {
        $this->prettyString = $prettyString;
    }
    public function getPrettyString()
    {
        if ($this->prettyString) {
            return $this->prettyString;
        }
        return (string) $this;
    }
    public function __toString()
    {
        return '*';
    }
    public function getUpperBound()
    {
        return Bound::positiveInfinity();
    }
    public function getLowerBound()
    {
        return Bound::zero();
    }
}
<?php

namespace HumbugBox420\Composer\Semver\Constraint;

class Constraint implements ConstraintInterface
{
    const OP_EQ = 0;
    const OP_LT = 1;
    const OP_LE = 2;
    const OP_GT = 3;
    const OP_GE = 4;
    const OP_NE = 5;
    const STR_OP_EQ = '==';
    const STR_OP_EQ_ALT = '=';
    const STR_OP_LT = '<';
    const STR_OP_LE = '<=';
    const STR_OP_GT = '>';
    const STR_OP_GE = '>=';
    const STR_OP_NE = '!=';
    const STR_OP_NE_ALT = '<>';
    /**
    @phpstan-var
    */
    private static $transOpStr = array('=' => self::OP_EQ, '==' => self::OP_EQ, '<' => self::OP_LT, '<=' => self::OP_LE, '>' => self::OP_GT, '>=' => self::OP_GE, '<>' => self::OP_NE, '!=' => self::OP_NE);
    /**
    @phpstan-var
    */
    private static $transOpInt = array(self::OP_EQ => '==', self::OP_LT => '<', self::OP_LE => '<=', self::OP_GT => '>', self::OP_GE => '>=', self::OP_NE => '!=');
    /**
    @phpstan-var
    */
    protected $operator;
    protected $version;
    protected $prettyString;
    protected $lowerBound;
    protected $upperBound;
    /**
    @phpstan-param
    */
    public function __construct($operator, $version)
    {
        if (!isset(self::$transOpStr[$operator])) {
            throw new \InvalidArgumentException(\sprintf('Invalid operator "%s" given, expected one of: %s', $operator, \implode(', ', self::getSupportedOperators())));
        }
        $this->operator = self::$transOpStr[$operator];
        $this->version = $version;
    }
    public function getVersion()
    {
        return $this->version;
    }
    /**
    @phpstan-return
    */
    public function getOperator()
    {
        return self::$transOpInt[$this->operator];
    }
    public function matches(ConstraintInterface $provider)
    {
        if ($provider instanceof self) {
            return $this->matchSpecific($provider);
        }
        return $provider->matches($this);
    }
    public function setPrettyString($prettyString)
    {
        $this->prettyString = $prettyString;
    }
    public function getPrettyString()
    {
        if ($this->prettyString) {
            return $this->prettyString;
        }
        return $this->__toString();
    }
    /**
    @phpstan-return
    */
    public static function getSupportedOperators()
    {
        return \array_keys(self::$transOpStr);
    }
    /**
    @phpstan-param
    @phpstan-return
    */
    public static function getOperatorConstant($operator)
    {
        return self::$transOpStr[$operator];
    }
    /**
    @phpstan-param
    */
    public function versionCompare($a, $b, $operator, $compareBranches = \false)
    {
        if (!isset(self::$transOpStr[$operator])) {
            throw new \InvalidArgumentException(\sprintf('Invalid operator "%s" given, expected one of: %s', $operator, \implode(', ', self::getSupportedOperators())));
        }
        $aIsBranch = \strpos($a, 'dev-') === 0;
        $bIsBranch = \strpos($b, 'dev-') === 0;
        if ($operator === '!=' && ($aIsBranch || $bIsBranch)) {
            return $a !== $b;
        }
        if ($aIsBranch && $bIsBranch) {
            return $operator === '==' && $a === $b;
        }
        if (!$compareBranches && ($aIsBranch || $bIsBranch)) {
            return \false;
        }
        return \version_compare($a, $b, $operator);
    }
    public function compile($otherOperator)
    {
        if (\strpos($this->version, 'dev-') === 0) {
            if (self::OP_EQ === $this->operator) {
                if (self::OP_EQ === $otherOperator) {
                    return \sprintf('$b && $v === %s', \var_export($this->version, \true));
                }
                if (self::OP_NE === $otherOperator) {
                    return \sprintf('!$b || $v !== %s', \var_export($this->version, \true));
                }
                return 'false';
            }
            if (self::OP_NE === $this->operator) {
                if (self::OP_EQ === $otherOperator) {
                    return \sprintf('!$b || $v !== %s', \var_export($this->version, \true));
                }
                if (self::OP_NE === $otherOperator) {
                    return 'true';
                }
                return '!$b';
            }
            return 'false';
        }
        if (self::OP_EQ === $this->operator) {
            if (self::OP_EQ === $otherOperator) {
                return \sprintf('\\version_compare($v, %s, \'==\')', \var_export($this->version, \true));
            }
            if (self::OP_NE === $otherOperator) {
                return \sprintf('$b || \\version_compare($v, %s, \'!=\')', \var_export($this->version, \true));
            }
            return \sprintf('!$b && \\version_compare(%s, $v, \'%s\')', \var_export($this->version, \true), self::$transOpInt[$otherOperator]);
        }
        if (self::OP_NE === $this->operator) {
            if (self::OP_EQ === $otherOperator) {
                return \sprintf('$b || (!$b && \\version_compare($v, %s, \'!=\'))', \var_export($this->version, \true));
            }
            if (self::OP_NE === $otherOperator) {
                return 'true';
            }
            return '!$b';
        }
        if (self::OP_LT === $this->operator || self::OP_LE === $this->operator) {
            if (self::OP_LT === $otherOperator || self::OP_LE === $otherOperator) {
                return '!$b';
            }
        } else {
            if (self::OP_GT === $otherOperator || self::OP_GE === $otherOperator) {
                return '!$b';
            }
        }
        if (self::OP_NE === $otherOperator) {
            return 'true';
        }
        $codeComparison = \sprintf('\\version_compare($v, %s, \'%s\')', \var_export($this->version, \true), self::$transOpInt[$this->operator]);
        if ($this->operator === self::OP_LE) {
            if ($otherOperator === self::OP_GT) {
                return \sprintf('!$b && \\version_compare($v, %s, \'!=\') && ', \var_export($this->version, \true)) . $codeComparison;
            }
        } elseif ($this->operator === self::OP_GE) {
            if ($otherOperator === self::OP_LT) {
                return \sprintf('!$b && \\version_compare($v, %s, \'!=\') && ', \var_export($this->version, \true)) . $codeComparison;
            }
        }
        return \sprintf('!$b && %s', $codeComparison);
    }
    public function matchSpecific(Constraint $provider, $compareBranches = \false)
    {
        $noEqualOp = \str_replace('=', '', self::$transOpInt[$this->operator]);
        $providerNoEqualOp = \str_replace('=', '', self::$transOpInt[$provider->operator]);
        $isEqualOp = self::OP_EQ === $this->operator;
        $isNonEqualOp = self::OP_NE === $this->operator;
        $isProviderEqualOp = self::OP_EQ === $provider->operator;
        $isProviderNonEqualOp = self::OP_NE === $provider->operator;
        if ($isNonEqualOp || $isProviderNonEqualOp) {
            if ($isNonEqualOp && !$isProviderNonEqualOp && !$isProviderEqualOp && \strpos($provider->version, 'dev-') === 0) {
                return \false;
            }
            if ($isProviderNonEqualOp && !$isNonEqualOp && !$isEqualOp && \strpos($this->version, 'dev-') === 0) {
                return \false;
            }
            if (!$isEqualOp && !$isProviderEqualOp) {
                return \true;
            }
            return $this->versionCompare($provider->version, $this->version, '!=', $compareBranches);
        }
        if ($this->operator !== self::OP_EQ && $noEqualOp === $providerNoEqualOp) {
            return !(\strpos($this->version, 'dev-') === 0 || \strpos($provider->version, 'dev-') === 0);
        }
        $version1 = $isEqualOp ? $this->version : $provider->version;
        $version2 = $isEqualOp ? $provider->version : $this->version;
        $operator = $isEqualOp ? $provider->operator : $this->operator;
        if ($this->versionCompare($version1, $version2, self::$transOpInt[$operator], $compareBranches)) {
            return !(self::$transOpInt[$provider->operator] === $providerNoEqualOp && self::$transOpInt[$this->operator] !== $noEqualOp && \version_compare($provider->version, $this->version, '=='));
        }
        return \false;
    }
    public function __toString()
    {
        return self::$transOpInt[$this->operator] . ' ' . $this->version;
    }
    public function getLowerBound()
    {
        $this->extractBounds();
        return $this->lowerBound;
    }
    public function getUpperBound()
    {
        $this->extractBounds();
        return $this->upperBound;
    }
    private function extractBounds()
    {
        if (null !== $this->lowerBound) {
            return;
        }
        if (\strpos($this->version, 'dev-') === 0) {
            $this->lowerBound = Bound::zero();
            $this->upperBound = Bound::positiveInfinity();
            return;
        }
        switch ($this->operator) {
            case self::OP_EQ:
                $this->lowerBound = new Bound($this->version, \true);
                $this->upperBound = new Bound($this->version, \true);
                break;
            case self::OP_LT:
                $this->lowerBound = Bound::zero();
                $this->upperBound = new Bound($this->version, \false);
                break;
            case self::OP_LE:
                $this->lowerBound = Bound::zero();
                $this->upperBound = new Bound($this->version, \true);
                break;
            case self::OP_GT:
                $this->lowerBound = new Bound($this->version, \false);
                $this->upperBound = Bound::positiveInfinity();
                break;
            case self::OP_GE:
                $this->lowerBound = new Bound($this->version, \true);
                $this->upperBound = Bound::positiveInfinity();
                break;
            case self::OP_NE:
                $this->lowerBound = Bound::zero();
                $this->upperBound = Bound::positiveInfinity();
                break;
        }
    }
}
<?php

namespace HumbugBox420\Composer\Semver\Constraint;

class MultiConstraint implements ConstraintInterface
{
    /**
    @phpstan-var
    */
    protected $constraints;
    protected $prettyString;
    protected $string;
    protected $conjunctive;
    protected $lowerBound;
    protected $upperBound;
    public function __construct(array $constraints, $conjunctive = \true)
    {
        if (\count($constraints) < 2) {
            throw new \InvalidArgumentException('Must provide at least two constraints for a MultiConstraint. Use ' . 'the regular Constraint class for one constraint only or MatchAllConstraint for none. You may use ' . 'MultiConstraint::create() which optimizes and handles those cases automatically.');
        }
        $this->constraints = $constraints;
        $this->conjunctive = $conjunctive;
    }
    public function getConstraints()
    {
        return $this->constraints;
    }
    public function isConjunctive()
    {
        return $this->conjunctive;
    }
    public function isDisjunctive()
    {
        return !$this->conjunctive;
    }
    public function compile($otherOperator)
    {
        $parts = array();
        foreach ($this->constraints as $constraint) {
            $code = $constraint->compile($otherOperator);
            if ($code === 'true') {
                if (!$this->conjunctive) {
                    return 'true';
                }
            } elseif ($code === 'false') {
                if ($this->conjunctive) {
                    return 'false';
                }
            } else {
                $parts[] = '(' . $code . ')';
            }
        }
        if (!$parts) {
            return $this->conjunctive ? 'true' : 'false';
        }
        return $this->conjunctive ? \implode('&&', $parts) : \implode('||', $parts);
    }
    public function matches(ConstraintInterface $provider)
    {
        if (\false === $this->conjunctive) {
            foreach ($this->constraints as $constraint) {
                if ($provider->matches($constraint)) {
                    return \true;
                }
            }
            return \false;
        }
        if ($provider instanceof MultiConstraint && $provider->isDisjunctive()) {
            return $provider->matches($this);
        }
        foreach ($this->constraints as $constraint) {
            if (!$provider->matches($constraint)) {
                return \false;
            }
        }
        return \true;
    }
    public function setPrettyString($prettyString)
    {
        $this->prettyString = $prettyString;
    }
    public function getPrettyString()
    {
        if ($this->prettyString) {
            return $this->prettyString;
        }
        return (string) $this;
    }
    public function __toString()
    {
        if ($this->string !== null) {
            return $this->string;
        }
        $constraints = array();
        foreach ($this->constraints as $constraint) {
            $constraints[] = (string) $constraint;
        }
        return $this->string = '[' . \implode($this->conjunctive ? ' ' : ' || ', $constraints) . ']';
    }
    public function getLowerBound()
    {
        $this->extractBounds();
        if (null === $this->lowerBound) {
            throw new \LogicException('extractBounds should have populated the lowerBound property');
        }
        return $this->lowerBound;
    }
    public function getUpperBound()
    {
        $this->extractBounds();
        if (null === $this->upperBound) {
            throw new \LogicException('extractBounds should have populated the upperBound property');
        }
        return $this->upperBound;
    }
    public static function create(array $constraints, $conjunctive = \true)
    {
        if (0 === \count($constraints)) {
            return new MatchAllConstraint();
        }
        if (1 === \count($constraints)) {
            return $constraints[0];
        }
        $optimized = self::optimizeConstraints($constraints, $conjunctive);
        if ($optimized !== null) {
            list($constraints, $conjunctive) = $optimized;
            if (\count($constraints) === 1) {
                return $constraints[0];
            }
        }
        return new self($constraints, $conjunctive);
    }
    /**
    @phpstan-return
    */
    private static function optimizeConstraints(array $constraints, $conjunctive)
    {
        if (!$conjunctive) {
            $left = $constraints[0];
            $mergedConstraints = array();
            $optimized = \false;
            for ($i = 1, $l = \count($constraints); $i < $l; $i++) {
                $right = $constraints[$i];
                if ($left instanceof self && $left->conjunctive && $right instanceof self && $right->conjunctive && \count($left->constraints) === 2 && \count($right->constraints) === 2 && ($left0 = (string) $left->constraints[0]) && $left0[0] === '>' && $left0[1] === '=' && ($left1 = (string) $left->constraints[1]) && $left1[0] === '<' && ($right0 = (string) $right->constraints[0]) && $right0[0] === '>' && $right0[1] === '=' && ($right1 = (string) $right->constraints[1]) && $right1[0] === '<' && \substr($left1, 2) === \substr($right0, 3)) {
                    $optimized = \true;
                    $left = new MultiConstraint(array($left->constraints[0], $right->constraints[1]), \true);
                } else {
                    $mergedConstraints[] = $left;
                    $left = $right;
                }
            }
            if ($optimized) {
                $mergedConstraints[] = $left;
                return array($mergedConstraints, \false);
            }
        }
        return null;
    }
    private function extractBounds()
    {
        if (null !== $this->lowerBound) {
            return;
        }
        foreach ($this->constraints as $constraint) {
            if (null === $this->lowerBound || null === $this->upperBound) {
                $this->lowerBound = $constraint->getLowerBound();
                $this->upperBound = $constraint->getUpperBound();
                continue;
            }
            if ($constraint->getLowerBound()->compareTo($this->lowerBound, $this->isConjunctive() ? '>' : '<')) {
                $this->lowerBound = $constraint->getLowerBound();
            }
            if ($constraint->getUpperBound()->compareTo($this->upperBound, $this->isConjunctive() ? '<' : '>')) {
                $this->upperBound = $constraint->getUpperBound();
            }
        }
    }
}
<?php

namespace HumbugBox420\Composer\Semver\Constraint;

class Bound
{
    private $version;
    private $isInclusive;
    public function __construct($version, $isInclusive)
    {
        $this->version = $version;
        $this->isInclusive = $isInclusive;
    }
    public function getVersion()
    {
        return $this->version;
    }
    public function isInclusive()
    {
        return $this->isInclusive;
    }
    public function isZero()
    {
        return $this->getVersion() === '0.0.0.0-dev' && $this->isInclusive();
    }
    public function isPositiveInfinity()
    {
        return $this->getVersion() === \PHP_INT_MAX . '.0.0.0' && !$this->isInclusive();
    }
    public function compareTo(Bound $other, $operator)
    {
        if (!\in_array($operator, array('<', '>'), \true)) {
            throw new \InvalidArgumentException('Does not support any other operator other than > or <.');
        }
        if ($this == $other) {
            return \false;
        }
        $compareResult = \version_compare($this->getVersion(), $other->getVersion());
        if (0 !== $compareResult) {
            return ('>' === $operator ? 1 : -1) === $compareResult;
        }
        return '>' === $operator ? $other->isInclusive() : !$other->isInclusive();
    }
    public function __toString()
    {
        return \sprintf('%s [%s]', $this->getVersion(), $this->isInclusive() ? 'inclusive' : 'exclusive');
    }
    public static function zero()
    {
        return new Bound('0.0.0.0-dev', \true);
    }
    public static function positiveInfinity()
    {
        return new Bound(\PHP_INT_MAX . '.0.0.0', \false);
    }
}
<?php

namespace HumbugBox420\Composer\Semver\Constraint;

interface ConstraintInterface
{
    public function matches(ConstraintInterface $provider);
    /**
    @phpstan-param
    */
    public function compile($otherOperator);
    public function getUpperBound();
    public function getLowerBound();
    public function getPrettyString();
    public function setPrettyString($prettyString);
    public function __toString();
}
<?php

namespace HumbugBox420\Composer\Semver;

use HumbugBox420\Composer\Semver\Constraint\Constraint;
class Comparator
{
    public static function greaterThan($version1, $version2)
    {
        return self::compare($version1, '>', $version2);
    }
    public static function greaterThanOrEqualTo($version1, $version2)
    {
        return self::compare($version1, '>=', $version2);
    }
    public static function lessThan($version1, $version2)
    {
        return self::compare($version1, '<', $version2);
    }
    public static function lessThanOrEqualTo($version1, $version2)
    {
        return self::compare($version1, '<=', $version2);
    }
    public static function equalTo($version1, $version2)
    {
        return self::compare($version1, '==', $version2);
    }
    public static function notEqualTo($version1, $version2)
    {
        return self::compare($version1, '!=', $version2);
    }
    /**
    @phpstan-param
    */
    public static function compare($version1, $operator, $version2)
    {
        $constraint = new Constraint($operator, $version2);
        return $constraint->matchSpecific(new Constraint('==', $version1), \true);
    }
}
<?php

namespace HumbugBox420\Composer\Semver;

use HumbugBox420\Composer\Semver\Constraint\Constraint;
use HumbugBox420\Composer\Semver\Constraint\ConstraintInterface;
class CompilingMatcher
{
    /**
    @phpstan-var
    */
    private static $compiledCheckerCache = array();
    /**
    @phpstan-var
    */
    private static $resultCache = array();
    private static $enabled;
    /**
    @phpstan-var
    */
    private static $transOpInt = array(Constraint::OP_EQ => Constraint::STR_OP_EQ, Constraint::OP_LT => Constraint::STR_OP_LT, Constraint::OP_LE => Constraint::STR_OP_LE, Constraint::OP_GT => Constraint::STR_OP_GT, Constraint::OP_GE => Constraint::STR_OP_GE, Constraint::OP_NE => Constraint::STR_OP_NE);
    public static function clear()
    {
        self::$resultCache = array();
        self::$compiledCheckerCache = array();
    }
    /**
    @phpstan-param
    */
    public static function match(ConstraintInterface $constraint, $operator, $version)
    {
        $resultCacheKey = $operator . $constraint . ';' . $version;
        if (isset(self::$resultCache[$resultCacheKey])) {
            return self::$resultCache[$resultCacheKey];
        }
        if (self::$enabled === null) {
            self::$enabled = !\in_array('eval', \explode(',', (string) \ini_get('disable_functions')), \true);
        }
        if (!self::$enabled) {
            return self::$resultCache[$resultCacheKey] = $constraint->matches(new Constraint(self::$transOpInt[$operator], $version));
        }
        $cacheKey = $operator . $constraint;
        if (!isset(self::$compiledCheckerCache[$cacheKey])) {
            $code = $constraint->compile($operator);
            self::$compiledCheckerCache[$cacheKey] = $function = eval('return function($v, $b){return ' . $code . ';};');
        } else {
            $function = self::$compiledCheckerCache[$cacheKey];
        }
        return self::$resultCache[$resultCacheKey] = $function($version, \strpos($version, 'dev-') === 0);
    }
}
<?php

namespace HumbugBox420\Composer\Semver;

use HumbugBox420\Composer\Semver\Constraint\Constraint;
class Interval
{
    private $start;
    private $end;
    public function __construct(Constraint $start, Constraint $end)
    {
        $this->start = $start;
        $this->end = $end;
    }
    public function getStart()
    {
        return $this->start;
    }
    public function getEnd()
    {
        return $this->end;
    }
    public static function fromZero()
    {
        static $zero;
        if (null === $zero) {
            $zero = new Constraint('>=', '0.0.0.0-dev');
        }
        return $zero;
    }
    public static function untilPositiveInfinity()
    {
        static $positiveInfinity;
        if (null === $positiveInfinity) {
            $positiveInfinity = new Constraint('<', \PHP_INT_MAX . '.0.0.0');
        }
        return $positiveInfinity;
    }
    public static function any()
    {
        return new self(self::fromZero(), self::untilPositiveInfinity());
    }
    public static function anyDev()
    {
        return array('names' => array(), 'exclude' => \true);
    }
    public static function noDev()
    {
        return array('names' => array(), 'exclude' => \false);
    }
}
Copyright (C) 2015 Composer

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
<?php

namespace HumbugBox420\Composer;

use HumbugBox420\Composer\Autoload\ClassLoader;
use HumbugBox420\Composer\Semver\VersionParser;
class InstalledVersions
{
    /**
    @psalm-var
    */
    private static $installed;
    private static $canGetVendors;
    /**
    @psalm-var
    */
    private static $installedByVendor = array();
    /**
    @psalm-return
    */
    public static function getInstalledPackages()
    {
        $packages = array();
        foreach (self::getInstalled() as $installed) {
            $packages[] = \array_keys($installed['versions']);
        }
        if (1 === \count($packages)) {
            return $packages[0];
        }
        return \array_keys(\array_flip(\call_user_func_array('array_merge', $packages)));
    }
    /**
    @psalm-return
    */
    public static function getInstalledPackagesByType($type)
    {
        $packagesByType = array();
        foreach (self::getInstalled() as $installed) {
            foreach ($installed['versions'] as $name => $package) {
                if (isset($package['type']) && $package['type'] === $type) {
                    $packagesByType[] = $name;
                }
            }
        }
        return $packagesByType;
    }
    public static function isInstalled($packageName, $includeDevRequirements = \true)
    {
        foreach (self::getInstalled() as $installed) {
            if (isset($installed['versions'][$packageName])) {
                return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
            }
        }
        return \false;
    }
    public static function satisfies(VersionParser $parser, $packageName, $constraint)
    {
        $constraint = $parser->parseConstraints($constraint);
        $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
        return $provided->matches($constraint);
    }
    public static function getVersionRanges($packageName)
    {
        foreach (self::getInstalled() as $installed) {
            if (!isset($installed['versions'][$packageName])) {
                continue;
            }
            $ranges = array();
            if (isset($installed['versions'][$packageName]['pretty_version'])) {
                $ranges[] = $installed['versions'][$packageName]['pretty_version'];
            }
            if (\array_key_exists('aliases', $installed['versions'][$packageName])) {
                $ranges = \array_merge($ranges, $installed['versions'][$packageName]['aliases']);
            }
            if (\array_key_exists('replaced', $installed['versions'][$packageName])) {
                $ranges = \array_merge($ranges, $installed['versions'][$packageName]['replaced']);
            }
            if (\array_key_exists('provided', $installed['versions'][$packageName])) {
                $ranges = \array_merge($ranges, $installed['versions'][$packageName]['provided']);
            }
            return \implode(' || ', $ranges);
        }
        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    }
    public static function getVersion($packageName)
    {
        foreach (self::getInstalled() as $installed) {
            if (!isset($installed['versions'][$packageName])) {
                continue;
            }
            if (!isset($installed['versions'][$packageName]['version'])) {
                return null;
            }
            return $installed['versions'][$packageName]['version'];
        }
        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    }
    public static function getPrettyVersion($packageName)
    {
        foreach (self::getInstalled() as $installed) {
            if (!isset($installed['versions'][$packageName])) {
                continue;
            }
            if (!isset($installed['versions'][$packageName]['pretty_version'])) {
                return null;
            }
            return $installed['versions'][$packageName]['pretty_version'];
        }
        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    }
    public static function getReference($packageName)
    {
        foreach (self::getInstalled() as $installed) {
            if (!isset($installed['versions'][$packageName])) {
                continue;
            }
            if (!isset($installed['versions'][$packageName]['reference'])) {
                return null;
            }
            return $installed['versions'][$packageName]['reference'];
        }
        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    }
    public static function getInstallPath($packageName)
    {
        foreach (self::getInstalled() as $installed) {
            if (!isset($installed['versions'][$packageName])) {
                continue;
            }
            return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
        }
        throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
    }
    /**
    @psalm-return
    */
    public static function getRootPackage()
    {
        $installed = self::getInstalled();
        return $installed[0]['root'];
    }
    /**
    @psalm-return
    */
    public static function getRawData()
    {
        @\trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', \E_USER_DEPRECATED);
        if (null === self::$installed) {
            if (\substr(__DIR__, -8, 1) !== 'C') {
                self::$installed = (include __DIR__ . '/installed.php');
            } else {
                self::$installed = array();
            }
        }
        return self::$installed;
    }
    /**
    @psalm-return
    */
    public static function getAllRawData()
    {
        return self::getInstalled();
    }
    /**
    @psalm-param
    */
    public static function reload($data)
    {
        self::$installed = $data;
        self::$installedByVendor = array();
    }
    /**
    @psalm-return
    */
    private static function getInstalled()
    {
        if (null === self::$canGetVendors) {
            self::$canGetVendors = \method_exists('HumbugBox420\\Composer\\Autoload\\ClassLoader', 'getRegisteredLoaders');
        }
        $installed = array();
        if (self::$canGetVendors) {
            foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
                if (isset(self::$installedByVendor[$vendorDir])) {
                    $installed[] = self::$installedByVendor[$vendorDir];
                } elseif (\is_file($vendorDir . '/composer/installed.php')) {
                    $installed[] = self::$installedByVendor[$vendorDir] = (require $vendorDir . '/composer/installed.php');
                    if (null === self::$installed && \strtr($vendorDir . '/composer', '\\', '/') === \strtr(__DIR__, '\\', '/')) {
                        self::$installed = $installed[\count($installed) - 1];
                    }
                }
            }
        }
        if (null === self::$installed) {
            if (\substr(__DIR__, -8, 1) !== 'C') {
                self::$installed = (require __DIR__ . '/installed.php');
            } else {
                self::$installed = array();
            }
        }
        $installed[] = self::$installed;
        return $installed;
    }
}
<?php

// autoload_namespaces.php @generated by Composer

$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);

return array(
);
<?php

namespace HumbugBox420\KevinGH\RequirementChecker;

use function exec;
use function fclose;
use function fopen;
use function function_exists;
use function getenv;
use function is_resource;
use function preg_match;
use function proc_close;
use function proc_open;
use function sapi_windows_vt100_support;
use function stream_get_contents;
use function trim;
use const DIRECTORY_SEPARATOR;
class Terminal
{
    private static $width;
    private static $height;
    private static $stty;
    public function getWidth() : int
    {
        $width = getenv('COLUMNS');
        if (\false !== $width) {
            return (int) trim($width);
        }
        if (!isset(self::$width)) {
            self::initDimensions();
        }
        return self::$width ?: 80;
    }
    public function getHeight() : int
    {
        $height = getenv('LINES');
        if (\false !== $height) {
            return (int) trim($height);
        }
        if (!isset(self::$height)) {
            self::initDimensions();
        }
        return self::$height ?: 50;
    }
    public static function hasSttyAvailable() : bool
    {
        if (isset(self::$stty)) {
            return self::$stty;
        }
        if (!function_exists('exec')) {
            return \false;
        }
        exec('stty 2>&1', $output, $exitcode);
        return self::$stty = 0 === $exitcode;
    }
    private static function initDimensions() : void
    {
        if ('\\' === DIRECTORY_SEPARATOR) {
            if (preg_match('/^(\\d+)x(\\d+)(?: \\((\\d+)x(\\d+)\\))?$/', trim(getenv('ANSICON')), $matches)) {
                self::$width = (int) $matches[1];
                self::$height = isset($matches[4]) ? (int) $matches[4] : (int) $matches[2];
            } elseif (!self::hasVt100Support() && self::hasSttyAvailable()) {
                self::initDimensionsUsingStty();
            } elseif (null !== ($dimensions = self::getConsoleMode())) {
                self::$width = (int) $dimensions[0];
                self::$height = (int) $dimensions[1];
            }
        } else {
            self::initDimensionsUsingStty();
        }
    }
    private static function hasVt100Support() : bool
    {
        return function_exists('sapi_windows_vt100_support') && sapi_windows_vt100_support(fopen('php://stdout', 'wb'));
    }
    private static function initDimensionsUsingStty() : void
    {
        if ($sttyString = self::getSttyColumns()) {
            if (preg_match('/rows.(\\d+);.columns.(\\d+);/i', $sttyString, $matches)) {
                self::$width = (int) $matches[2];
                self::$height = (int) $matches[1];
            } elseif (preg_match('/;.(\\d+).rows;.(\\d+).columns/i', $sttyString, $matches)) {
                self::$width = (int) $matches[2];
                self::$height = (int) $matches[1];
            }
        }
    }
    private static function getConsoleMode() : ?array
    {
        $info = self::readFromProcess('mode CON');
        if (null === $info || !preg_match('/--------+\\r?\\n.+?(\\d+)\\r?\\n.+?(\\d+)\\r?\\n/', $info, $matches)) {
            return null;
        }
        return array((int) $matches[2], (int) $matches[1]);
    }
    private static function getSttyColumns() : ?string
    {
        return self::readFromProcess('stty -a | grep columns');
    }
    private static function readFromProcess(string $command) : ?string
    {
        if (!function_exists('proc_open')) {
            return null;
        }
        $descriptorspec = [1 => ['pipe', 'w'], 2 => ['pipe', 'w']];
        $process = proc_open($command, $descriptorspec, $pipes, null, null, ['suppress_errors' => \true]);
        if (!is_resource($process)) {
            return null;
        }
        $info = stream_get_contents($pipes[1]);
        fclose($pipes[1]);
        fclose($pipes[2]);
        proc_close($process);
        return $info;
    }
}
<?php

namespace HumbugBox420\KevinGH\RequirementChecker;

use function array_shift;
use function count;
use function explode;
use function ltrim;
use function min;
use function sprintf;
use function str_pad;
use function str_repeat;
use function strlen;
use function trim;
use function wordwrap;
use const PHP_EOL;
final class Printer
{
    private $styles = ['reset' => "\x1b[0m", 'red' => "\x1b[31m", 'green' => "\x1b[32m", 'yellow' => "\x1b[33m", 'title' => "\x1b[33m", 'error' => "\x1b[37;41m", 'success' => "\x1b[30;42m"];
    private $verbosity;
    private $supportColors;
    private $width;
    public function __construct(int $verbosity, bool $supportColors, ?int $width = null)
    {
        if (null === $width) {
            $terminal = new Terminal();
            $width = $terminal->getWidth();
        }
        $this->verbosity = $verbosity;
        $this->supportColors = $supportColors;
        $this->width = $width ?: 80;
    }
    public function getVerbosity() : int
    {
        return $this->verbosity;
    }
    public function setVerbosity($verbosity) : void
    {
        $this->verbosity = $verbosity;
    }
    public function title(string $title, int $verbosity, ?string $style = null) : void
    {
        if (null === $style) {
            $style = 'title';
        }
        $this->printvln('', $verbosity, $style);
        $this->printvln($title, $verbosity, $style);
        $this->printvln(str_repeat('=', min(strlen($title), $this->width)), $verbosity, $style);
        $this->printvln('', $verbosity, $style);
    }
    public function getRequirementErrorMessage(Requirement $requirement) : ?string
    {
        if ($requirement->isFulfilled()) {
            return null;
        }
        return wordwrap($requirement->getTestMessage(), $this->width - 3, PHP_EOL . '   ') . PHP_EOL;
    }
    public function block(string $title, string $message, int $verbosity, ?string $style = null) : void
    {
        $prefix = ' [' . $title . '] ';
        $lineLength = $this->width - strlen($prefix) - 1;
        if ($lineLength < 0) {
            $lineLength = 0;
        }
        $message = $prefix . trim($message);
        $lines = [];
        $remainingMessage = $message;
        $wrapped = wordwrap($remainingMessage, $lineLength, 'Â¬');
        $wrapped = explode('Â¬', $wrapped);
        do {
            $line = array_shift($wrapped);
            if ($lines && $lineLength > 0) {
                $line = str_repeat(' ', strlen($prefix)) . ltrim($line);
            }
            $lines[] = str_pad($line, $this->width, ' ', \STR_PAD_RIGHT);
        } while (count($wrapped));
        $this->printvln('', $verbosity);
        $this->printvln(str_repeat(' ', $this->width), $verbosity, $style);
        foreach ($lines as $line) {
            $this->printvln($line, $verbosity, $style);
        }
        $this->printv(str_repeat(' ', $this->width), $verbosity, $style);
        $this->printvln('', $verbosity);
    }
    public function printvln(string $message, int $verbosity, ?string $style = null) : void
    {
        $this->printv($message, $verbosity, $style);
        $this->printv(PHP_EOL, $verbosity, null);
    }
    public function printv(string $message, int $verbosity, ?string $style = null) : void
    {
        if ($verbosity > $this->verbosity) {
            return;
        }
        $message = wordwrap($message, $this->width);
        $message = sprintf('%s%s%s', $this->supportColors && isset($this->styles[$style]) ? $this->styles[$style] : '', $message, $this->supportColors ? $this->styles['reset'] : '');
        if (\getenv('BOX_REQUIREMENTS_CHECKER_LOG_TO_STDOUT') === '1') {
            echo $message;
        } else {
            \fwrite(\STDERR, $message);
        }
    }
}
<?php

namespace HumbugBox420\KevinGH\RequirementChecker;

use HumbugBox420\Composer\Semver\Semver;
use function sprintf;
final class IsPhpVersionFulfilled implements IsFulfilled
{
    private $requiredPhpVersion;
    public function __construct(string $requiredPhpVersion)
    {
        $this->requiredPhpVersion = $requiredPhpVersion;
    }
    public function __invoke() : bool
    {
        return Semver::satisfies(sprintf('%d.%d.%d', \PHP_MAJOR_VERSION, \PHP_MINOR_VERSION, \PHP_RELEASE_VERSION), $this->requiredPhpVersion);
    }
}
<?php

namespace HumbugBox420\KevinGH\RequirementChecker;

use ArrayIterator;
use Countable;
use IteratorAggregate;
use Traversable;
use function count;
use function get_cfg_var;
final class RequirementCollection implements IteratorAggregate, Countable
{
    private $requirements = [];
    public function getIterator() : Traversable
    {
        return new ArrayIterator($this->requirements);
    }
    public function count() : int
    {
        return count($this->requirements);
    }
    public function add(Requirement $requirement) : void
    {
        $this->requirements[] = $requirement;
    }
    public function addRequirement(IsFulfilled $checkIsFulfilled, string $testMessage, string $helpText) : void
    {
        $this->add(new Requirement($checkIsFulfilled, $testMessage, $helpText));
    }
    public function getRequirements() : array
    {
        return $this->requirements;
    }
    public function getPhpIniPath()
    {
        return get_cfg_var('cfg_file_path');
    }
    public function evaluateRequirements()
    {
        return \array_reduce($this->requirements, function (bool $checkPassed, Requirement $requirement) : bool {
            return $checkPassed && $requirement->isFulfilled();
        }, \true);
    }
}
<?php

namespace HumbugBox420\KevinGH\RequirementChecker;

final class Requirement
{
    private $checkIsFulfilled;
    private $fulfilled;
    private $testMessage;
    private $helpText;
    public function __construct(IsFulfilled $checkIsFulfilled, string $testMessage, string $helpText)
    {
        $this->checkIsFulfilled = $checkIsFulfilled;
        $this->testMessage = $testMessage;
        $this->helpText = $helpText;
    }
    public function isFulfilled() : bool
    {
        if (!isset($this->fulfilled)) {
            $this->fulfilled = $this->checkIsFulfilled->__invoke();
        }
        return $this->fulfilled;
    }
    public function getIsFullfilledChecker() : IsFulfilled
    {
        return $this->checkIsFulfilled;
    }
    public function getTestMessage() : string
    {
        return $this->testMessage;
    }
    public function getHelpText() : string
    {
        return $this->helpText;
    }
}
<?php

namespace HumbugBox420\KevinGH\RequirementChecker;

interface IsFulfilled
{
    public function __invoke() : bool;
}
<?php

namespace HumbugBox420\KevinGH\RequirementChecker;

final class Checker
{
    private static $requirementsConfig;
    public static function checkRequirements() : bool
    {
        $requirements = self::retrieveRequirements();
        $checkPassed = $requirements->evaluateRequirements();
        $io = new IO();
        self::printCheck($checkPassed, new Printer($io->getVerbosity(), $io->hasColorSupport()), $requirements);
        return $checkPassed;
    }
    public static function printCheck($checkPassed, Printer $printer, RequirementCollection $requirements) : void
    {
        if (\false === $checkPassed && IO::VERBOSITY_VERY_VERBOSE > $printer->getVerbosity()) {
            $printer->setVerbosity(IO::VERBOSITY_VERY_VERBOSE);
        }
        $verbosity = IO::VERBOSITY_VERY_VERBOSE;
        $iniPath = $requirements->getPhpIniPath();
        $printer->title('Box Requirements Checker', $verbosity);
        $printer->printv('> Using PHP ', $verbosity);
        $printer->printvln(\PHP_VERSION, $verbosity, 'green');
        $printer->printvln('> PHP is using the following php.ini file:', $verbosity);
        if ($iniPath) {
            $printer->printvln('  ' . $iniPath, $verbosity, 'green');
        } else {
            $printer->printvln('  WARNING: No configuration file (php.ini) used by PHP!', $verbosity, 'yellow');
        }
        $printer->printvln('', $verbosity);
        if (\count($requirements) > 0) {
            $printer->printvln('> Checking Box requirements:', $verbosity);
            $printer->printv('  ', $verbosity);
        } else {
            $printer->printvln('> No requirements found.', $verbosity);
        }
        $errorMessages = [];
        foreach ($requirements->getRequirements() as $requirement) {
            if ($errorMessage = $printer->getRequirementErrorMessage($requirement)) {
                if (IO::VERBOSITY_DEBUG === $printer->getVerbosity()) {
                    $printer->printvln('âœ˜ ' . $requirement->getTestMessage(), IO::VERBOSITY_DEBUG, 'red');
                    $printer->printv('  ', IO::VERBOSITY_DEBUG);
                    $errorMessages[] = $errorMessage;
                } else {
                    $printer->printv('E', $verbosity, 'red');
                    $errorMessages[] = $errorMessage;
                }
                continue;
            }
            if (IO::VERBOSITY_DEBUG === $printer->getVerbosity()) {
                $printer->printvln('âœ” ' . $requirement->getHelpText(), IO::VERBOSITY_DEBUG, 'green');
                $printer->printv('  ', IO::VERBOSITY_DEBUG);
            } else {
                $printer->printv('.', $verbosity, 'green');
            }
        }
        if (IO::VERBOSITY_DEBUG !== $printer->getVerbosity() && \count($requirements) > 0) {
            $printer->printvln('', $verbosity);
        }
        if ($requirements->evaluateRequirements()) {
            $printer->block('OK', 'Your system is ready to run the application.', $verbosity, 'success');
        } else {
            $printer->block('ERROR', 'Your system is not ready to run the application.', $verbosity, 'error');
            $printer->title('Fix the following mandatory requirements:', $verbosity, 'red');
            foreach ($errorMessages as $errorMessage) {
                $printer->printv(' * ' . $errorMessage, $verbosity);
            }
        }
        $printer->printvln('', $verbosity);
    }
    private static function retrieveRequirements() : RequirementCollection
    {
        if (null === self::$requirementsConfig) {
            self::$requirementsConfig = __DIR__ . '/../.requirements.php';
        }
        $config = (require self::$requirementsConfig);
        $requirements = new RequirementCollection();
        foreach ($config as $constraint) {
            $requirements->addRequirement('php' === $constraint['type'] ? new IsPhpVersionFulfilled($constraint['condition']) : new IsExtensionFulfilled($constraint['condition']), $constraint['message'], $constraint['helpMessage']);
        }
        return $requirements;
    }
}
<?php

namespace HumbugBox420\KevinGH\RequirementChecker;

use function fstat;
use function function_exists;
use function getenv;
use function implode;
use function posix_isatty;
use function preg_match;
use function preg_quote;
use function sapi_windows_vt100_support;
use function sprintf;
use function str_replace;
use function stream_isatty;
use const STDOUT;
final class IO
{
    public const VERBOSITY_QUIET = 16;
    public const VERBOSITY_NORMAL = 32;
    public const VERBOSITY_VERBOSE = 64;
    public const VERBOSITY_VERY_VERBOSE = 128;
    public const VERBOSITY_DEBUG = 256;
    private $interactive;
    private $verbosity = self::VERBOSITY_NORMAL;
    private $colorSupport;
    private $options;
    public function __construct()
    {
        $this->options = implode(' ', $_SERVER['argv']);
        $shellVerbosity = $this->configureVerbosity();
        $this->interactive = $this->checkInteractivity($shellVerbosity);
        $this->colorSupport = $this->checkColorSupport();
    }
    public function isInteractive() : bool
    {
        return $this->interactive;
    }
    public function getVerbosity() : int
    {
        return $this->verbosity;
    }
    public function hasColorSupport() : bool
    {
        return $this->colorSupport;
    }
    public function hasParameter($values) : bool
    {
        $values = (array) $values;
        foreach ($values as $value) {
            $regexp = sprintf('/\\s%s\\b/', str_replace(' ', '\\s+', preg_quote($value, '/')));
            if (1 === preg_match($regexp, $this->options)) {
                return \true;
            }
        }
        return \false;
    }
    private function checkInteractivity(int $shellVerbosity) : bool
    {
        if (-1 === $shellVerbosity) {
            return \false;
        }
        if (\true === $this->hasParameter(['--no-interaction', '-n'])) {
            return \false;
        }
        if (function_exists('posix_isatty') && !@posix_isatty(STDOUT) && \false === getenv('SHELL_INTERACTIVE')) {
            return \false;
        }
        return \true;
    }
    private function configureVerbosity() : int
    {
        switch ($shellVerbosity = (int) getenv('SHELL_VERBOSITY')) {
            case -1:
                $this->verbosity = self::VERBOSITY_QUIET;
                break;
            case 1:
                $this->verbosity = self::VERBOSITY_VERBOSE;
                break;
            case 2:
                $this->verbosity = self::VERBOSITY_VERY_VERBOSE;
                break;
            case 3:
                $this->verbosity = self::VERBOSITY_DEBUG;
                break;
            default:
                $shellVerbosity = 0;
                break;
        }
        if ($this->hasParameter(['--quiet', '-q'])) {
            $this->verbosity = self::VERBOSITY_QUIET;
            $shellVerbosity = -1;
        } elseif ($this->hasParameter(['-vvv', '--verbose=3', '--verbose 3'])) {
            $this->verbosity = self::VERBOSITY_DEBUG;
            $shellVerbosity = 3;
        } elseif ($this->hasParameter(['-vv', '--verbose=2', '--verbose 2'])) {
            $this->verbosity = self::VERBOSITY_VERY_VERBOSE;
            $shellVerbosity = 2;
        } elseif ($this->hasParameter(['-v', '--verbose=1', '--verbose 1', '--verbose'])) {
            $this->verbosity = self::VERBOSITY_VERBOSE;
            $shellVerbosity = 1;
        }
        return $shellVerbosity;
    }
    private function checkColorSupport() : bool
    {
        if ($this->hasParameter(['--ansi'])) {
            return \true;
        }
        if ($this->hasParameter(['--no-ansi'])) {
            return \false;
        }
        if (\DIRECTORY_SEPARATOR === '\\') {
            return function_exists('sapi_windows_vt100_support') && sapi_windows_vt100_support(STDOUT) || \false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM');
        }
        if (function_exists('stream_isatty')) {
            return stream_isatty(STDOUT);
        }
        if (function_exists('posix_isatty')) {
            return posix_isatty(STDOUT);
        }
        $stat = fstat(STDOUT);
        return $stat ? 020000 === ($stat['mode'] & 0170000) : \false;
    }
}
<?php

namespace HumbugBox420\KevinGH\RequirementChecker;

use function extension_loaded;
final class IsExtensionFulfilled implements IsFulfilled
{
    private $requiredExtension;
    public function __construct(string $requiredExtension)
    {
        $this->requiredExtension = $requiredExtension;
    }
    public function __invoke() : bool
    {
        return extension_loaded($this->requiredExtension);
    }
}
<?php

namespace _HumbugBoxb47773b41c19;

return array (
  0 => 
  array (
    'type' => 'php',
    'condition' => '^5.3.2 || ^7.0 || ^8.0',
    'message' => 'The package "composer/xdebug-handler" requires the version "^5.3.2 || ^7.0 || ^8.0" or greater.',
    'helpMessage' => 'The package "composer/xdebug-handler" requires the version "^5.3.2 || ^7.0 || ^8.0" or greater.',
  ),
  1 => 
  array (
    'type' => 'php',
    'condition' => '^7.3|^8.0',
    'message' => 'The package "laravel-zero/phar-updater" requires the version "^7.3|^8.0" or greater.',
    'helpMessage' => 'The package "laravel-zero/phar-updater" requires the version "^7.3|^8.0" or greater.',
  ),
  2 => 
  array (
    'type' => 'php',
    'condition' => '>=5.3.0',
    'message' => 'The package "psr/log" requires the version ">=5.3.0" or greater.',
    'helpMessage' => 'The package "psr/log" requires the version ">=5.3.0" or greater.',
  ),
  3 => 
  array (
    'type' => 'php',
    'condition' => '^7.2 || ^8.0',
    'message' => 'The package "webmozart/assert" requires the version "^7.2 || ^8.0" or greater.',
    'helpMessage' => 'The package "webmozart/assert" requires the version "^7.2 || ^8.0" or greater.',
  ),
  4 => 
  array (
    'type' => 'php',
    'condition' => '>=5.3.3',
    'message' => 'The package "webmozart/path-util" requires the version ">=5.3.3" or greater.',
    'helpMessage' => 'The package "webmozart/path-util" requires the version ">=5.3.3" or greater.',
  ),
  5 => 
  array (
    'type' => 'extension',
    'condition' => 'json',
    'message' => 'The package "webflo/drupal-finder" requires the extension "json". Enable it or install a polyfill.',
    'helpMessage' => 'The package "webflo/drupal-finder" requires the extension "json".',
  ),
  6 => 
  array (
    'type' => 'extension',
    'condition' => 'ctype',
    'message' => 'The package "webmozart/assert" requires the extension "ctype". Enable it or install a polyfill.',
    'helpMessage' => 'The package "webmozart/assert" requires the extension "ctype".',
  ),
);<?php

namespace HumbugBox420\KevinGH\RequirementChecker;

require __DIR__ . '/../vendor/autoload.php';
if (\false === \in_array(\PHP_SAPI, array('cli', 'phpdbg', 'embed'), \true)) {
    echo \PHP_EOL . 'The application may only be invoked from a command line, got "' . \PHP_SAPI . '"' . \PHP_EOL;
    exit(1);
}
if ((\false === isset($_SERVER['BOX_REQUIREMENT_CHECKER']) || \true === (bool) $_SERVER['BOX_REQUIREMENT_CHECKER']) && \false === Checker::checkRequirements()) {
    exit(1);
}
³I2¿vLÇ�)Oˆü,©háÕÜ   GBMB