1 | <?php |
||
22 | class Encrypt |
||
23 | { |
||
24 | |||
25 | /** |
||
26 | * The encryption key/salt to use for the request |
||
27 | * |
||
28 | * @var string |
||
29 | */ |
||
30 | protected $key = 'MolliePosellIsLikeSoAmazingYouCantEvenLookWithoutYourHeadBlowingUp'; |
||
31 | |||
32 | /** |
||
33 | * The encryption library we're using |
||
34 | * |
||
35 | * @var \Crypt_AES |
||
36 | */ |
||
37 | protected $api = null; |
||
38 | |||
39 | /** |
||
40 | * Sets the encryption key |
||
41 | * |
||
42 | * @param string $key |
||
43 | * @return \mithra62\Encrypt |
||
44 | */ |
||
45 | public function setKey($key) |
||
53 | |||
54 | /** |
||
55 | * Returns the encryption key |
||
56 | * |
||
57 | * @return \mithra62\string |
||
58 | */ |
||
59 | public function getKey() |
||
63 | |||
64 | /** |
||
65 | * Encrypts a string |
||
66 | * |
||
67 | * @param string $string |
||
68 | * The string to encrypt |
||
69 | * @return string |
||
70 | */ |
||
71 | public function encode($string) |
||
75 | |||
76 | /** |
||
77 | * Decrypts a previously encrypted string |
||
78 | * |
||
79 | * @param string $string |
||
80 | * The string to decrypt |
||
81 | * @return string |
||
82 | */ |
||
83 | public function decode($string) |
||
87 | |||
88 | /** |
||
89 | * Returns an instance of the Crypto library |
||
90 | * |
||
91 | * @return Crypt_AES |
||
92 | */ |
||
93 | public function getApi() |
||
102 | |||
103 | /** |
||
104 | * Generates a Guid if able |
||
105 | * @return string |
||
106 | */ |
||
107 | public function guid() |
||
119 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..