Code Duplication    Length = 6-6 lines in 3 locations

classes/Pods.php 3 locations

@@ 1014-1019 (lines=6) @@
1011
				if ( ! isset( $this->fields['post_thumbnail'] ) && ( 'post_thumbnail' === $params->name || 0 === strpos( $params->name, 'post_thumbnail.' ) ) ) {
1012
					$size = 'thumbnail';
1013
1014
					if ( 0 === strpos( $params->name, 'post_thumbnail.' ) ) {
1015
						$field_names = explode( '.', $params->name );
1016
1017
						if ( isset( $field_names[1] ) ) {
1018
							$size = $field_names[1];
1019
						}
1020
					}
1021
1022
					// Pods will auto-get the thumbnail ID if this isn't an attachment.
@@ 1029-1034 (lines=6) @@
1026
				} elseif ( ! isset( $this->fields['post_thumbnail_url'] ) && ( 'post_thumbnail_url' === $params->name || 0 === strpos( $params->name, 'post_thumbnail_url.' ) ) ) {
1027
					$size = 'thumbnail';
1028
1029
					if ( 0 === strpos( $params->name, 'post_thumbnail_url.' ) ) {
1030
						$field_names = explode( '.', $params->name );
1031
1032
						if ( isset( $field_names[1] ) ) {
1033
							$size = $field_names[1];
1034
						}
1035
					}
1036
1037
					// Pods will auto-get the thumbnail ID if this isn't an attachment.
@@ 1090-1095 (lines=6) @@
1087
				if ( ! isset( $this->fields['avatar'] ) && ( 'avatar' === $params->name || 0 === strpos( $params->name, 'avatar.' ) ) ) {
1088
					$size = null;
1089
1090
					if ( 0 === strpos( $params->name, 'avatar.' ) ) {
1091
						$field_names = explode( '.', $params->name );
1092
1093
						if ( isset( $field_names[1] ) ) {
1094
							$size = (int) $field_names[1];
1095
						}
1096
					}
1097
1098
					if ( 0 < $size ) {