Code Duplication    Length = 20-20 lines in 2 locations

classes/Pods.php 2 locations

@@ 1055-1074 (lines=20) @@
1052
					$value = pods_image_url( $this->id(), $size, 0, true );
1053
1054
					$object_field_found = true;
1055
				} elseif ( 0 === strpos( $params->name, 'image_attachment.' ) ) {
1056
					$size = 'thumbnail';
1057
1058
					$image_id = 0;
1059
1060
					$field_names = explode( '.', $params->name );
1061
1062
					if ( isset( $field_names[1] ) ) {
1063
						$image_id = $field_names[1];
1064
					}
1065
1066
					if ( isset( $field_names[2] ) ) {
1067
						$size = $field_names[2];
1068
					}
1069
1070
					if ( ! empty( $image_id ) ) {
1071
						$value = pods_image( $image_id, $size, 0, null, true );
1072
1073
						if ( ! empty( $value ) ) {
1074
							$object_field_found = true;
1075
						}
1076
					}
1077
				} elseif ( 0 === strpos( $params->name, 'image_attachment_url.' ) ) {
@@ 1120-1139 (lines=20) @@
1117
1118
					$object_field_found = true;
1119
				}
1120
			} elseif ( 0 === strpos( $params->name, 'image_attachment.' ) ) {
1121
				$size = 'thumbnail';
1122
1123
				$image_id = 0;
1124
1125
				$field_names = explode( '.', $params->name );
1126
1127
				if ( isset( $field_names[1] ) ) {
1128
					$image_id = $field_names[1];
1129
				}
1130
1131
				if ( isset( $field_names[2] ) ) {
1132
					$size = $field_names[2];
1133
				}
1134
1135
				if ( ! empty( $image_id ) ) {
1136
					$value = pods_image( $image_id, $size, 0, null, true );
1137
1138
					if ( ! empty( $value ) ) {
1139
						$object_field_found = true;
1140
					}
1141
				}
1142
			} elseif ( 0 === strpos( $params->name, 'image_attachment_url.' ) ) {