File tree Expand file tree Collapse file tree 3 files changed +2
-5
lines changed Expand file tree Collapse file tree 3 files changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ class FileDataSource extends AbstractDataSource
35
35
*
36
36
* @throws DataSourceException
37
37
*/
38
- public function __construct (string $ filePath , int $ bufferSize = 4096 )
38
+ public function __construct (string $ filePath , int $ bufferSize = 2048 )
39
39
{
40
40
if (false === \file_exists ($ filePath )) {
41
41
throw new DataSourceException ('File does not exist: ' .$ filePath );
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ abstract class AbstractKeywordState implements StateInterface
12
12
*/
13
13
public function run (DataSourceInterface $ dataSource )
14
14
{
15
- $ position = 0 ;
15
+ $ position = 1 ;
16
16
$ word = $ this ->getWord ();
17
17
$ wordLength = \mb_strlen ($ word );
18
18
while (null !== $ char = $ dataSource ->read ()) {
Original file line number Diff line number Diff line change @@ -37,15 +37,12 @@ public function run(DataSourceInterface $dataSource)
37
37
$ state = States::$ ARRAY ;
38
38
break ;
39
39
case 't ' :
40
- $ dataSource ->rewind ();
41
40
$ state = States::$ TRUE ;
42
41
break ;
43
42
case 'f ' :
44
- $ dataSource ->rewind ();
45
43
$ state = States::$ FALSE ;
46
44
break ;
47
45
case 'n ' :
48
- $ dataSource ->rewind ();
49
46
$ state = States::$ NULL ;
50
47
break ;
51
48
default :
You can’t perform that action at this time.
0 commit comments