Skip to content

Commit 0aa6447

Browse files
authored
ArrayObject::__construct Replace tag and implement → extend + CS (#4416)
1 parent 7d80472 commit 0aa6447

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

reference/spl/arrayobject/construct.xml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<methodparam choice="opt"><type>string</type><parameter>iteratorClass</parameter><initializer>ArrayIterator::class</initializer></methodparam>
1616
</constructorsynopsis>
1717
<para>
18-
This constructs a new array <type>object</type>.
18+
This constructs a new array <type>object</type>.
1919
</para>
2020
</refsect1>
2121

@@ -27,7 +27,7 @@
2727
<term><parameter>array</parameter></term>
2828
<listitem>
2929
<para>
30-
The <parameter>array</parameter> parameter accepts an
30+
The <parameter>array</parameter> parameter accepts an
3131
<type>array</type> or an <type>Object</type>.
3232
</para>
3333
</listitem>
@@ -46,7 +46,7 @@
4646
<listitem>
4747
<para>
4848
Specify the class that will be used for iteration of the <classname>ArrayObject</classname> object.
49-
The class must implement <interfacename>ArrayIterator</interfacename>.
49+
The class must extend the <classname>ArrayIterator</classname> class.
5050
</para>
5151
</listitem>
5252
</varlistentry>
@@ -62,13 +62,17 @@
6262
<programlisting role="php">
6363
<![CDATA[
6464
<?php
65-
$array = array('1' => 'one',
66-
'2' => 'two',
67-
'3' => 'three');
65+
66+
$array = [
67+
'1' => 'one',
68+
'2' => 'two',
69+
'3' => 'three'
70+
];
6871
6972
$arrayobject = new ArrayObject($array);
7073
7174
var_dump($arrayobject);
75+
7276
?>
7377
]]>
7478
</programlisting>

0 commit comments

Comments
 (0)