These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | namespace Kunstmaan\UtilitiesBundle\Helper\Cipher; |
||
4 | |||
5 | /** |
||
6 | * Cipher interface, classes which extends this interface will make it possible to encrypt and decrypt string values. |
||
7 | */ |
||
8 | interface CipherInterface |
||
9 | { |
||
10 | /** |
||
11 | * Encrypt the given value to an unreadable string. |
||
12 | * |
||
13 | * @param string $value |
||
14 | * @param bool $raw_binary |
||
15 | * |
||
16 | * @return string |
||
17 | */ |
||
18 | public function encrypt($value, $raw_binary = false); |
||
19 | |||
20 | /** |
||
21 | * Decrypt the given value so that it's readable again. |
||
22 | * |
||
23 | * @param $value |
||
24 | * @param $raw_binary |
||
25 | * |
||
26 | * @return string |
||
27 | * |
||
28 | * @internal param string $value |
||
29 | */ |
||
30 | public function decrypt($value, $raw_binary = false); |
||
31 | |||
32 | /** |
||
33 | * @param string $inputFile |
||
34 | * @param string $outputFile |
||
35 | * |
||
36 | * @throws \Defuse\Crypto\Exception\IOException |
||
37 | * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException |
||
38 | */ |
||
39 | public function encryptFile($inputFile, $outputFile); |
||
0 ignored issues
–
show
|
|||
40 | |||
41 | /** |
||
42 | * @param string $inputFile |
||
43 | * @param string $outputFile |
||
44 | * |
||
45 | * @throws \Defuse\Crypto\Exception\WrongKeyOrModifiedCiphertextException |
||
46 | * @throws \Defuse\Crypto\Exception\IOException |
||
47 | * @throws \Defuse\Crypto\Exception\EnvironmentIsBrokenException |
||
48 | */ |
||
49 | public function decryptFile($inputFile, $outputFile); |
||
0 ignored issues
–
show
For interfaces and abstract methods it is generally a good practice to add a
@return annotation even if it is just @return void or @return null , so that implementors know what to do in the overridden method.
For interface and abstract methods, it is impossible to infer the return type
from the immediate code. In these cases, it is generally advisible to explicitly
annotate these methods with a
Loading history...
|
|||
50 | } |
||
51 |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@return
doc comment to communicate to implementors of these methods what they are expected to return.