@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | */ |
19 | 19 | public function defaultLoggerFormatter() |
20 | 20 | { |
21 | - return '[%d{' . $this->defaultDateTimeFormatter() . '.%f}][%5L] %m'; |
|
21 | + return '[%d{'.$this->defaultDateTimeFormatter().'.%f}][%5L] %m'; |
|
22 | 22 | } |
23 | 23 | |
24 | 24 | /** |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | continue; |
46 | 46 | } |
47 | 47 | $msg .= PHP_EOL; |
48 | - $msg .= "\t#" . trim($stacktraceLine); |
|
48 | + $msg .= "\t#".trim($stacktraceLine); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | return $msg; |
@@ -30,7 +30,7 @@ |
||
30 | 30 | |
31 | 31 | /** |
32 | 32 | * constructor |
33 | - * @param string $filepath ファイルパス |
|
33 | + * @param string $filePath ファイルパス |
|
34 | 34 | */ |
35 | 35 | public function __construct(stirng $filePath) |
36 | 36 | { |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | while (@is_link($filePath)) { |
85 | 85 | $linkPath = readlink($filePath); |
86 | 86 | if ($linkPath === false) { |
87 | - throw new IOException("Symbolic link read error: " . $filePath); |
|
87 | + throw new IOException("Symbolic link read error: ".$filePath); |
|
88 | 88 | } |
89 | 89 | $filePath = $linkPath; |
90 | 90 | } |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $length = filesize($filePath); |
180 | 180 | |
181 | 181 | if ($length === false) { |
182 | - throw new IOException("Cannot get filesize of " . $filePath); |
|
182 | + throw new IOException("Cannot get filesize of ".$filePath); |
|
183 | 183 | } |
184 | 184 | } |
185 | 185 | |
@@ -229,10 +229,10 @@ discard block |
||
229 | 229 | $dirname = dirname($destPath); |
230 | 230 | $dir = new File($dirname); |
231 | 231 | if (!$dir->isWritable()) { |
232 | - throw new IOException("Cannot writable: " . $destPath); |
|
232 | + throw new IOException("Cannot writable: ".$destPath); |
|
233 | 233 | } |
234 | 234 | $dirPath = $dir->getFilePath(); |
235 | - $absDestPath = $dirPath . "/" . basename($destPath); |
|
235 | + $absDestPath = $dirPath."/".basename($destPath); |
|
236 | 236 | |
237 | 237 | return rename($this->filePath, $absDestPath); |
238 | 238 | } |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | } else if (is_string($file)) { |
31 | 31 | $this->file = new File($file); |
32 | 32 | } else { |
33 | - throw new InvalidArgumentException("Unable to open file: " . $file); |
|
33 | + throw new InvalidArgumentException("Unable to open file: ".$file); |
|
34 | 34 | } |
35 | 35 | $stream = @fopen($this->file->getAbsoluteFilePath(), 'r'); |
36 | 36 | if (!is_resource($stream) || $stream === false) { |
37 | - throw new IOException("Unable open " . $this->file->getAbsoluteFilePath()); |
|
37 | + throw new IOException("Unable open ".$this->file->getAbsoluteFilePath()); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | parent::__construct($stream); |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | public function reset() |
134 | 134 | { |
135 | 135 | if (!$this->isMarkSupported()) { |
136 | - throw new IOException(get_class($this) . " does not support mark and reset."); |
|
136 | + throw new IOException(get_class($this)." does not support mark and reset."); |
|
137 | 137 | } |
138 | 138 | |
139 | 139 | // ポインタ位置をmark位置に移動 |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | public function mark() |
84 | 84 | { |
85 | 85 | if (!$this->isMarkSupported()) { |
86 | - throw new IOException(get_class($this) . " does not support mark."); |
|
86 | + throw new IOException(get_class($this)." does not support mark."); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | $this->markedPosition = $this->cursorPosition; |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | public function reset() |
97 | 97 | { |
98 | 98 | if (!$this->isMarkSupported()) { |
99 | - throw new IOException(get_class($this) . " does not support mark and reset."); |
|
99 | + throw new IOException(get_class($this)." does not support mark and reset."); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | // mark位置を初期値に戻す |
@@ -2,7 +2,6 @@ |
||
2 | 2 | namespace WebStream\IO; |
3 | 3 | |
4 | 4 | use WebStream\Exception\Extend\InvalidArgumentException; |
5 | -use WebStream\Exception\Extend\IOException; |
|
6 | 5 | |
7 | 6 | /** |
8 | 7 | * StringInputStream |
@@ -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); |
@@ -29,8 +29,8 @@ |
||
29 | 29 | public function __initialize(Container $container); |
30 | 30 | |
31 | 31 | /** |
32 | - * カスタムアノテーション情報を設定する |
|
33 | - * @param array<mixed> カスタムアノテーション情報 |
|
32 | + * カスタムアノテーション情報を設定する |
|
33 | + * @param array<mixed> カスタムアノテーション情報 |
|
34 | 34 | */ |
35 | 35 | public function __customAnnotation(array $annotation); |
36 | 36 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
82 | - * {@inheritdoc} |
|
82 | + * {@inheritdoc} |
|
83 | 83 | */ |
84 | 84 | public function __customAnnotation(array $annotation) |
85 | 85 | { |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
90 | - * {@inheritdoc} |
|
90 | + * {@inheritdoc} |
|
91 | 91 | * @Filter(type="initialize") |
92 | 92 | */ |
93 | 93 | public function __initialize(Container $container) |