Code Duplication    Length = 7-10 lines in 2 locations

classes/fields/number.php 2 locations

@@ 207-216 (lines=10) @@
204
		}
205
206
		if ( isset( $options['name'] ) && false === PodsForm::permission( static::$type, $options['name'], $options, null, $pod, $id ) ) {
207
			if ( pods_v( 'read_only', $options, false ) ) {
208
				$options['readonly'] = true;
209
210
				$field_type = 'text';
211
212
				$value = $this->format( $value, $name, $options, $pod, $id );
213
			} else {
214
				return;
215
			}
216
		} elseif ( ! pods_has_permissions( $options ) && pods_v( 'read_only', $options, false ) ) {
217
			$options['readonly'] = true;
218
219
			$field_type = 'text';
@@ 216-222 (lines=7) @@
213
			} else {
214
				return;
215
			}
216
		} elseif ( ! pods_has_permissions( $options ) && pods_v( 'read_only', $options, false ) ) {
217
			$options['readonly'] = true;
218
219
			$field_type = 'text';
220
221
			$value = $this->format( $value, $name, $options, $pod, $id );
222
		}
223
224
		pods_view( PODS_DIR . 'ui/fields/' . $field_type . '.php', compact( array_keys( get_defined_vars() ) ) );
225