File "ShouldDisplayGetParameterValue.php"

Full Path: /home/jlklyejr/public_html/wp-content/test/wp-content/plugins/flexible-shipping/vendor_prefixed/octolize/wp-octolize-tracker/src/OptInNotice/ShouldDisplayGetParameterValue.php
File size: 724 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace FSVendor\Octolize\Tracker\OptInNotice;

/**
 * Should display $_GET parameter value.
 */
class ShouldDisplayGetParameterValue implements \FSVendor\Octolize\Tracker\OptInNotice\ShouldDisplay
{
    /**
     * @var string
     */
    private $parameter;
    /**
     * @var string
     */
    private $value;
    /**
     * @param string $parameter
     * @param string $value
     */
    public function __construct(string $parameter, string $value)
    {
        $this->parameter = $parameter;
        $this->value = $value;
    }
    /**
     * @inheritDoc
     */
    public function should_display()
    {
        return isset($_GET[$this->parameter]) && $_GET[$this->parameter] === $this->value;
    }
}