summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMarius Guggenmos <MariusGuggenmos@gmail.com>2017-10-07 17:49:23 +0200
committerMarius Guggenmos <MariusGuggenmos@gmail.com>2017-10-09 16:36:09 +0200
commit2f173a67abebd14805d6f7c44db2e8b5c4b5cf83 (patch)
treeba1b1b8181978719615df5f0e46e019462dce438 /doc
parentbd10a002402de6e3a69a17af604784ea7f5b3330 (diff)
Array::sort, sort_custom and invert now return reference to Array to allow chaining of operations
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Array.xml12
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 9542c83eaf..cc5f371087 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -177,8 +177,10 @@
</description>
</method>
<method name="invert">
+ <return type="Array">
+ </return>
<description>
- Reverse the order of the elements in the array (so first element will now be the last).
+ Reverse the order of the elements in the array (so first element will now be the last) and return reference to the array.
</description>
</method>
<method name="pop_back">
@@ -238,17 +240,21 @@
</description>
</method>
<method name="sort">
+ <return type="Array">
+ </return>
<description>
- Sort the array using natural order.
+ Sort the array using natural order and return reference to the array.
</description>
</method>
<method name="sort_custom">
+ <return type="Array">
+ </return>
<argument index="0" name="obj" type="Object">
</argument>
<argument index="1" name="func" type="String">
</argument>
<description>
- Sort the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. Note: you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
+ Sort the array using a custom method and return reference to the array. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return true if the first argument is less than the second, and return false otherwise. Note: you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior.
</description>
</method>
</methods>