@param string       $value
@param BoolOperator $boolOperator

@return Mention
540610
protected function createMention(string $value, BoolOperator $boolOperator): Mention
    {
        $boolOperator = $boolOperator->equals(BoolOperator::OPTIONAL()) ? BoolOperator::REQUIRED() : $boolOperator;
        $m = $this->getModifiers();
        return new Mention($value, $boolOperator, $m['use_boost'], $m['boost']);
    }
1291434
public function setPlaceholder($value = false)
    {
        // par default on met la valeur du champs
        if ($value === false) {
            $value = $this->getLabel();
        }

        return $this->addAttribute('placeholder', $value);
    }
294941
protected function getBoolFromStringInt($value)
    {
        if (!($value == '0' || $value == '1')) {
            $this->throwException(sprintf('Expected "0" or "1" but got: %s', $value));
        }

        return (bool) $value;
    }
1119935
public static function toBooleanEx($value) {
		if (isset($value)) {
			if (is_bool($value)) {
				return $value;
			}
			$value = strtolower(trim($value));
			if (in_array($value, self::$trueValues)) {
				return true;
			}
			if (in_array($value, self::$falseValues)) {
				return false;
			}
		}
		
		throw new \n2n\log4php\LoggerException("Given value [" . var_export($value, true) . "] cannot be converted to boolean.");
	}
683399
public function exor($value){
        if($this->value !== null){
            return $this->markErrorIf($value !== null);
        }
        if($value !== null){
            return $this->markErrorIf($this->value !== null);
        }
        return $this;
    }
1035978
public function with($value): ValidableInterface
    {
        parent::with($value);
        
        if (false === ($value instanceof EntityInterface)) {
            throw new ValidatorException(sprintf('Validator accept only (%s) objects', EntityInterface::class));
        }
        
        return $this;
    }
1283582
public function displayValue( $value )
    {
        if ( ! is_bool( $value ) )
        {
            $value = (string) $value;
        }
        
        return ( in_array( $value, $this->validTrues, true ) )
                ? self::TRUE : self::FALSE;
    }
856638
public static function boolean($value, $options = null)
    {
        if (!is_null($options)) {
            $options = explode('|', $options);
        }

        if (sizeof($options) != 2) {
            $options = array('No', 'Yes');
        }

        return $options[!!$value];
    }
1352445
public static function toBoolean($value)
    {
        if (is_string($value)) {
            if ($value === 'true') {
                $value = true;
            } else {
                $value = false;
            }
        } elseif (is_bool($value) === false) {
            $value = false;
        }

        return $value;
    }
1027836
public function boolNode($value = null, bool $allowSerializeEmpty = false): BoolNode
    {
        return BoolNode::create($value, $allowSerializeEmpty);
    }
403819
protected function getBooleanCode($value)
    {
        if ($value && ('true' == $value || true === $value)) {
            return '1';
        } else {
            if ('false' == $value || false === $value) {
                return '0';
            }
        }

        return (bool) $value;
    }
1151782
public static function toBool($value)
    {
        if ($value instanceof Countable) {
            return (bool)count($value);
        }

        if (!static::isStringLike($value)) {
            return (bool)$value;
        }

        $string = "$value";

        if (trim($string) == '') {
            return false;
        }

        if (in_array(strtolower($value), ['0', 'false'], true)) {
            return false;
        }

        return (bool)$string;

    }
348357
public static function doCast($castTypeOperator, $value)
    {
        if (!isset(self::$castTypeMap[$castTypeOperator])) {
            throw new PinqException('Cast operator \'%s\' is not supported', $castTypeOperator);
        }

        settype($value, self::$castTypeMap[$castTypeOperator]);

        return $value;
    }
1109685
public function when($value, $true_call, $false_call = null)
    {
        if ($value) {
            $true_call($this, $value);
        } elseif ($false_call) {
            $false_call($this, $value);
        }

        return $this;
    }
668110
public function addValue(\google\protobuf\EnumValueDescriptorProto $value)
    {
        if ($this->value === null) {
            $this->value = new \Protobuf\MessageCollection();
        }

        $this->value->add($value);
    }
948503
public function parseBooleanValue($value)
    {
        if (is_bool($value)) {
            return $value;
        }
        switch (strtolower($value)) {
            case 'true':
                return true;
            case 'false':
                return false;
        }

        throw new RuntimeException("Unknown boolean value '{$value}'.");
    }
56738
public function whereCarried($column, $operator = null, $value = null, $boolean = 'and')
    {
        $type = 'Carried';

        $this->wheres[] = compact('type', 'column', 'operator', 'value', 'boolean');

        return $this;
    }