Skip to content

Commit ae3b5c6

Browse files
committed
Declare some properties as readonly
1 parent 3c485ea commit ae3b5c6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Definition/Operator/AbstractOperator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
abstract class AbstractOperator extends InputObjectType
2121
{
2222
final public function __construct(
23-
protected Types $types,
23+
protected readonly Types $types,
2424
LeafType $leafType,
2525
) {
2626
$config = $this->getConfiguration($leafType);

src/Factory/AbstractFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ abstract class AbstractFactory
2121
protected readonly Reader $reader;
2222

2323
public function __construct(
24-
protected Types $types,
25-
protected EntityManager $entityManager,
24+
protected readonly Types $types,
25+
protected readonly EntityManager $entityManager,
2626
) {
2727
$this->reader = new Reader();
2828
}

tests/DocBlockReaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ private function createParameter(string $name): ReflectionParameter
135135
{
136136
return new class($name) extends ReflectionParameter {
137137
public function __construct(
138-
public string $mockedName,
138+
public readonly string $mockedName,
139139
) {}
140140

141141
public function getName(): string

0 commit comments

Comments
 (0)