Code Duplication    Length = 12-13 lines in 2 locations

app/fpdm/fpdm.php 2 locations

@@ 366-377 (lines=12) @@
363
		*Defines a password type
364
		*@param String type , 'owner' or  'user'
365
		**/
366
		function Password($type,$code) {
367
		//------------------------------
368
			switch($type) {
369
				case 'owner':
370
				case 'user':
371
				$this->security["password"]["$type"]=$code;
372
				break;
373
				default:
374
					$this->Error("Unsupported password type ($type), specify 'owner' or 'user' instead.");
375
			}
376
			$this->support="pdftk";
377
		}
378
		
379
		
380
		/**
@@ 384-396 (lines=13) @@
381
		*Defines the encrytion to the given bits
382
		*@param integer $bits 0, 40 or 128
383
		**/
384
		function Encrypt($bits) {
385
		//-----------------------
386
			switch($bits) {
387
				case 0:
388
				case 40:
389
				case 128:				
390
				$this->security["encrypt"]=$bits;
391
				break;
392
				default:
393
					$this->Error("Unsupported encrypt value of $bits, only 0, 40 and 128 are supported");
394
			}
395
			$this->support="pdftk";
396
		}
397
		
398
		/**
399
		*Allow permissions