Verify that a minimum WP version is met.

@param  string $version Version string.

@return self
342395
public function wp_at_least( $version ) {
		return $this->add_check(
			function() use ( $version ) {
				return version_compare( get_bloginfo( 'version' ), $version, '>=' );
			},
			sprintf( 'WordPress %s or newer is required', $version )
		);
	}
57981
protected static function cleanExtraVersion($version)
    {
        $pos = strpos($version, '-');

        if (false !== $pos) {
            $version = substr($version, 0, $pos);
        }

        return $version;
    }
936576
public function hasBuckram( $version = 0 ) {
		if ( $this->isCurrentThemeCompatible( 2 ) && version_compare( $this->getBuckramVersion(), $version ) >= 0 ) {
			return true;
		}
		return false;
	}
182368
public function shouldProcess(Version $version)
    {
        $versionTypeObject = $version->getTypeObject();

        return $versionTypeObject->getGenericType() == Type::T_IMAGE && $versionTypeObject->isSVG();
    }
574618
public function useVersion(string $version)
    {
        if (! \array_key_exists($version, $this->supportedVersions)) {
            throw new InvalidArgumentException("API version [{$version}] is not supported.");
        }

        $this->defaultVersion = $version;

        return $this;
    }
76194
public function httpVersion($version) {

		if(false === defined($version)) {
			return trigger_error(sprintf('Argument 1 passed to %s() is not a valid HTTP protocol version', __METHOD__), E_USER_ERROR);
		}

		$this -> options[CURLOPT_HTTP_VERSION] = constant($version);

		return $this;
	}
68338
public static function convertDateVersion($version)
    {
        if (preg_match('/^\d{7,}\./', $version)) {
            $pos = strpos($version, '.');
            $version = substr($version, 0, $pos).self::convertDateMinorVersion(substr($version, $pos + 1));
        }

        return $version;
    }
474558
protected function isVersionIsGreaterOrEqual($version, $other) {
    $max = min(count($version), count($other));
    for ($i = 0; $i < $max; $i++) {
      if ($version[$i] < $other[$i]) {
        return false;
      }
    }
    return true;
  }
1283063
public static function fromString(string $version) : Version
    {
        $patternMajor      = '(?P<major>[0-9]+)';
        $patternMinor      = '(?P<minor>[0-9]+)';
        $patternPatch      = '(?P<patch>[0-9]+)';
        $patternPreRelease = '(?:-(?P<prerelease>(?:[0-9A-Za-z-]+\.)*(?:[0-9A-Za-z-]+)))?';
        $patternBuild      = '(?:\+(?P<build>(?:[0-9A-Za-z-]+\.)*(?:[0-9A-Za-z-]+)))?';

        $pattern = '#^'.$patternMajor.'\.'.$patternMinor.'\.'.$patternPatch.$patternPreRelease.$patternBuild.'$#';
        if (!preg_match($pattern, $version, $matches)) {
            throw new InvalidArgumentException(sprintf('The string "%s" does not look like a version.', $version));
        }

        return new static(
            (int) $matches['major'],
            (int) $matches['minor'],
            (int) $matches['patch'],
            $matches['prerelease'] ?? '',
            $matches['build'] ?? ''
        );
    }
814130
public function setProtocolVersion($version)
	{
		if (!array_key_exists($version, self::$protocolVersionMap)) {
			throw new InvalidArgumentException(sprintf('The HTTP protkoll version %s is unknown', $version));			
		}

		$this->protocolVersion = $version;

		return $this;
	}
1103561
public function setPhingVersion($version)
    {
        $version = str_replace('phing', '', strtolower($version));
        $this->phingVersion = (string) trim($version);
    }
1031298
public function setProtocolVersion($version)
    {
        if (!preg_match('/^\d(\.\d+)+$/', $version))
        {
            throw new InvalidArgumentException('Invalid protocol version: ' . $version);
        }
        $this->protocolVersion = $version;
        return $this;
    }
940741
public function setHTTPVersion(int $version)
    {
        $this->http_version = ($version === 1 ? '1.0' : '' . $version);

        if ($this->http_version !== '1.0' && $this->http_version !== '1.1') {
            throw new RuntimeException('HTTP version  must be 1.0 or 1.1');
        }
    }
675008
public function removeVersion($version)
    {
        $versionParser = new VersionParser();

        if ($version instanceof PackageInterface) {
            $normalizedVersion = $version->getVersion();
        } elseif (is_string($version)) {
            $normalizedVersion = $versionParser->normalize($version);
        } else {
            throw new \InvalidArgumentException(
                'You have to pass either an instance of PackageInterface or a version string to remove a version ' .
                'from this package object!'
            );
        }

        foreach ($this->getVersions() as $key => $attachedVersion) {
            if ($attachedVersion->getVersion() == $normalizedVersion) {
                unset($this->versions[$key]);
            }
        }

        return $this;
    }
773964
public static function isValidProtocolVersion($version)
    {
        if (!is_string($version) || empty($version)) {
            return false;
        }

        return (bool) preg_match('#^(1\.[01]|2)$#', $version);
    }
1173187
public function withProtocolVersion($version)
    {
        if (in_array($version, ['1.0', '1.1', '2.0']) === false) {
            throw new InvalidArgumentException('You may only use a valid http protocol version, %d provided', $version);
        }

        return $this->_clone('protocol', $version);
    }
563535
public function version($version = null)
    {
        if (!$version) {
            $versionParts = explode('.', \Peridot\Console\Version::NUMBER);
            $versionParts[count($versionParts)-1]++;
            $version = implode('.', $versionParts);
        }
        $versionFile = __DIR__ . '/src/Console/Version.php';
        $this->taskReplaceInFile($versionFile)
            ->from('NUMBER = "' . \Peridot\Console\Version::NUMBER . '"')
            ->to('NUMBER = "' . $version . '"')
            ->run();

        return $version;
    }