File "ShouldDisplayAndConditions.php"

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

<?php

namespace FSVendor\Octolize\Tracker\OptInNotice;

/**
 * Should display AND conditions.
 */
class ShouldDisplayAndConditions implements \FSVendor\Octolize\Tracker\OptInNotice\ShouldDisplay
{
    /**
     * @var ShouldDisplay[]
     */
    private $conditions = [];
    /**
     * @param ShouldDisplay $should_display
     *
     * @return void
     */
    public function add_should_diaplay_condition(\FSVendor\Octolize\Tracker\OptInNotice\ShouldDisplay $should_display)
    {
        $this->conditions[] = $should_display;
    }
    /**
     * @inheritDoc
     */
    public function should_display()
    {
        foreach ($this->conditions as $condition) {
            if (!$condition->should_display()) {
                return \false;
            }
        }
        return \true;
    }
}