Code Duplication    Length = 4-6 lines in 2 locations

classes/fields/number.php 1 location

@@ 504-507 (lines=4) @@
501
        if ( $length < $decimals )
502
            $decimals = $length;
503
504
        if ( 'i18n' == pods_var( self::$type . '_format', $options ) )
505
            $value = number_format_i18n( (float) $value, $decimals );
506
        else
507
            $value = number_format( (float) $value, $decimals, $dot, $thousands );
508
509
        return $value;
510
    }

classes/fields/currency.php 1 location

@@ 692-697 (lines=6) @@
689
			$decimals = $length;
690
		}
691
692
		if ( 'i18n' == pods_v( self::$type . '_format', $options ) ) {
693
			$value = number_format_i18n( (float) $value, $decimals );
694
		}
695
		else {
696
			$value = number_format( (float) $value, $decimals, $dot, $thousands );
697
		}
698
699
		// Additional output handling for decimals
700
		$decimal_handling = pods_v( self::$type . '_decimal_handling', $options, 'none' ) ;