Skip to content

Commit 7ac16ce

Browse files
authored
Update set.xml Specify the correct return type and values, CS (#5215)
1 parent 581589d commit 7ac16ce

1 file changed

Lines changed: 11 additions & 10 deletions

File tree

  • reference/quickhash/quickhashinthash

reference/quickhash/quickhashinthash/set.xml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<refsect1 role="description">
1111
&reftitle.description;
1212
<methodsynopsis>
13-
<modifier>public</modifier> <type>bool</type><methodname>QuickHashIntHash::set</methodname>
13+
<modifier>public</modifier> <type>int</type><methodname>QuickHashIntHash::set</methodname>
1414
<methodparam><type>int</type><parameter>key</parameter></methodparam>
1515
<methodparam><type>int</type><parameter>value</parameter></methodparam>
1616
</methodsynopsis>
@@ -49,7 +49,7 @@
4949
<refsect1 role="returnvalues">
5050
&reftitle.returnvalues;
5151
<simpara>
52-
2 if the entry was found and updated, 1 if the entry was newly added or 0
52+
2 if the entry was newly added, 1 if the entry was found and updated, or 0
5353
if there was an error.
5454
</simpara>
5555
</refsect1>
@@ -61,17 +61,17 @@
6161
<programlisting role="php">
6262
<![CDATA[
6363
<?php
64-
$hash = new QuickHashIntHash( 1024 );
64+
65+
$hash = new QuickHashIntHash(1024);
6566
6667
echo "Set->Add\n";
67-
var_dump( $hash->get( 46692 ) );
68-
var_dump( $hash->set( 46692, 16091 ) );
69-
var_dump( $hash->get( 46692 ) );
68+
var_dump($hash->get(46692));
69+
var_dump($hash->set(46692, 16091));
70+
var_dump($hash->get(46692));
7071
71-
echo "Set->Update\n";
72-
var_dump( $hash->set( 46692, 29906 ) );
73-
var_dump( $hash->get( 46692 ) );
74-
?>
72+
echo "\n\nSet->Update\n";
73+
var_dump($hash->set(46692, 29906));
74+
var_dump($hash->get(46692));
7575
]]>
7676
</programlisting>
7777
&example.outputs.similar;
@@ -81,6 +81,7 @@ Set->Add
8181
bool(false)
8282
int(2)
8383
int(16091)
84+
8485
Set->Update
8586
int(1)
8687
int(29906)

0 commit comments

Comments
 (0)