Code Duplication    Length = 20-20 lines in 2 locations

classes/Pods.php 2 locations

@@ 1042-1061 (lines=20) @@
1039
					$value = pods_image_url( $this->id(), $size, 0, true );
1040
1041
					$object_field_found = true;
1042
				} elseif ( 0 === strpos( $params->name, 'image_attachment.' ) ) {
1043
					$size = 'thumbnail';
1044
1045
					$image_id = 0;
1046
1047
					$field_names = explode( '.', $params->name );
1048
1049
					if ( isset( $field_names[1] ) ) {
1050
						$image_id = $field_names[1];
1051
					}
1052
1053
					if ( isset( $field_names[2] ) ) {
1054
						$size = $field_names[2];
1055
					}
1056
1057
					if ( ! empty( $image_id ) ) {
1058
						$value = pods_image( $image_id, $size, 0, null, true );
1059
1060
						if ( ! empty( $value ) ) {
1061
							$object_field_found = true;
1062
						}
1063
					}
1064
				} elseif ( 0 === strpos( $params->name, 'image_attachment_url.' ) ) {
@@ 1107-1126 (lines=20) @@
1104
1105
					$object_field_found = true;
1106
				}
1107
			} elseif ( 0 === strpos( $params->name, 'image_attachment.' ) ) {
1108
				$size = 'thumbnail';
1109
1110
				$image_id = 0;
1111
1112
				$field_names = explode( '.', $params->name );
1113
1114
				if ( isset( $field_names[1] ) ) {
1115
					$image_id = $field_names[1];
1116
				}
1117
1118
				if ( isset( $field_names[2] ) ) {
1119
					$size = $field_names[2];
1120
				}
1121
1122
				if ( ! empty( $image_id ) ) {
1123
					$value = pods_image( $image_id, $size, 0, null, true );
1124
1125
					if ( ! empty( $value ) ) {
1126
						$object_field_found = true;
1127
					}
1128
				}
1129
			} elseif ( 0 === strpos( $params->name, 'image_attachment_url.' ) ) {