HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: /home/mirz4654/public_html/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 );
	}
}