requiredVersion = $requiredVersion; $this->requiredPluginName = $requiredPluginName; $this->error = ''; $this->message = ''; } /** * Check if $actualVersion less then $requiredVersion. * * @param string $actualVersion * * @return bool * @throws ConstraintFailedException */ protected function checkVersion($actualVersion) { $result = version_compare( $actualVersion, $this->requiredVersion, '>=' ); if ($result) { return $result; } throw new ConstraintFailedException( $this, // phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- Constraint instance is stored on the exception, not output. esc_html($actualVersion), [esc_html($this->error)], esc_html($this->message) ); } }