Change to two spaces

This commit is contained in:
Oliver Davies 2024-09-08 23:09:54 +01:00
parent 2537fe2052
commit ed60ab964c
556 changed files with 2252 additions and 2252 deletions

View file

@ -1,11 +1,11 @@
---
title: >
Immutable read-only properties in PHP 8.1
Immutable read-only properties in PHP 8.1
pubDate: 2023-04-13
permalink: >-
archive/2023/04/13/immutable-read-only-properties-in-php-8-1
archive/2023/04/13/immutable-read-only-properties-in-php-8-1
tags:
- php
- php
---
Continuing with yesterday's data transfer object (DTO) example, something that can be done since PHP 8.1 is to make properties read-only:
@ -14,8 +14,8 @@ Continuing with yesterday's data transfer object (DTO) example, something that c
class AccountDetails {
public function __construct(
public readonly string $accountNumber,
public readonly string $sortCode,
public readonly string $accountNumber,
public readonly string $sortCode,
) {}
}