Code Duplication    Length = 7-10 lines in 2 locations

classes/fields/number.php 2 locations

@@ 263-272 (lines=10) @@
260
		}
261
262
		if ( isset( $options['name'] ) && false === PodsForm::permission( static::$type, $options['name'], $options, null, $pod, $id ) ) {
263
			if ( pods_v( 'read_only', $options, false ) ) {
264
				$options['readonly'] = true;
265
266
				$field_type = 'text';
267
268
				$value = $this->format( $value, $name, $options, $pod, $id );
269
			} else {
270
				return;
271
			}
272
		} elseif ( ! pods_has_permissions( $options ) && pods_v( 'read_only', $options, false ) ) {
273
			$options['readonly'] = true;
274
275
			$field_type = 'text';
@@ 272-278 (lines=7) @@
269
			} else {
270
				return;
271
			}
272
		} elseif ( ! pods_has_permissions( $options ) && pods_v( 'read_only', $options, false ) ) {
273
			$options['readonly'] = true;
274
275
			$field_type = 'text';
276
277
			$value = $this->format( $value, $name, $options, $pod, $id );
278
		}
279
280
		pods_view( PODS_DIR . 'ui/fields/' . $field_type . '.php', compact( array_keys( get_defined_vars() ) ) );
281