original_string: public static function config_get_configuration_array($data) {
          $return = array(
              'server' => $data->server,
              'database' => $data->database,
              'extendedmode' => (!empty($data->extendedmode))
          );
          if (!empty($data->username)) {
              $return['username'] = $data->username;
          }
          if (!empty($data->password)) {
              $return['password'] = $data->password;
          }
          if (!empty($data->replicaset)) {
              $return['replicaset'] = $data->replicaset;
          }
          if (!empty($data->usesafe)) {
              $return['usesafe'] = true;
              if (!empty($data->usesafevalue)) {
                  $return['usesafe'] = (int)$data->usesafevalue;
                  $return['usesafevalue'] = $return['usesafe'];
              }
          }
          return $return;
      }
code: public static function config_get_configuration_array($data) {
          $return = array(
              'server' => $data->server,
              'database' => $data->database,
              'extendedmode' => (!empty($data->extendedmode))
          );
          if (!empty($data->username)) {
              $return['username'] = $data->username;
          }
          if (!empty($data->password)) {
              $return['password'] = $data->password;
          }
          if (!empty($data->replicaset)) {
              $return['replicaset'] = $data->replicaset;
          }
          if (!empty($data->usesafe)) {
              $return['usesafe'] = true;
              if (!empty($data->usesafevalue)) {
                  $return['usesafe'] = (int)$data->usesafevalue;
                  $return['usesafevalue'] = $return['usesafe'];
              }
          }
          return $return;
      }
code_tokens: public static function config_get_configuration_array ( $ data ) { $ return = array ( 'server' => $ data -> server , 'database' => $ data -> database , 'extendedmode' => ( ! empty ( $ data -> extendedmode ) ) ) ; if ( ! empty ( $ data -> username ) ) { $ return [ 'username' ] = $ data -> username ; } if ( ! empty ( $ data -> password ) ) { $ return [ 'password' ] = $ data -> password ; } if ( ! empty ( $ data -> replicaset ) ) { $ return [ 'replicaset' ] = $ data -> replicaset ; } if ( ! empty ( $ data -> usesafe ) ) { $ return [ 'usesafe' ] = true ; if ( ! empty ( $ data -> usesafevalue ) ) { $ return [ 'usesafe' ] = ( int ) $ data -> usesafevalue ; $ return [ 'usesafevalue' ] = $ return [ 'usesafe' ] ; } } return $ return ; }
docstring: Takes the object from the add instance store and creates a configuration array that can be used to initialise an instance.
  
  @param stdClass $data
  @return array
docstring_tokens: Takes the object from the add instance store and creates a configuration array that can be used to initialise an instance .