@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * @throws Exception if the file does not exist or not writable |
| 26 | 26 | */ |
| 27 | 27 | public function __construct($file) { |
| 28 | - if(false === is_writable($file)) { |
|
| 28 | + if (false === is_writable($file)) { |
|
| 29 | 29 | throw new Exception('file '.$file.' does not exist or is not writable'); |
| 30 | 30 | } |
| 31 | 31 | $this->file = $file; |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | */ |
| 40 | 40 | function findPublicKey($threemaId) { |
| 41 | 41 | $storeHandle = fopen($this->file, 'r'); |
| 42 | - if(false === $storeHandle) { |
|
| 42 | + if (false === $storeHandle) { |
|
| 43 | 43 | throw new Exception('could not open file '.$this->file); |
| 44 | 44 | } |
| 45 | 45 | else { |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | $publicKey = null; |
| 48 | 48 | while (!feof($storeHandle)) { |
| 49 | 49 | $buffer = fgets($storeHandle, 4096); |
| 50 | - if(substr($buffer, 0, 8) == $threemaId) { |
|
| 50 | + if (substr($buffer, 0, 8) == $threemaId) { |
|
| 51 | 51 | $publicKey = str_replace("\n", '', substr($buffer, 8)); |
| 52 | 52 | continue; |
| 53 | 53 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * @return File |
| 75 | 75 | */ |
| 76 | 76 | public static function create($path) { |
| 77 | - if(false === file_exists($path)) { |
|
| 77 | + if (false === file_exists($path)) { |
|
| 78 | 78 | //touch |
| 79 | 79 | touch($path); |
| 80 | 80 | } |