src/Event/Model/AutoIncrementEventListener.php
private function getAutoIncrementFields(Table $table) : array
    {
        $moduleName = Inflector::camelize($table->getTable());
        $mc = new ModuleConfig(ConfigType::FIELDS(), $moduleName);
        $config = json_encode($mc->parse());
        $config = false === $config ? [] : json_decode($config, true);

        if (empty($config)) {
            return [];
        }

        $result = [];
        foreach (array_keys($table->getFieldsDefinitions()) as $field) {
            $autoIncrement = empty($config[$field]['auto-increment']) ? false : (bool)$config[$field]['auto-increment'];
            if (!$autoIncrement) {
                continue;
            }
            $result[$field] = [];

            $min = empty($config[$field]['min']) ? null : $config[$field]['min'];
            if (!is_int($min) && !is_float($min)) {
                continue;
            }

            $result[$field] = [
                'min' => $min
            ];
        }

        return $result;
    }
private function getAutoIncrementFields(Table $table) : array
    {
        $moduleName = Inflector::camelize($table->getTable());
        $mc = new ModuleConfig(ConfigType::FIELDS(), $moduleName);
        $config = json_encode($mc->parse());
        $config = false === $config ? [] : json_decode($config, true);

        if (empty($config)) {
            return [];
        }

        $result = [];
        foreach (array_keys($table->getFieldsDefinitions()) as $field) {
            $autoIncrement = empty($config[$field]['auto-increment']) ? false : (bool)$config[$field]['auto-increment'];
            if (!$autoIncrement) {
                continue;
            }
            $result[$field] = [];

            $min = empty($config[$field]['min']) ? null : $config[$field]['min'];
            if (!is_int($min) && !is_float($min)) {
                continue;
            }

            $result[$field] = [
                'min' => $min
            ];
        }

        return $result;
    }
private function getAutoIncrementFields ( Table $ table ) : array { $ moduleName = Inflector :: camelize ( $ table -> getTable ( ) ) ; $ mc = new ModuleConfig ( ConfigType :: FIELDS ( ) , $ moduleName ) ; $ config = json_encode ( $ mc -> parse ( ) ) ; $ config = false === $ config ? [ ] : json_decode ( $ config , true ) ; if ( empty ( $ config ) ) { return [ ] ; } $ result = [ ] ; foreach ( array_keys ( $ table -> getFieldsDefinitions ( ) ) as $ field ) { $ autoIncrement = empty ( $ config [ $ field ] [ 'auto-increment' ] ) ? false : ( bool ) $ config [ $ field ] [ 'auto-increment' ] ; if ( ! $ autoIncrement ) { continue ; } $ result [ $ field ] = [ ] ; $ min = empty ( $ config [ $ field ] [ 'min' ] ) ? null : $ config [ $ field ] [ 'min' ] ; if ( ! is_int ( $ min ) && ! is_float ( $ min ) ) { continue ; } $ result [ $ field ] = [ 'min' => $ min ] ; } return $ result ; }
Retrieves auto-increment fields for specified Module.

Retrieves and returns auto-increment fields along with their
related properties (such as 'min' value).

@param \CsvMigrations\Table $table Table instance
@return mixed[]
Retrieves auto - increment fields for specified Module .