Code Duplication    Length = 3-4 lines in 3 locations

classes/PodsMeta.php 1 location

@@ 3016-3018 (lines=3) @@
3013
        if ( ( isset( $pod->fields[ $meta_key ] ) || false !== strpos( $meta_key, '.' ) ) && $pod->row !== null) {
3014
3015
            $key = $meta_key;
3016
            if(false !== strpos( $meta_key, '.' )){
3017
                $key = current( explode( '.', $meta_key ) );
3018
            }
3019
3020
            $pod->row[ $meta_key ] = $meta_value;
3021

classes/PodsMigrate.php 2 locations

@@ 1126-1129 (lines=4) @@
1123
		$format = 'json';
1124
1125
		// Detect the export format.
1126
		if ( false !== strpos( $file, '.' ) ) {
1127
			$format = explode( '.', $file );
1128
			$format = end( $format );
1129
		}
1130
1131
		$migrate_data = array(
1132
			'items'  => array( $data ),
@@ 1172-1175 (lines=4) @@
1169
		$format = 'json';
1170
1171
		// Detect the export format.
1172
		if ( false !== strpos( $file, '.' ) ) {
1173
			$format = explode( '.', $file );
1174
			$format = end( $format );
1175
		}
1176
1177
		$migrate_data = array(
1178
			'single' => $single,