Check for the input is a numeric array(like)

@param mixed $test
@param bool  $ordered it will check the index ordering, not just the type

@return bool true, if the $data was a array(like) with numeric indexes
495073
public static function isNumeric( $test, bool $ordered = true ): bool {
    if( !static::is( $test, true, true ) ) return false;
    else {

      $i = 0;
      foreach( $test as $key => $_ ) {
        if( !is_int( $key ) || ( $ordered && $key != $i++ ) ) return false;
      }
    }

    return true;
  }
764286
public static function isList(array $data): bool
    {
        $isList = true;
        if (count($data) > 0) {
            for ($c1 = 0; $c1 < count($data); $c1++) {
                if (!isset($data[$c1])) {
                    $isList = false;
                }
            }
        }
        return $isList;
    }
47197
private function canBeResolved(array $requires, array $available, array $ordered): bool
    {
        if (0 === \count($requires)) {
            return true;
        }

        return 0 === \count(array_diff(array_intersect($requires, $available), $ordered));
    }
1290817
protected function checkZoneIdByAddressData($condition, $data)
    {
        if (empty($data['data']['order']['address'])) {
            return false;
        }

        $ids = $this->getAddressZoneId($data['data']['order']['address']);
        return $this->compare($ids, $condition['value'], $condition['operator']);
    }
501735
public function setOrderVAT($orderVAT)
    {
        if (!is_array($orderVAT)) {
            $this->orderVAT = null;

            return false;
        }
        $isValid = true;
        $index = 0;
        while ($isValid && $index < count($orderVAT)) {
            if (is_numeric($orderVAT[$index]) && $orderVAT[$index] >= 0 && $orderVAT[$index] < 100) {
                $isValid = true;
            } else {
                $isValid = false;
            }
            $index++;
        }
        if (!$isValid) {
            $this->orderVAT = null;

            return false;
        }
        $this->orderVAT = $orderVAT;

        return true;
    }
207787
public function addOrderBy($sort, $order = null)
    {
        if (false !== strpos($sort, '.')) {
            return parent::addOrderBy($sort, $order);
        }

        if (true === in_array($sort, self::$joinCriteria)) {
            $sort = $this->getSectionAlias().'.'.$sort;
        } elseif (0 !== strpos($this->getAlias().'.', $sort)) {
            $sort = $this->getAlias().'.'.$sort;
        }

        return parent::addOrderBy($sort, $order);
    }
295474
private function checkDataSet(array $data, $key, $isNew)
    {
        $keyExists = array_key_exists($key, $data);

        if (($isNew && !($keyExists && $data[$key] !== null)) || (!$keyExists || $data[$key] === null)) {
            throw new MissingOrderAttributeException($key);
        }

        return $keyExists;
    }
148544
public static function validateNumeric($data, callable $filter=null) {
        if ( is_numeric($data) === false ) return false;
        return self::applyFilter($data, $filter);
    }
508297
public function isAllOf(array $tests) {
    foreach ($tests as $test) {
      if (! $this->is($test)) {
        return FALSE;
      }
    }
    return TRUE;
  }
291530
public static function IsNumericIndicated( array $array ) : bool
   {

      $itemCount = \count( $array );

      if ( $itemCount < 1 ) { return true; }

      // Create the representative value (the joined array keys must be equal to it)
      $nums = \implode( '', \range( 0, $itemCount - 1 ) );

      // check the required array keys with the given.
      return ( $nums === \implode( '', \array_keys( $array ) ) );

   }
213586
protected function applyOrderBy(array $data, $orderBy)
    {
        if (!empty($orderBy)) {
            ArrayHelper::multisort($data, array_keys($orderBy), array_values($orderBy));
        }

        return $data;
    }
1008661
public function getBestRenderLocales($ordered = self::ORDER_LANG) {
        $locales = [];
        $this->getServerLocales();

        foreach($this->getClientLocales() as $locale) {
            /** @var Locale $locale  */

            $loc = $this->serverLocales->getBestMatchingLocaleForLocale($locale);
            if($loc && !in_array($loc, $locales)) {
                $locales[]  = $loc;
            }
        }
        if(count($locales) == 0) {
            if($this->defaultLocale)
                $locales[] = $this->defaultLocale;
            else {
                $locales[] = $this->getServerLocales()[0] ?? NULL;
            }
        }

        if($ordered & self::ORDER_STRUCT) {
            $locs = [];
            foreach($locales as $loc) {
                /** @var Locale $loc */
                $lang = $loc->getLanguage();

                $locs[$lang][] = $loc;
            }

            if($ordered & self::ORDER_LANG) {
                foreach($locs as &$ll)
                    usort($ll, LocaleCollection::LANG_SORT_CALLBACK);
            } elseif($ordered & self::ORDER_REG) {
                foreach($locs as &$ll)
                    usort($ll, LocaleCollection::REG_SORT_CALLBACK);
            }

            return $locs;
        }

        return $locales;
    }
474293
def is_array(self, data_type):
    '''
    '''

    # Split off any brackets
    data_type = data_type.split('[')[0].strip()

    return data_type.lower() in self.array_types
380768
public static function assertIsNumeric($variable, Throwable $exception): bool
    {
        static::makeAssertion(\is_numeric($variable), $exception);
        return true;
    }
1051661
public function clean($sort = true, $test = false)
    {
        $finder = new Finder();
        $finder->files()
            ->in($this->getApplication()->getPath())
            ->path('/^custom\/include\/language/')
            ->depth('== 3')
            ->name('*.lang.php');
        $found_one = false;
        foreach ($finder as $file) {
            $this->getLogger()->notice('Processing file ' . $file);
            $found_one = true;
            $content = file_get_contents($file);
            if ($content === false) {
                throw new \Exception('Unable to load the file contents of ' . $file . '.');
            }
            $lang = new LangFile($this->getLogger(), $content, $test);
            file_put_contents($file, $lang->getSortedFile($sort));
        }
        if (!$found_one) {
            $this->getLogger()->notice('No lang files found to process.');

            return false;
        }

        return true;
    }
942172
public static function isIndexedArray($array)
    {
        if (! is_array($array)) {
            return false;
        }

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

        return true;
    }
266153
function hasIndexChanged(index, prevIndex) {
  if (typeof index !== 'string' || !index) return false;
  if (typeof prevIndex !== 'string' || !prevIndex) return true;
  return index !== prevIndex;
}