Skip to content

Commit 18262b3

Browse files
committed
Add native property types in UtfString
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
1 parent 7a39826 commit 18262b3

1 file changed

Lines changed: 5 additions & 15 deletions

File tree

src/UtfString.php

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,43 +33,33 @@ class UtfString implements ArrayAccess, Stringable
3333
{
3434
/**
3535
* The raw, multi-byte string.
36-
*
37-
* @var string
3836
*/
39-
public $str = '';
37+
public string $str = '';
4038

4139
/**
4240
* The index of current byte.
4341
*
4442
* For ASCII strings, the byte index is equal to the character index.
45-
*
46-
* @var int
4743
*/
48-
public $byteIdx = 0;
44+
public int $byteIdx = 0;
4945

5046
/**
5147
* The index of current character.
5248
*
5349
* For non-ASCII strings, some characters occupy more than one byte and
5450
* the character index will have a lower value than the byte index.
55-
*
56-
* @var int
5751
*/
58-
public $charIdx = 0;
52+
public int $charIdx = 0;
5953

6054
/**
6155
* The length of the string (in bytes).
62-
*
63-
* @var int
6456
*/
65-
public $byteLen = 0;
57+
public int $byteLen = 0;
6658

6759
/**
6860
* The length of the string (in characters).
69-
*
70-
* @var int
7161
*/
72-
public $charLen = 0;
62+
public int $charLen = 0;
7363

7464
/** @param string $str the string */
7565
public function __construct(string $str)

0 commit comments

Comments
 (0)