Completed
Pull Request — master (#38)
by
unknown
02:40
created
source/Threema/MsgApi/PublicKeyStores/File.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 		}
Please login to merge, or discard this patch.