| 1 | <?php namespace Comodojo\RpcClient\Components; |
||
| 23 | trait Encryption { |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Enable comodojo encrypted transport |
||
| 27 | * |
||
| 28 | * @var mixed |
||
| 29 | */ |
||
| 30 | private $encryption = false; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Set encryption key; this will enable the NOT-STANDARD payload encryption |
||
| 34 | * |
||
| 35 | * @param string $key Encryption key |
||
| 36 | * |
||
| 37 | * @return \Comodojo\RpcClient\RpcClient |
||
| 38 | * |
||
| 39 | * @throws \Exception |
||
| 40 | */ |
||
| 41 | public function setEncryption($key) { |
||
| 50 | |||
| 51 | final public function getEncryption() { |
||
| 56 | |||
| 57 | } |
||
| 58 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.