Test whether given value can be deduplicated

@param  mixed $value
@return bool
969418
protected function canDeduplicate($value)
	{
		if (is_array($value) || $value instanceof Dictionary)
		{
			// Do not deduplicate empty arrays and dictionaries
			return (bool) count($value);
		}

		return ($value instanceof Code);
	}
322439
public function isValid($value)
    {
        if ($value == $this->allowName) {
            return true;
        }
        
        foreach ($this->getUser()->getGroups() as $group) {
            if ($group->getName() == $value) {
                $this->error(self::MSG_NOT_UNIQUE, $value);
                return false;
            }
        }
        return true;
    }
159800
public static function isBooleanValue(string $value): bool
    {
        return in_array(strtolower(trim($value)), StringUtils::TRUES) || in_array(strtolower(trim($value)), StringUtils::FALSES);
    }
1093119
function isValid($value)
	{
		static $combined = null;
		if ($combined === null) {
			$combined = array_combine($this->members, $this->members);
		}
		return isset($combined[$value]);
	}
884531
public static function toUnrestrictedDouble($value)
    {
        if (self::isFloatCastable($value)) {
            return (float)($value instanceof \GMP || is_resource($value) && get_resource_type($value) === 'GMP integer'
                ? gmp_strval($value)
                : $value);
        } else {
            throw new \InvalidArgumentException(ErrorMessageCreator::create($value, 'double (a float)'));
        }
    }
976626
private function isCountable($value): bool
    {
        return is_string($value) || is_array($value) || $value instanceof \Countable || $value instanceof \Traversable;
    }
14798
public function isValueValid($value) {
		return $value instanceof Type\MonetaryAmount || $value instanceof DataType\NumberType || $value instanceof Type\PriceSpecification;
	}
1312272
protected function isValueTooHigh($value)
    {
        // check if the value is not to high.
        if ($this->max !== null) {
            if (((function_exists('bcsub') && floatval(bcsub(
                $this->max,
                $value,
                4
            )) < 0) || $value > $this->max) && ((string)$this->max) != ((string)$value)
            ) {
                return true;
            }
        }
        return false;
    }
740107
protected function canBeInlined($value)
    {
        if (!is_array($value) || $this->isKeysNumeric($value)) {
            return false;
        }
        foreach ($value as $v) {
            if (is_array($v)) {
                return false;
            }
        }

        return true;
    }
1069426
private function doubledModifier($value, $modifier)
	{
		if (($count = substr_count($value, $modifier)) > 0) {
			$value = $count > 1 ? str_replace($modifier . $modifier, $modifier, $value) : $value;
			if (($count % 2) > 0) {
				return [TRUE, $value];
			}
		}

		return [FALSE, $value];
	}
967540
protected function _isEncodedArrayFieldValue($value)
    {
        if (!is_array($value)) {
            return false;
        }

        unset($value['__empty']);
        foreach ($value as $_id => $row) {
            if (!is_array($row) || !array_key_exists(
                'installment_currency',
                $row
            ) || !array_key_exists(
                'installment_boundary',
                $row
            ) || !array_key_exists(
                'installment_frequency',
                $row
            ) || !array_key_exists('installment_interest', $row)) {
                return false;
            }
        }

        return true;
    }
549433
public static function isStringCastable($value): bool
    {
        $result = false;
        $type = strtolower(gettype($value));
        switch ($type) {
            case 'string':
            case 'null':
            case 'boolean':
            case 'integer':
            case 'double':
                $result = true;
                break;
            case 'object':
                if (method_exists($value, '__toString')) {
                    $result = true;
                }
                break;
            default:
                break;
        }

        return $result;
    }
604478
public function isValueValid($value) {
		return $value instanceof DataType\NumberType || $value instanceof Type\PriceSpecificationType || $value instanceof DataType\TextType;
	}
113635
public function isValueValid($value) {
		return $value instanceof Type\MonetaryAmountType || $value instanceof DataType\NumberType || $value instanceof Type\PriceSpecificationType;
	}
775089
public static function isStringable($value)
	{
		return is_string($value)
				|| is_null($value)
				|| (is_object($value) && method_exists($value, '__toString'))
				|| is_scalar($value);
	}
312228
public function containsValue($value): bool {
        $node = $this->getHead();
        while ($node !== null) {
            if (Comparator::equals($node->getValue(), $value)) {
                return true;
            }
            $node = $node->getNext();
        }
        return false;
    }
393592
private function isUnixTimestamp($value): bool
    {
        return
            (string)(float)$value == (string)$value &&
            ((float)$value <= PHP_INT_MAX) &&
            ((float)$value >= ~PHP_INT_MAX)
            ;
    }