Completed
Push — feature/0.7.0 ( 2e2153...887737 )
by Ryuichi
03:23
created
WebStream/IO/Writer/SimpleFileWriter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         $dirname = dirname($filepath);
39 39
         $dir = new File($dirname);
40 40
         if (!$dir->isWritable()) {
41
-            throw new IOException("Cannot writable: " . $filepath);
41
+            throw new IOException("Cannot writable: ".$filepath);
42 42
         }
43 43
 
44 44
         $this->filepath = $filepath;
@@ -60,11 +60,11 @@  discard block
 block discarded – undo
60 60
         }
61 61
 
62 62
         if (!is_resource($stream) || $stream === false) {
63
-            throw new IOException("Unable open " . $this->filepath);
63
+            throw new IOException("Unable open ".$this->filepath);
64 64
         }
65 65
 
66
-        if (!flock($stream, LOCK_EX | LOCK_NB)) {
67
-            throw new IOException("Cannot lock file: " . $this->filepath);
66
+        if (!flock($stream, LOCK_EX|LOCK_NB)) {
67
+            throw new IOException("Cannot lock file: ".$this->filepath);
68 68
         }
69 69
 
70 70
         if (fwrite($stream, $data) === false) {
Please login to merge, or discard this patch.
WebStream/IO/FileOutputStream.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -35,24 +35,24 @@
 block discarded – undo
35 35
                 $dirname = dirname($filepath);
36 36
                 $dir = new File($dirname);
37 37
                 if (!$dir->isWritable()) {
38
-                    throw new IOException("Cannot writable: " . $filepath);
38
+                    throw new IOException("Cannot writable: ".$filepath);
39 39
                 }
40 40
             }
41 41
             $this->file = new File($file);
42 42
             $filepath = $this->file->getFilePath();
43 43
         } else {
44
-            throw new InvalidArgumentException("Invalid argument type: " . $file);
44
+            throw new InvalidArgumentException("Invalid argument type: ".$file);
45 45
         }
46 46
 
47 47
         $mode = $isAppend ? 'ab' : 'wb';
48 48
         $stream = fopen($filepath, $mode);
49 49
 
50 50
         if (!is_resource($stream) || $stream === false) {
51
-            throw new IOException("Unable open " . $this->file->getFilePath());
51
+            throw new IOException("Unable open ".$this->file->getFilePath());
52 52
         }
53 53
 
54
-        if (!flock($stream, LOCK_EX | LOCK_NB)) {
55
-            throw new IOException("Cannot lock file: " . $this->file->getFilePath());
54
+        if (!flock($stream, LOCK_EX|LOCK_NB)) {
55
+            throw new IOException("Cannot lock file: ".$this->file->getFilePath());
56 56
         }
57 57
 
58 58
         parent::__construct($stream);
Please login to merge, or discard this patch.