@@ -31,26 +31,26 @@ |
||
| 31 | 31 | $file_1 = new TextFile($filepath_1, 'r'); |
| 32 | 32 | $file_2 = new TextFile($filepath_2, 'r'); |
| 33 | 33 | |
| 34 | - if($file_1->size() ! $file_2->size()) |
|
| 34 | + if ($file_1->size() !$file_2->size()) |
|
| 35 | 35 | return false; |
| 36 | 36 | |
| 37 | 37 | $filepointer_1 = $file_1->open(); |
| 38 | 38 | $filepointer_2 = $file_2->open(); |
| 39 | 39 | |
| 40 | 40 | $identical = true; |
| 41 | - while(!feof($filepointer_1) && $identical === true) |
|
| 41 | + while (!feof($filepointer_1) && $identical === true) |
|
| 42 | 42 | { |
| 43 | 43 | $chunk_1 = fread($filepointer_1, $read_length); |
| 44 | 44 | $chunk_2 = fread($filepointer_2, $read_length); |
| 45 | 45 | |
| 46 | - if($chunk_1 === false || $chunk_2 === false) |
|
| 46 | + if ($chunk_1 === false || $chunk_2 === false) |
|
| 47 | 47 | { |
| 48 | 48 | $file_1->close(); |
| 49 | 49 | $file_2->close(); |
| 50 | 50 | throw \RuntimeException('fread returned false'); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - if($chunk_1 !== $chunk_2) |
|
| 53 | + if ($chunk_1 !== $chunk_2) |
|
| 54 | 54 | $identical = false; |
| 55 | 55 | } |
| 56 | 56 | |
@@ -31,8 +31,9 @@ discard block |
||
| 31 | 31 | $file_1 = new TextFile($filepath_1, 'r'); |
| 32 | 32 | $file_2 = new TextFile($filepath_2, 'r'); |
| 33 | 33 | |
| 34 | - if($file_1->size() ! $file_2->size()) |
|
| 35 | - return false; |
|
| 34 | + if($file_1->size() ! $file_2->size()) { |
|
| 35 | + return false; |
|
| 36 | + } |
|
| 36 | 37 | |
| 37 | 38 | $filepointer_1 = $file_1->open(); |
| 38 | 39 | $filepointer_2 = $file_2->open(); |
@@ -50,8 +51,9 @@ discard block |
||
| 50 | 51 | throw \RuntimeException('fread returned false'); |
| 51 | 52 | } |
| 52 | 53 | |
| 53 | - if($chunk_1 !== $chunk_2) |
|
| 54 | - $identical = false; |
|
| 54 | + if($chunk_1 !== $chunk_2) { |
|
| 55 | + $identical = false; |
|
| 56 | + } |
|
| 55 | 57 | } |
| 56 | 58 | |
| 57 | 59 | $file_1->close(); |