Returns boolean if a function is flat/sequential numeric array

@param  array   $array        An array to test

@return boolean
191806
public static function is_numeric_array($array)
    {
        if (!is_array($array)) { return false; }

        $current = 0;
        foreach (array_keys($array) as $key) {
            if ($key !== $current) { return false; }

            $current++;
        }

        return true;
    }
711591
protected static function isAssoc(array $array)
    {
        if (empty($array)) {
            return false;
        }

        if (isset($array[0])) {
            $n = count($array) - 1;

            return array_sum(array_keys($array)) != ($n * ($n + 1)) / 2;
        } else {
            return true;
        }
    }
238382
protected function isArrayValueArray($array)
    {
        if (!is_array($array)) {
            return false;
        }
        foreach ($array as $k => $v) {
            if (!is_array($v)) {
                return false;
            }
        }

        return true;
    }
1246567
public static function isAssociative($array)
	{
		if (\is_array($array))
		{
			foreach (array_keys($array) as $k => $v)
			{
				if ($k !== $v)
				{
					return true;
				}
			}
		}

		return false;
	}
741024
private function matchVersion(array $array)
    {
        if (!isset($array["version"])) {
            return true;
        }

        if (is_array($array["version"])) {
            foreach ($array["version"] as $version)
            {
                if ($version == $this->getVersion() || $version == "*") {
                    return true;
                }
            }
        } elseif (is_string($array["version"])) {
            if ($array["version"] == $this->getVersion() || $array["version"] == "*") {
                return true;
            }
        }

        return false;
    }
596005
public static function flatten(array $array)
    {
        $result = array();

        array_walk_recursive($array, function ($value, $key) use (& $result) {
            if (is_numeric($key) or is_object($value)) {
                $result[] = $value;
            } else {
                $result[$key] = $value;
            }
        });

        return $result;
    }
118994
public static function naturalKeySortRecursive(&$array) {
		if (!is_array($array)) {
			return FALSE;
		}
		uksort($array, 'strnatcasecmp');
		foreach ($array as $key => $value) {
			self::naturalKeySortRecursive($array[$key]);
		}
		return TRUE;
	}
1072913
protected function isNumericallyIndexedArray(array $phpArray): bool
    {
        foreach (array_keys($phpArray) as $key) {
            if (is_numeric($key) === false) {
                return false;
            }
        }
        return true;
    }
572316
public static function IsSingleDepth( array $array ) : bool
   {

      if ( \count( $array ) < 1 )
      {
         return false;
      }

      foreach ( $array as $v )
      {
         if ( \is_array( $v ) && \count( $v ) > 0 )
         {
            return false;
         }
      }

      return true;

   }
461054
public static function isKeyWithElements($array, $key)
    {
        if (false === is_array($array) || false === isset($array[$key])) {
            return false;
        }

        if (false === is_array($array[$key])) {
            return false;
        }

        if (0 === count($array[$key])) {
            return false;
        }

        return true;
    }
1269068
public function flatArray($array = array(), $skip = array())
    {
        if (count($array) == 0) {
            $this->errorMessage[] = 'FLAT_ARRAY: array for flatArray is empty';
            return array();
        }
        $return = array();
        foreach ($array as $name => $item) {
            if (!in_array($name, $skip)) {
                if (is_array($item)) {
                    foreach ($item as $subItem) {
                        $return[] = $subItem;
                    }
                } elseif (!is_array($item)) {
                    $return[] = $item;
                }
            }
        }
        return $return;
    }
1044584
public static function trimRecursive(array $array)
    {
        /*
         * No elements?
         * Nothing to do
         */
        if (empty($array)) {
            return [];
        }

        $result = [];

        foreach ($array as $key => $value) {
            if (is_array($value)) {
                $result[$key] = self::trimRecursive($value);

                continue;
            }

            if (is_string($value)) {
                $value = trim($value);
            }

            $result[$key] = $value;
        }

        return $result;
    }
138361
public function flatten(array $array)
    {
        $tmp = array();
        foreach ($array as $a) {
            if (is_array($a)) {
                $tmp = array_merge($tmp, array_flat($a));
            } else {
                $tmp[] = $a;
            }
        }

        return $tmp;
    }
809141
private function calculate3(array $array)
    {
        for ($i=0; $i<count($array); $i++) {
            if (isset($array[$i]) && isset($array[$i-1]) && isset($array[$i+1])
            && ($array[$i] === '+' || $array[$i] === '-')) {
                $this->checkInf($array[$i-1], $array[$i+1]);
                if (!is_numeric($array[$i-1]) || !is_numeric($array[$i+1])) {
                    $this->correct = 0;
                    break;
                }
                if ($array[$i] === '+') {
                    $a = $array[$i-1] + $array[$i+1];
                } elseif ($array[$i] === '-') {
                    $a = $array[$i-1] - $array[$i+1];
                }
                unset($array[$i-1], $array[$i+1]);
                $array[$i] = $a;
                $array = array_values($array);
                $i = 0;
            }
        }
        return $array;
    }
569575
protected function sequentialArrayToKey(array $array)
    {

        if ($this->isObjectAndId($array)) {
            return get_class($array[0]) . '-' . $array[1];
        }

        $parts = [];

        foreach ($array as $value) {
            $parts[] = $this->castArrayValue($this->key($value));
        }

        return implode('_', $parts);
    }
277150
public static function difference($array)
    {
        if (empty($array))
            return [];

        if (func_num_args() == 1)
            return $array;

        $args = func_get_args();

        if (static::every($args, 'is_array'))
            return array_values(call_user_func_array('array_diff', $args));

        $rest = static::flatten(array_slice($args, 1), true);
        return static::values(static::filter($array, function($value) use ($rest) {
            return !static::contains($rest, $value);
        }));
    }
834641
public static function flatten($array)
    {
        $isAssoc = self::isAssoc($array);

        $flat = [];
        foreach ($array as $key => $value)
        {
            if (is_array($value))
            {
                $flat = array_merge($flat, self::flatten($value));
            }
            else
            {
                if ($isAssoc)
                {
                    $flat[$key] = $value;
                }
                else
                {
                    $flat[] = $value;
                }
            }
        }

        return $flat;
    }