Skip to content

Commit d92958f

Browse files
committed
Defined readonly properties
1 parent b7f838e commit d92958f

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"ext-bcmath": "*",
2121
"ext-mbstring": "*",
2222
"ext-fileinfo": "*",
23-
"php": ">=8.0.0",
23+
"php": ">=8.1.0",
2424
"guzzlehttp/psr7": "^2.0",
2525
"symfony/polyfill-intl-idn": "^1.23"
2626
},

src/EvaluationConfig/StaticEvaluationConfig.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
class StaticEvaluationConfig
1111
{
12-
public /*readonly*/ SchemaPoolInterface $schemaPool;
12+
public readonly SchemaPoolInterface $schemaPool;
1313

1414
/**
1515
* @var DraftInterface[]
@@ -22,7 +22,7 @@ class StaticEvaluationConfig
2222
* @param SchemaPoolInterface|null $schemaPool
2323
*/
2424
public function __construct(
25-
public /*readonly*/ DraftInterface $defaultDraft,
25+
public readonly DraftInterface $defaultDraft,
2626
array $supportedDrafts = [],
2727
?SchemaPoolInterface $schemaPool = null
2828
) {

src/EvaluationContext/RuntimeEvaluationContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class RuntimeEvaluationContext
2424
public function __construct(
2525
object|bool $schema,
2626
mixed &$instance,
27-
public /*readonly*/ StaticEvaluationContext $staticEvaluationContext
27+
public readonly StaticEvaluationContext $staticEvaluationContext
2828
) {
2929
$this->schemaStack[0] = [
3030
'schema' => $schema,

src/EvaluationContext/RuntimeEvaluationResult.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ class RuntimeEvaluationResult
1515
private ?bool $evaluationResult = null;
1616

1717
public function __construct(
18-
public /*readonly*/ int $number,
19-
public /*readonly*/ KeywordInterface $keyword,
20-
public /*readonly*/ string $keywordLocation,
21-
public /*readonly*/ string $instanceLocation,
22-
public /*readonly*/ ?string $absoluteKeywordLocation
18+
public readonly int $number,
19+
public readonly KeywordInterface $keyword,
20+
public readonly string $keywordLocation,
21+
public readonly string $instanceLocation,
22+
public readonly ?string $absoluteKeywordLocation
2323
) {}
2424

2525
public function setEvaluationResult(bool $evaluationResult): void

src/EvaluationContext/StaticEvaluationContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class StaticEvaluationContext
1616

1717
public function __construct(
1818
object|bool $schema,
19-
public /*readonly*/ StaticEvaluationConfig $config
19+
public readonly StaticEvaluationConfig $config
2020
) {
2121
$this->draft = $this->config->defaultDraft;
2222
$this->prioritizedSchemaKeywords = new \WeakMap();

0 commit comments

Comments
 (0)