Passed
Push — master ( 73eb97...aef641 )
by Jean-Christophe
01:33
created

Crypt::toView()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 2
rs 10
cc 1
nc 1
nop 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