From 5ff6a325bce7b34be8e28d80d671b50e1aadd895 Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Mon, 25 Nov 2024 17:26:02 +0300 Subject: [PATCH 1/2] interfaces.xml Fix the example error In the footsteps of the issue: https://github.com/php/doc-en/issues/4151 --- language/oop5/interfaces.xml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/language/oop5/interfaces.xml b/language/oop5/interfaces.xml index 742040ef680c..6fa37884a717 100644 --- a/language/oop5/interfaces.xml +++ b/language/oop5/interfaces.xml @@ -154,7 +154,10 @@ class C2 implements I // This example creates a virtual property, which is fine. public string $writeable { get => $this->written; - set => $value; + + set { + $this->written = $value; + } } // This property requires both read and write be possible, From fb85b365fc59ce8b96bfc1348b1f6a2bb72faec6 Mon Sep 17 00:00:00 2001 From: Mikhail Alferov Date: Mon, 25 Nov 2024 17:38:13 +0300 Subject: [PATCH 2/2] Update interfaces.xml minimize spaces --- language/oop5/interfaces.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/language/oop5/interfaces.xml b/language/oop5/interfaces.xml index 6fa37884a717..e66208a8df12 100644 --- a/language/oop5/interfaces.xml +++ b/language/oop5/interfaces.xml @@ -154,7 +154,6 @@ class C2 implements I // This example creates a virtual property, which is fine. public string $writeable { get => $this->written; - set { $this->written = $value; }