src/core/BinnFactory.php
private function detectContainerKeyFlags($data) {
        $allNumeric = true;
        $inSequence = true;
        $expectedIndex = 0;
        foreach( $data as $key=>$value ){
            if( $key == $expectedIndex ){
                $expectedIndex++;
            }else{
                $inSequence = false;
            }
            if( is_numeric($key) == false ){
                $allNumeric = false;
            }
        }
        return [ $allNumeric, $inSequence ];
    }
private function detectContainerKeyFlags($data) {
        $allNumeric = true;
        $inSequence = true;
        $expectedIndex = 0;
        foreach( $data as $key=>$value ){
            if( $key == $expectedIndex ){
                $expectedIndex++;
            }else{
                $inSequence = false;
            }
            if( is_numeric($key) == false ){
                $allNumeric = false;
            }
        }
        return [ $allNumeric, $inSequence ];
    }
private function detectContainerKeyFlags ( $ data ) { $ allNumeric = true ; $ inSequence = true ; $ expectedIndex = 0 ; foreach ( $ data as $ key => $ value ) { if ( $ key == $ expectedIndex ) { $ expectedIndex ++ ; } else { $ inSequence = false ; } if ( is_numeric ( $ key ) == false ) { $ allNumeric = false ; } } return [ $ allNumeric , $ inSequence ] ; }
Detect the status of keys to determine whether they are all numeric and in sequence from zero.

[ 0=>..., 1=>..., 2=>... ] === in sequence from zero
[ 1=>..., 15=>..., 19=>... ] === all numeric
[ "index1"=>..., "index2"=>... ] === neither numeric or in sequence

@param array|object $data
@return array
Detect the status of keys to determine whether they are all numeric and in sequence from zero .