Completed
Branch master (ff7557)
by Ryuichi
03:50 queued 14s
created
File.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
     /**
32 32
      * constructor
33
-     * @param string $filepath ファイルパス
33
+     * @param string $filePath ファイルパス
34 34
      */
35 35
     public function __construct(string $filePath)
36 36
     {
Please login to merge, or discard this patch.
StringInputStream.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
Test/Providers/FileWriterProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,14 +12,14 @@
 block discarded – undo
12 12
     public function writeProvider()
13 13
     {
14 14
         return [
15
-            ["/tmp/filewriter-test1.txt", "test"]
15
+            [ "/tmp/filewriter-test1.txt", "test" ]
16 16
         ];
17 17
     }
18 18
 
19 19
     public function writeAppendProvider()
20 20
     {
21 21
         return [
22
-            ["/tmp/filewriter-test2.txt", "test", "testtest"]
22
+            [ "/tmp/filewriter-test2.txt", "test", "testtest" ]
23 23
         ];
24 24
     }
25 25
 }
Please login to merge, or discard this patch.
Test/Providers/FileReaderProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     public function readProvider()
13 13
     {
14 14
         return [
15
-            [dirname(__FILE__)  . "/../Fixtures/filereader-test1.txt", "test1\n" . "test2\n"]
15
+            [ dirname(__FILE__) . "/../Fixtures/filereader-test1.txt", "test1\n" . "test2\n" ]
16 16
         ];
17 17
     }
18 18
 }
Please login to merge, or discard this patch.
Test/Providers/InputStreamReaderProvider.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -15,84 +15,84 @@
 block discarded – undo
15 15
     public function readCharProvider()
16 16
     {
17 17
         return [
18
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test1.txt"), "a", 1],
19
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test1.txt"), "a\n", 100], // over eof
20
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test2.txt"), "あ", 3],
21
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test2.txt"), "あ\n", 100], // over eof
22
-            [new StringInputStream("a"), "a", 1],
23
-            [new StringInputStream("a"), "a", 100], // over eof
24
-            [new StringInputStream("あ"), "あ", 3],
25
-            [new StringInputStream("あ"), "あ", 100] // over eof
18
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test1.txt"), "a", 1 ],
19
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test1.txt"), "a\n", 100 ], // over eof
20
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test2.txt"), "あ", 3 ],
21
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test2.txt"), "あ\n", 100 ], // over eof
22
+            [ new StringInputStream("a"), "a", 1 ],
23
+            [ new StringInputStream("a"), "a", 100 ], // over eof
24
+            [ new StringInputStream("あ"), "あ", 3 ],
25
+            [ new StringInputStream("あ"), "あ", 100 ] // over eof
26 26
         ];
27 27
     }
28 28
 
29 29
     public function readLineProvider()
30 30
     {
31 31
         return [
32
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test3.txt"), "test1", "test2"],
33
-            [new StringInputStream("test1\ntest2\n"), "test1", "test2"]
32
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test3.txt"), "test1", "test2" ],
33
+            [ new StringInputStream("test1\ntest2\n"), "test1", "test2" ]
34 34
         ];
35 35
     }
36 36
 
37 37
     public function skipProvider()
38 38
     {
39 39
         return [
40
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test4.txt"), "a", 0],
41
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test4.txt"), "b", 1],
42
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test4.txt"), "d", 3],
43
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test4.txt"), "f", 5],
44
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test4.txt"), "\n", 9],
45
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test4.txt"), "", 10],
46
-            [new StringInputStream("abcdefghi"), "a", 0],
47
-            [new StringInputStream("abcdefghi"), "b", 1],
48
-            [new StringInputStream("abcdefghi"), "d", 3],
49
-            [new StringInputStream("abcdefghi"), "f", 5],
50
-            [new StringInputStream("abcdefghi"), "", 9],
51
-            [new StringInputStream("abcdefghi"), "", 10]
40
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test4.txt"), "a", 0 ],
41
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test4.txt"), "b", 1 ],
42
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test4.txt"), "d", 3 ],
43
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test4.txt"), "f", 5 ],
44
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test4.txt"), "\n", 9 ],
45
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test4.txt"), "", 10 ],
46
+            [ new StringInputStream("abcdefghi"), "a", 0 ],
47
+            [ new StringInputStream("abcdefghi"), "b", 1 ],
48
+            [ new StringInputStream("abcdefghi"), "d", 3 ],
49
+            [ new StringInputStream("abcdefghi"), "f", 5 ],
50
+            [ new StringInputStream("abcdefghi"), "", 9 ],
51
+            [ new StringInputStream("abcdefghi"), "", 10 ]
52 52
         ];
53 53
     }
54 54
 
55 55
     public function overSkipAndReadProvider()
56 56
     {
57 57
         return [
58
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test5.txt"), 4, null],
59
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test6.txt"), 100, null],
60
-            [new StringInputStream("abc\n"), 4, null],
61
-            [new StringInputStream("abcde\nあいうえお"), 100, null]
58
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test5.txt"), 4, null ],
59
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test6.txt"), 100, null ],
60
+            [ new StringInputStream("abc\n"), 4, null ],
61
+            [ new StringInputStream("abcde\nあいうえお"), 100, null ]
62 62
         ];
63 63
     }
64 64
 
65 65
     public function overFrontSkipProvider()
66 66
     {
67 67
         return [
68
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test1.txt"), -1],
69
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test1.txt"), -100],
70
-            [new StringInputStream("a\n"), -1],
71
-            [new StringInputStream("a\n"), -100]
68
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test1.txt"), -1 ],
69
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test1.txt"), -100 ],
70
+            [ new StringInputStream("a\n"), -1 ],
71
+            [ new StringInputStream("a\n"), -100 ]
72 72
         ];
73 73
     }
74 74
 
75 75
     public function resetProvider()
76 76
     {
77 77
         return [
78
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test1.txt"), 1, "a"],
79
-            [new StringInputStream("a\n"), 1, "a"]
78
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test1.txt"), 1, "a" ],
79
+            [ new StringInputStream("a\n"), 1, "a" ]
80 80
         ];
81 81
     }
82 82
 
83 83
     public function markAndResetProvider()
84 84
     {
85 85
         return [
86
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test7.txt"), 3, "d"],
87
-            [new StringInputStream("abcde\n"), 3, "d"]
86
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test7.txt"), 3, "d" ],
87
+            [ new StringInputStream("abcde\n"), 3, "d" ]
88 88
         ];
89 89
     }
90 90
 
91 91
     public function invalidLengthProvider()
92 92
     {
93 93
         return [
94
-            [new FileInputStream(dirname(__FILE__)  . "/../Fixtures/inputstreamreader-test1.txt"), "a"],
95
-            [new StringInputStream("a\n"), "a"]
94
+            [ new FileInputStream(dirname(__FILE__) . "/../Fixtures/inputstreamreader-test1.txt"), "a" ],
95
+            [ new StringInputStream("a\n"), "a" ]
96 96
         ];
97 97
     }
98 98
 }
Please login to merge, or discard this patch.
Reader/InputStreamReader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
     public function read()
49 49
     {
50 50
         $args = func_get_args();
51
-        $length = count($args) === 1 ? $args[0] : null;
51
+        $length = count($args) === 1 ? $args[ 0 ] : null;
52 52
 
53 53
         return $this->stream->read($length);
54 54
     }
Please login to merge, or discard this patch.
Writer/OutputStreamWriter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,8 @@
 block discarded – undo
51 51
     public function write($buf)
52 52
     {
53 53
         $args = func_get_args();
54
-        $off = array_key_exists(1, $args) ? $args[1] : null;
55
-        $len = array_key_exists(2, $args) ? $args[2] : null;
54
+        $off = array_key_exists(1, $args) ? $args[ 1 ] : null;
55
+        $len = array_key_exists(2, $args) ? $args[ 2 ] : null;
56 56
 
57 57
         $this->stream->write($buf, $off, $len);
58 58
     }
Please login to merge, or discard this patch.