@@ -820,14 +820,17 @@ function diff($val1, $val2 = null) {
820
820
821
821
/**
822
822
* Determines if two Sets or arrays are equal
823
+ * This method is deprecated, and will be removed in a future release.
823
824
*
824
825
* @param array $val1 First value
825
826
* @param array $val2 Second value
826
827
* @return boolean true if they are equal, false otherwise
827
828
* @access public
828
829
* @static
830
+ * @deprecated
829
831
*/
830
832
function isEqual ($ val1 , $ val2 = null ) {
833
+ trigger_error ('Set::isEqual() is deprecated. Please use standard comparison operators instead. ' , E_USER_WARNING );
831
834
return ($ val1 == $ val2 );
832
835
}
833
836
@@ -1002,11 +1005,10 @@ function combine($data, $path1 = null, $path2 = null, $groupPath = null) {
1002
1005
}
1003
1006
1004
1007
/**
1005
- * Converts an object into an array. If $object is no object, reverse
1006
- * will return the same value.
1007
- *
1008
+ * Converts an object into an array.
1008
1009
* @param object $object Object to reverse
1009
- * @return array
1010
+ * @return array Array representation of given object
1011
+ * @public
1010
1012
* @static
1011
1013
*/
1012
1014
function reverse ($ object ) {
@@ -1110,10 +1112,10 @@ function __flatten($results, $key = null) {
1110
1112
/**
1111
1113
* Sorts an array by any value, determined by a Set-compatible path
1112
1114
*
1113
- * @param array $data
1115
+ * @param array $data An array of data to sort
1114
1116
* @param string $path A Set-compatible path to the array value
1115
- * @param string $dir asc/desc
1116
- * @return array
1117
+ * @param string $dir Direction of sorting - either ascending (ASC), or descending (DESC)
1118
+ * @return array Sorted array of data
1117
1119
* @static
1118
1120
*/
1119
1121
function sort ($ data , $ path , $ dir ) {
@@ -1151,6 +1153,8 @@ function sort($data, $path, $dir) {
1151
1153
* to array_map, reduce will handoff to array_reduce, and pass will
1152
1154
* use call_user_func_array().
1153
1155
* @return mixed Result of the callback when applied to extracted data
1156
+ * @access public
1157
+ * @static
1154
1158
*/
1155
1159
function apply ($ path , $ data , $ callback , $ options = array ()) {
1156
1160
$ defaults = array ('type ' => 'pass ' );
0 commit comments