@@ -38,7 +38,7 @@ discard block |
||
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 |
||
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) { |
@@ -35,24 +35,24 @@ |
||
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); |