protected function generateFakeData(): array
    {
        $this->checkEntityIsInConfig();
        $colsInConfig = $this->configEntities[$this->entity]['cols'];
        $row = [];
        foreach ($colsInConfig as $colName => $colProps) {
            $this->checkColIsInEntity($colName);
            $data = \call_user_func_array(
                [$this->getFakerObject($this->entity, $colName, $colProps), $colProps['method']],
                $colProps['params']
            );
            if (!is_scalar($data)) {
                $msg = "You must use faker methods that generate strings: '{$colProps['method']}' forbidden";
                throw new NeuralyzerConfigurationException($msg);
            }
            $row[$colName] = trim($data);
            $colLength = $this->entityCols[$colName]['length'];
            // Cut the value if too long ...
            if (!empty($colLength) && \strlen($row[$colName]) > $colLength) {
                $row[$colName] = substr($row[$colName], 0, $colLength - 1);
            }
        }

        return $row;
    }
protected function generateFakeData(): array
    {
        $this->checkEntityIsInConfig();
        $colsInConfig = $this->configEntities[$this->entity]['cols'];
        $row = [];
        foreach ($colsInConfig as $colName => $colProps) {
            $this->checkColIsInEntity($colName);
            $data = \call_user_func_array(
                [$this->getFakerObject($this->entity, $colName, $colProps), $colProps['method']],
                $colProps['params']
            );
            if (!is_scalar($data)) {
                $msg = "You must use faker methods that generate strings: '{$colProps['method']}' forbidden";
                throw new NeuralyzerConfigurationException($msg);
            }
            $row[$colName] = trim($data);
            $colLength = $this->entityCols[$colName]['length'];
            // Cut the value if too long ...
            if (!empty($colLength) && \strlen($row[$colName]) > $colLength) {
                $row[$colName] = substr($row[$colName], 0, $colLength - 1);
            }
        }

        return $row;
    }
protected function generateFakeData ( ) : array { $ this -> checkEntityIsInConfig ( ) ; $ colsInConfig = $ this -> configEntities [ $ this -> entity ] [ 'cols' ] ; $ row = [ ] ; foreach ( $ colsInConfig as $ colName => $ colProps ) { $ this -> checkColIsInEntity ( $ colName ) ; $ data = \ call_user_func_array ( [ $ this -> getFakerObject ( $ this -> entity , $ colName , $ colProps ) , $ colProps [ 'method' ] ] , $ colProps [ 'params' ] ) ; if ( ! is_scalar ( $ data ) ) { $ msg = "You must use faker methods that generate strings: '{$colProps['method']}' forbidden" ; throw new NeuralyzerConfigurationException ( $ msg ) ; } $ row [ $ colName ] = trim ( $ data ) ; $ colLength = $ this -> entityCols [ $ colName ] [ 'length' ] ; // Cut the value if too long ... if ( ! empty ( $ colLength ) && \ strlen ( $ row [ $ colName ] ) > $ colLength ) { $ row [ $ colName ] = substr ( $ row [ $ colName ] , 0 , $ colLength - 1 ) ; } } return $ row ; }
Generate fake data for an entity and return it as an Array

@return array
@throws NeuralyzerConfigurationException
Generate fake data for an entity and return it as an Array