Skip to content

Commit 7fb0c2a

Browse files
committed
[TASK] Make classes readonly where possible
(cherry picked from commit eb30120)
1 parent 77d690c commit 7fb0c2a

File tree

17 files changed

+18
-18
lines changed

17 files changed

+18
-18
lines changed

Classes/Backend/Preview/RootPathsSettings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
/**
2323
* @internal Not part of TYPO3's public API.
2424
*/
25-
class RootPathsSettings
25+
readonly class RootPathsSettings
2626
{
2727
/**
2828
* @return array<int, string>

Classes/Builder/ConfigBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
use TYPO3\CMS\ContentBlocks\Definition\ContentType\ContentType;
2121
use TYPO3\CMS\ContentBlocks\Definition\Factory\UniqueIdentifierCreator;
2222

23-
class ConfigBuilder
23+
readonly class ConfigBuilder
2424
{
2525
public function build(ContentType $contentType, string $vendor, string $name, ?string $title, null|string|int $typeName, array $defaultConfig): array
2626
{

Classes/Builder/DefaultsLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
use Symfony\Component\Yaml\Yaml;
2222
use TYPO3\CMS\Core\Utility\GeneralUtility;
2323

24-
class DefaultsLoader
24+
readonly class DefaultsLoader
2525
{
2626
/**
2727
* @return array{

Classes/DataProcessing/GridFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
/**
2828
* @internal Not part of TYPO3's public API.
2929
*/
30-
class GridFactory
30+
readonly class GridFactory
3131
{
3232
/**
3333
* @param array<ContentBlockData> $records

Classes/DataProcessing/GridProcessor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
/**
2525
* @internal Not part of TYPO3's public API.
2626
*/
27-
class GridProcessor
27+
readonly class GridProcessor
2828
{
2929
public function __construct(
30-
protected readonly GridFactory $gridFactory,
30+
protected GridFactory $gridFactory,
3131
) {}
3232

3333
public function processGrid(

Classes/Definition/Factory/TcaFieldFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
use TYPO3\CMS\ContentBlocks\Definition\TcaFieldDefinition;
2323
use TYPO3\CMS\ContentBlocks\FieldType\FieldTypeInterface;
2424

25-
class TcaFieldFactory
25+
readonly class TcaFieldFactory
2626
{
2727
public static function create(array $array): TcaFieldDefinition
2828
{

Classes/Definition/Factory/UniqueIdentifierCreator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
/**
2323
* @internal Not part of TYPO3's public API.
2424
*/
25-
class UniqueIdentifierCreator
25+
readonly class UniqueIdentifierCreator
2626
{
2727
public static function createContentTypeIdentifier(string $name): string
2828
{

Classes/Form/FormDataProvider/AllowedRecordTypeFilter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
/**
2323
* @internal
2424
*/
25-
class AllowedRecordTypeFilter
25+
readonly class AllowedRecordTypeFilter
2626
{
2727
/**
2828
* @param array<array|SelectItem> $items

Classes/Generator/HtmlTemplateCodeGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
/**
2424
* @internal Not part of TYPO3's public API.
2525
*/
26-
class HtmlTemplateCodeGenerator
26+
readonly class HtmlTemplateCodeGenerator
2727
{
2828
public function generateEditorPreviewTemplate(LoadedContentBlock $contentBlockConfiguration): string
2929
{

Classes/Loader/AssetPublisher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
use TYPO3\CMS\ContentBlocks\Utility\ContentBlockPathUtility;
2323
use TYPO3\CMS\Core\Utility\GeneralUtility;
2424

25-
class AssetPublisher
25+
readonly class AssetPublisher
2626
{
2727
/**
2828
* @param LoadedContentBlock[] $loadedContentBlocks

0 commit comments

Comments
 (0)