File tree 2 files changed +5
-15
lines changed
2 files changed +5
-15
lines changed Original file line number Diff line number Diff line change @@ -20,23 +20,16 @@ class ExtrusiveBuffer extends LazyBuffer
20
20
*/
21
21
public const BUFFER_DEFAULT_SIZE = 100 ;
22
22
23
- /**
24
- * @var int<1, max>
25
- */
26
- private int $ size ;
27
-
28
23
/**
29
24
* @param iterable<TokenInterface> $stream
30
25
* @param int<1, max> $size
31
26
*/
32
27
public function __construct (
33
28
iterable $ stream ,
34
- int $ size = self ::BUFFER_DEFAULT_SIZE
29
+ private int $ size = self ::BUFFER_DEFAULT_SIZE
35
30
) {
36
- $ this ->size = $ size ;
37
-
38
31
/** @psalm-suppress RedundantCondition */
39
- assert ($ this ->size > 0 , 'Buffer size must be greater than 0, but ' . $ size . ' passed ' );
32
+ assert ($ this ->size > 0 , 'Buffer size must be greater than 0, but ' . $ this -> size . ' passed ' );
40
33
41
34
parent ::__construct ($ stream );
42
35
}
Original file line number Diff line number Diff line change 10
10
*/
11
11
class MutableBuffer implements BufferInterface
12
12
{
13
- private BufferInterface $ parent ;
14
-
15
13
/**
16
14
* @var array<int<0, max>, TokenInterface>
17
15
*/
18
16
private array $ overrides = [];
19
17
20
- public function __construct (BufferInterface $ parent )
21
- {
22
- $ this ->parent = $ parent ;
23
- }
18
+ public function __construct (
19
+ private BufferInterface $ parent ,
20
+ ) {}
24
21
25
22
/**
26
23
* @param int<0, max> $offset
You can’t perform that action at this time.
0 commit comments