Code Duplication    Length = 8-8 lines in 2 locations

forms/AssetField.php 1 location

@@ 539-546 (lines=8) @@
536
		}
537
538
		// Validation: File size
539
		if ($allowedMaxFileSize = $this->getValidator()->getAllowedMaxFileSize()) {
540
			$config['maxFileSize'] = $allowedMaxFileSize;
541
			$config['errorMessages']['maxFileSize'] = _t(
542
				'File.TOOLARGESHORT',
543
				'Filesize exceeds {size}',
544
				array('size' => File::format_size($config['maxFileSize']))
545
			);
546
		}
547
548
		$mergedConfig = array_merge($config, $this->ufConfig);
549
		return $this->customise(array(

forms/UploadField.php 1 location

@@ 978-985 (lines=8) @@
975
		}
976
977
		// Validation: File size
978
		if ($allowedMaxFileSize = $this->getValidator()->getAllowedMaxFileSize()) {
979
			$config['maxFileSize'] = $allowedMaxFileSize;
980
			$config['errorMessages']['maxFileSize'] = _t(
981
				'File.TOOLARGESHORT',
982
				'Filesize exceeds {size}',
983
				array('size' => File::format_size($config['maxFileSize']))
984
			);
985
		}
986
987
		// Validation: Number of files
988
		if ($allowedMaxFileNumber) {