Skip to content

Commit 029f19d

Browse files
Fix grammar in predefined (#5755)
1 parent 57a2f4c commit 029f19d

8 files changed

Lines changed: 38 additions & 33 deletions

File tree

‎language/predefined/arrayaccess.xml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
<sectionxml:id="arrayaccess.intro">
1111
&reftitle.intro;
12-
<para>
13-
Interface to provide accessing objects as arrays.
14-
</para>
12+
<simpara>
13+
Interface to provide access to objects as arrays.
14+
</simpara>
1515
</section>
1616

1717
<sectionxml:id="arrayaccess.synopsis">

‎language/predefined/iterator.xml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636

3737
<sectionxml:id="iterator.iterators">
3838
<title>Predefined iterators</title>
39-
<para>
40-
PHP already provides a number of iterators for many day to day tasks.
39+
<simpara>
40+
PHP already provides a number of iterators for many day-to-day tasks.
4141
See <linklinkend="spl.iterators">SPL iterators</link> for a list.
42-
</para>
42+
</simpara>
4343
</section>
4444

4545
<sectionxml:id="iterator.examples">

‎language/predefined/serializable.xml‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,20 @@
1313
Interface for customized serializing.
1414
</para>
1515

16-
<para>
16+
<simpara>
1717
Classes that implement this interface no longer support
1818
<linklinkend="object.sleep">__sleep()</link> and
19-
<linklinkend="object.wakeup">__wakeup()</link>. The method serialize is
20-
called whenever an instance needs to be serialized. This does not invoke __destruct()
21-
or have any other side effect unless programmed inside the method. When the data is
22-
unserialized the class is known and the appropriate unserialize() method is called as
23-
a constructor instead of calling __construct(). If you need to execute the standard
24-
constructor you may do so in the method.
25-
</para>
19+
<linklinkend="object.wakeup">__wakeup()</link>.
20+
The <methodname>serialize</methodname> method is
21+
called whenever an instance needs to be serialized.
22+
This does not invoke <methodname>__destruct</methodname>
23+
or have any other side effect unless programmed inside the method.
24+
When the data is unserialized the class is known and the appropriate
25+
<methodname>unserialize</methodname> method is called as
26+
a constructor instead of calling <methodname>__construct</methodname>.
27+
The constructor can be called from within the
28+
<methodname>unserialize</methodname> method if desired.
29+
</simpara>
2630

2731
<warning>
2832
<para>

‎language/predefined/stdclass.xml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
A generic empty class with dynamic properties.
1414
</para>
1515

16-
<para>
17-
Objects of this class can be instantiated with
16+
<simpara>
17+
Objects of this class can be instantiated with the
1818
<linklinkend="language.oop5.basic.new">new</link> operator or created by
1919
<linklinkend="language.types.object.casting">typecasting to object</link>.
2020
Several PHP functions also create instances of this class, e.g.
2121
<function>json_decode</function>, <function>mysqli_fetch_object</function>
2222
or <methodname>PDOStatement::fetchObject</methodname>.
23-
</para>
23+
</simpara>
2424

2525
<para>
2626
Despite not implementing
@@ -29,12 +29,12 @@
2929
<code>#[\AllowDynamicProperties]</code> attribute.
3030
</para>
3131

32-
<para>
32+
<simpara>
3333
This is not a base class as PHP does not have a concept of a universal base
34-
class. However, it is possible to create a custom class that extends from
34+
class. However, it is possible to create a custom class that extends
3535
<classname>stdClass</classname> and as a result inherits the functionality
3636
of dynamic properties.
37-
</para>
37+
</simpara>
3838
</section>
3939

4040
<sectionxml:id="stdclass.synopsis">

‎language/predefined/traversable.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
</classsynopsis>
3030

3131
<simpara>
32-
This interface has no methods, its only purpose is to be the base
32+
This interface has no methods; its only purpose is to be the base
3333
interface for all traversable classes.
3434
</simpara>
3535

‎language/predefined/valueerror.xml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88

99
<sectionxml:id="valueerror.intro">
1010
&reftitle.intro;
11-
<para>
11+
<simpara>
1212
A <classname>ValueError</classname> is thrown when the
13-
type of an argument is correct but the value of it is incorrect.
13+
type of an argument is correct but its value is incorrect.
1414
For example, passing a negative integer when the function expects a
1515
positive one, or passing an empty string/array when the function expects
1616
it to not be empty.
17-
</para>
17+
</simpara>
1818
</section>
1919

2020
<sectionxml:id="valueerror.synopsis">

‎language/predefined/weakmap.xml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99

1010
<sectionxml:id="weakmap.intro">
1111
&reftitle.intro;
12-
<para>
13-
A <classname>WeakMap</classname> is map (or dictionary) that accepts objects as keys. However, unlike the
14-
otherwise similar <classname>SplObjectStorage</classname>, an object in a key of <classname>WeakMap</classname>
12+
<simpara>
13+
A <classname>WeakMap</classname> is a map (or dictionary) that accepts objects as keys. However, unlike the
14+
otherwise similar <classname>SplObjectStorage</classname>, an object in a key of a <classname>WeakMap</classname>
1515
does not contribute toward the object's reference count. That is, if at any point the only remaining reference
1616
to an object is the key of a <classname>WeakMap</classname>, the object will be garbage collected and removed
1717
from the <classname>WeakMap</classname>. Its primary use case is for building caches of data derived from
1818
an object that do not need to live longer than the object.
19-
</para>
19+
</simpara>
2020
<para>
2121
<classname>WeakMap</classname> implements <interfacename>ArrayAccess</interfacename>,
2222
<interfacename>Traversable</interfacename> (via <interfacename>IteratorAggregate</interfacename>),
@@ -56,7 +56,7 @@
5656
&reftitle.examples;
5757
<para>
5858
<example>
59-
<title><classname>Weakmap</classname> usage example</title>
59+
<title><classname>WeakMap</classname> usage example</title>
6060
<programlistingrole="php">
6161
<![CDATA[
6262
<?php

‎language/predefined/weakreference.xml‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@
99

1010
<sectionxml:id="weakreference.intro">
1111
&reftitle.intro;
12-
<para>
13-
Weak references allow the programmer to retain a reference to an object which does not prevent
14-
the object from being destroyed. They are useful for implementing cache like structures.
12+
<simpara>
13+
Weak references allow the programmer to retain a reference to an object
14+
without preventing the object from being destroyed.
15+
They are useful for implementing cache-like structures.
1516
If the original object has been destroyed, &null; will be returned
1617
when calling the <methodname>WeakReference::get</methodname> method.
1718
The original object will be destroyed when the
1819
<linklinkend="features.gc.refcounting-basics">refcount</link> for it drops to zero;
1920
creating weak references does not increase the <literal>refcount</literal> of the object being referenced.
20-
</para>
21+
</simpara>
2122
<simpara>
2223
<classname>WeakReference</classname>s cannot be serialized.
2324
</simpara>

0 commit comments

Comments
 (0)