Skip to content

Commit 2e7c00f

Browse files
committed
Improve new content
Use simpara according to new style guide Fix indentation Use semantic line breaks and reduce line length to 80 chars were reasonable as dictated by our style guide
1 parent f9dabde commit 2e7c00f

File tree

4 files changed

+337
-308
lines changed

4 files changed

+337
-308
lines changed

language/oop5/abstract.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@
2121
<link linkend="language.oop.lsp">signature compatibility</link> rules.
2222
</para>
2323

24-
<para>
24+
<simpara>
2525
As of PHP 8.4, an abstract class may declare an abstract property, either public or protected.
2626
A protected abstract property may be satisfied by a property that is readable/writeable from either
2727
protected or public scope.
28-
</para>
29-
<para>
28+
</simpara>
29+
<simpara>
3030
An abstract property may be satisfied either by a standard property or by a property
3131
with defined <link linkend="language.oop5.property-hooks">hooks</link>, corresponding to the required operation.
32-
</para>
32+
</simpara>
3333

3434
<example>
3535
<title>Abstract method example</title>
36-
<programlisting role="php">
36+
<programlisting role="php">
3737
<![CDATA[
3838
<?php
3939
abstract class AbstractClass
@@ -171,10 +171,10 @@ class C extends A
171171
]]>
172172
</programlisting>
173173
</example>
174-
<para>
174+
<simpara>
175175
An abstract property on an abstract class may provide implementations for any hook,
176176
but must have either <literal>get</literal> or <literal>set</literal> declared but not defined (as in the example above).
177-
</para>
177+
</simpara>
178178
<example>
179179
<title>Abstract property example</title>
180180
<programlisting role="php">

language/oop5/interfaces.xml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,21 @@
9191
</sect2>
9292
<sect2 xml:id="language.oop5.interfaces.properties">
9393
<title>Properties</title>
94-
<para>
95-
As of PHP 8.4.0, interfaces may also declare properties. If they do, the declaration must specify if the
96-
property is to be readable, writeable, or both. The interface declaration applies only to public read
97-
and write access.
98-
</para>
99-
<para>
100-
An class may satisfy an interface property in multiple ways. It may define a public property. It may
101-
define a public <link linkend="language.oop5.property-hooks.virtual">virtual property</link> that implements
102-
only the corresponding hook. Or a read property may be satisfied by a <literal>readonly</literal> property.
94+
<simpara>
95+
As of PHP 8.4.0, interfaces may also declare properties.
96+
If they do, the declaration must specify if the property is to be readable,
97+
writeable, or both.
98+
The interface declaration applies only to public read and write access.
99+
</simpara>
100+
<simpara>
101+
An class may satisfy an interface property in multiple ways.
102+
It may define a public property.
103+
It may define a public
104+
<link linkend="language.oop5.property-hooks.virtual">virtual property</link>
105+
that implements only the corresponding hook.
106+
Or a read property may be satisfied by a <literal>readonly</literal> property.
103107
However, an interface property that is settable may not be <literal>readonly</literal>.
104-
</para>
108+
</simpara>
105109
<example>
106110
<title>Interface properties example</title>
107111
<programlisting role="php">

0 commit comments

Comments
 (0)