From b6cc8a67d9d40052c51650bba4d69a774210fc29 Mon Sep 17 00:00:00 2001 From: Paz Date: Wed, 11 Dec 2024 14:01:12 +0100 Subject: [PATCH] Change and fix property visibility in lazy-objects example #3 With the restricted visibility on id property for class BlogPost, example 3 is not functional. --- language/oop5/lazy-objects.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/language/oop5/lazy-objects.xml b/language/oop5/lazy-objects.xml index 1a22d4df5801..a32b2978eed5 100644 --- a/language/oop5/lazy-objects.xml +++ b/language/oop5/lazy-objects.xml @@ -141,9 +141,9 @@ int(1) class BlogPost { public function __construct( - private int $id, - private string $title, - private string $content, + public int $id, + public string $title, + public string $content, ) { } }