Performs deep MX check

@param array $value
@return bool
775757
private function deepMxCheck(array $value = []): bool
    {
        $isValid = false;
        foreach ($value as $host => $weight) {
            $res = $this->isReserved($host);
            if (!$res && (\checkdnsrr($host, 'A') || \checkdnsrr($host, 'AAAA') || \checkdnsrr($host, 'A6'))) {
                $isValid = true;
                break;
            }
        }
        return $isValid;
    }
240420
private static function isAssoc($value)
	{
		if(!is_array($value)) return false;
		return array_keys($value) !== range(0, count($value) - 1);
	}
20090
protected function isArrayWithNonNumericKeys($value)
    {
        if (!is_array($value)) {
            return false;
        }

        foreach ($value as $key=>$value) {
            if (is_numeric($key)) {
                return false;
            }
        }

        return true;
    }
1173614
protected function isSequence($value)
    {
        if (!Helper::isSequential($value)) {
            return false;
        }

        if ($value === []) {
            return true;
        }

        $i=0;

        $lastItemType = null;

        foreach ($value as $key=>$item) {

            if ($key !== $i) {
                return false;
            }

            $itemType = Type::of($item);

            // TODO: list could be typed by common class or interface
            if ($i !== 0 && $itemType != $lastItemType) {
                return false;
            }

            $lastItemType = $itemType;
            $i++;
        }

        return true;

    }
521464
public function isSatisfiedBy(array $value): bool
    {
        if (in_array($this->path, ['', '.', './'], false)) {
            /*
             * since flysystem stuff is always relative to the filesystem object's root,
             * a spec of "current" dir should always be a match anything being considered
             */
            return true;
        }

        $path = (string) $this->path;
        $validChars = '[a-zA-Z0-9\\\/\.\<\>\,\|\:\(\)\&\;\#]';

        /*
         * a FILE spec would have to match on 'path',
         *   e.g. value path 'src/Cilex/Provider/MonologServiceProvider.php' should match FILE spec of same path...
         * this should also hit a perfect DIR=DIR_SPEC match,
         *   e.g. value path 'src/Cilex/Provider' should match DIR spec of 'src/Cilex/Provider'
         */
        if (isset($value['path'])) {
            $pattern = '(^(?!\/)'
                . str_replace(['?', '*'], [$validChars . '{1}', $validChars . '*'], $path)
                . $validChars . '*)';
            if (preg_match($pattern, $value['path'])) {
                return true;
            }
        }

        /* a DIR spec that wasn't an exact match should be able to match on dirname,
         *   e.g. value dirname 'src' of path 'src/Cilex' should match DIR spec of 'src'
         */
        if (isset($value['dirname'])) {
            $pattern = '(^(?!\/)'
                . str_replace(['?', '*'], [$validChars . '{1}', $validChars . '*'], $path . '/')
                . $validChars . '*)';
            if (preg_match($pattern, $value['dirname'] . '/')) {
                return true;
            }
        }

        return false;
    }
621094
private static function catchStruct($value) {

        $values = count($value);

        for ( $i = 0; $i < $values; $i++ ) if ( !array_key_exists($i, $value) ) return true;

        return false;

    }
1111132
public function check($value, array $context = [])
    {
        return Std::truthy(
            $this->one->check($value),
            $this->other->check($value)
        );
    }
7394
protected function isValueSelected($value)
	{
		$val = $this->getValue();
		if (is_null($value)) {
			return FALSE;
		}
		elseif (is_array($val)) {
			return in_array($value, $val);
		}

		return $value == $val;
	}
1058883
private function check($value) {

		if(true === is_string($value) || is_numeric($value)) {

			if(true === $this -> strict) {
				return true === is_int($value);
			}

			return !in_array(preg_match('/^-?[0-9]+$/', $value), [false, 0]);
		}

		return false;
	}
1309227
protected function validCache($value)
    {
        if (is_null($value) || !is_array($value) || empty($value)) {
            return false;
        }

        return true;
    }
199995
public function containsValue($value): bool {
        foreach ($this->array as $key => $val) {
            if (null === $val) {
                continue;
            }
            if (Comparator::equals($val, $value)) {
                return true;
            }
        }
        return false;
    }
1374413
public function isValid($value)
    {
        if (!is_array($value)) {
            return false;
        }

        foreach ($value as $subValue) {
            if (!$this->valueTypeNode->isValid($subValue)) {
                return false;
            }
        }

        return true;
    }
216220
public static function IS_ERROR($value = '') {
		$value		= self::flattenSingleValue($value);

		if (!is_string($value))
			return false;
		return in_array($value, array_values(self::$_errorCodes));
	}
768680
public function isUploadArray($value) {
		if (!is_array($value)) {
			return false;
		}
		$requiredKeys = ['name', 'type', 'tmp_name', 'error', 'size'];
		$keys = array_keys($value);
		foreach ($requiredKeys as $key) {
			if (!in_array($key, $keys)) {
				return false;
			}
		}

		return true;
	}
227744
protected function validate($value)
    {
        $ret = ($value instanceof \Traversable ||
            $value instanceof \stdClass ||
            is_array($value));
        if (!$ret) {
            $this->messenger->add(new StringType('value is not traversable'));
        }

        return $ret;
    }
179641
public function checksum($value)
    {
        $checksum = $this->getChecksum();
        if (!empty($checksum)) {
            if (method_exists($this, $checksum)) {
                return call_user_func(array($this, $checksum), $value);
            }
        }

        return false;
    }
567149
protected function checkHash(array $value)
    {
        return array_reduce(
            array_keys($value),
            function ($carry, $val) {
                if (!is_string($val)) {
                    return false;
                }
                return $carry;
            },
            true
        );
    }