Conditions | 4 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
29 | public function __construct($keyPath, $passPhrase = null) |
||
30 | { |
||
31 | if (strpos($keyPath, 'file://') !== 0) { |
||
32 | $keyPath = 'file://' . $keyPath; |
||
33 | } |
||
34 | |||
35 | if (!file_exists($keyPath) || !is_readable($keyPath)) { |
||
36 | throw new \LogicException(sprintf('Key path "%s" does not exist or is not readable', $keyPath)); |
||
37 | } |
||
38 | |||
39 | $this->keyPath = $keyPath; |
||
40 | $this->passPhrase = $passPhrase; |
||
41 | } |
||
42 | |||
63 |