Crypt   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
eloc 4
c 2
b 0
f 0
dl 0
loc 12
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A toView() 0 2 1
A transform() 0 2 1
A reverse() 0 2 1
1
<?php
2
namespace Ubiquity\contents\transformation\transformers;
3
4
use Ubiquity\contents\transformation\TransformerInterface;
5
use Ubiquity\contents\transformation\TransformerViewInterface;
6
use Ubiquity\security\data\EncryptionManager;
7
8
class Crypt implements TransformerInterface,TransformerViewInterface {
9
10
	public static function transform($value) {
11
		return EncryptionManager::encrypt($value);
12
	}
13
14
	public static function reverse($value) {
15
		return EncryptionManager::decryptString($value);
16
	}
17
18
    public static function toView($value) {
19
        return EncryptionManager::decryptString($value);
20
    }
21
}
22