Skip to content
Snippets Groups Projects
Select Git revision
  • 5e54f36b1166a5cc8f65ca69d435de90155ac683
  • master default protected
  • 1.1.0
  • 1.0
4 results

ConstantNotDefinedStrategy.php

Blame
  • ConstantNotDefinedStrategy.php 329 B
    <?php
    
    namespace WPDesk\ShowDecision;
    
    class ConstantNotDefinedStrategy implements ShouldShowStrategy
    {
    
    	/**
    	 * @var string
    	 */
    	private string $constant;
    
    	public function __construct(string $constant)
    	{
    		$this->constant = $constant;
    	}
    
    	public function shouldDisplay(): bool
    	{
    		return ! defined($this->constant);
    	}
    
    }