Skip to content

Commit db93fc1

Browse files
committed
Bumped PHP requirement to 8.1
1 parent a31a2db commit db93fc1

16 files changed

+63
-63
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"license": "MIT",
88
"require": {
99
"lib-pcre": ">=7.2",
10-
"php": ">=7.1"
10+
"php": ">=8.1"
1111
},
1212
"require-dev": {
1313
"phpunit/phpunit": ">=9.1"

composer.lock

Lines changed: 35 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Builder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@ class Builder
2424
/**
2525
* @var InputInterface
2626
*/
27-
protected $input;
27+
public InputInterface $input;
2828

2929
/**
3030
* @var MetaCharacters
3131
*/
32-
protected $meta;
32+
public MetaCharacters $meta;
3333

3434
/**
3535
* @var Runner
3636
*/
37-
protected $runner;
37+
public Runner $runner;
3838

3939
/**
4040
* @var Serializer
4141
*/
42-
protected $serializer;
42+
public Serializer $serializer;
4343

4444
/**
4545
* @param array $config

src/Escaper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ class Escaper
1414
/**
1515
* @var array<string> Characters to escape in a character class
1616
*/
17-
public $inCharacterClass = ['-' => '\\-', '\\' => '\\\\', ']' => '\\]', '^' => '\\^'];
17+
public array $inCharacterClass = ['-' => '\\-', '\\' => '\\\\', ']' => '\\]', '^' => '\\^'];
1818

1919
/**
2020
* @var array<string> Characters to escape outside of a character class
2121
*/
22-
public $inLiteral = [
22+
public array $inLiteral = [
2323
'$' => '\\$', '(' => '\\(', ')' => '\\)', '*' => '\\*',
2424
'+' => '\\+', '.' => '\\.', '?' => '\\?', '[' => '\\[',
2525
'\\' => '\\\\', '^' => '\\^', '{' => '\\{', '|' => '\\|'

src/Input/Utf8.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Utf8 extends BaseImplementation
1515
/**
1616
* @var bool Whether to use surrogates to represent higher codepoints
1717
*/
18-
protected $useSurrogates;
18+
public bool $useSurrogates = false;
1919

2020
/**
2121
* {@inheritdoc}

src/MetaCharacters.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,27 @@ class MetaCharacters
1717
* @const Bit value that indicates whether a meta-character represents a single character usable
1818
* in a character class
1919
*/
20-
const IS_CHAR = 1;
20+
protected const IS_CHAR = 1;
2121

2222
/**
2323
* @const Bit value that indicates whether a meta-character represents a quantifiable expression
2424
*/
25-
const IS_QUANTIFIABLE = 2;
25+
protected const IS_QUANTIFIABLE = 2;
2626

2727
/**
2828
* @var array Map of meta values and the expression they represent
2929
*/
30-
protected $exprs = [];
30+
protected array $exprs = [];
3131

3232
/**
3333
* @var InputInterface
3434
*/
35-
protected $input;
35+
protected InputInterface $input;
3636

3737
/**
3838
* @var array Map of meta-characters' codepoints and their value
3939
*/
40-
protected $meta = [];
40+
protected array $meta = [];
4141

4242
/**
4343
* @param InputInterface $input

src/Output/BaseImplementation.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
abstract class BaseImplementation implements OutputInterface
1313
{
1414
/**
15-
* @var integer
15+
* @var integer Upper limit for valid values
1616
*/
17-
protected $maxValue = 0;
17+
protected int $maxValue = 0;
1818

1919
/**
20-
* @var integer
20+
* @var integer Lower limit for valid values
2121
*/
22-
protected $minValue = 0;
22+
protected int $minValue = 0;
2323

2424
/**
2525
* @param array $options

src/Output/Bytes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class Bytes extends BaseImplementation
1313
{
1414
/** {@inheritdoc} */
15-
protected $maxValue = 255;
15+
protected int $maxValue = 255;
1616

1717
/**
1818
* {@inheritdoc}

src/Output/JavaScript.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class JavaScript extends PrintableAscii
1313
{
1414
/** {@inheritdoc} */
15-
protected $maxValue = 0x10FFFF;
15+
protected int $maxValue = 0x10FFFF;
1616

1717
/**
1818
* {@inheritdoc}

src/Output/PHP.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class PHP extends PrintableAscii
1313
{
1414
/** {@inheritdoc} */
15-
protected $maxValue = 0x10FFFF;
15+
protected int $maxValue = 0x10FFFF;
1616

1717
/**
1818
* {@inheritdoc}

0 commit comments

Comments
 (0)