protected static function fixRecords(array $records)
    {
        if (!Arr::isAssoc($records)) {
            foreach ($records as $key => $record) {
                $record['is_sys_admin'] = 1;
                $records[$key] = $record;
            }
        } else {
            $records['is_sys_admin'] = 1;
        }

        return $records;
    }
protected static function fixRecords(array $records)
    {
        if (!Arr::isAssoc($records)) {
            foreach ($records as $key => $record) {
                $record['is_sys_admin'] = 1;
                $records[$key] = $record;
            }
        } else {
            $records['is_sys_admin'] = 1;
        }

        return $records;
    }
protected static function fixRecords ( array $ records ) { if ( ! Arr :: isAssoc ( $ records ) ) { foreach ( $ records as $ key => $ record ) { $ record [ 'is_sys_admin' ] = 1 ; $ records [ $ key ] = $ record ; } } else { $ records [ 'is_sys_admin' ] = 1 ; } return $ records ; }
Fixes supplied records to always set is_set_admin flag to true.
Encrypts passwords if it is supplied.

@param array $records

@return array
Fixes supplied records to always set is_set_admin flag to true . Encrypts passwords if it is supplied .