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

@@ 685-690 (lines=6) @@
682
			$decimals = $length;
683
		}
684
685
		if ( 'i18n' == pods_v( self::$type . '_format', $options ) ) {
686
			$value = number_format_i18n( (float) $value, $decimals );
687
		}
688
		else {
689
			$value = number_format( (float) $value, $decimals, $dot, $thousands );
690
		}
691
692
		// Additional output handling for decimals
693
		$decimal_handling = pods_v( self::$type . '_decimal_handling', $options, 'none' ) ;