From 3ae9ba10b301156e32e09aacced6178a8a27ccf2 Mon Sep 17 00:00:00 2001 From: Nicolaas Date: Wed, 23 Jan 2013 08:36:35 +1300 Subject: [PATCH] MINOR: typo in DataList MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit small change in DataList::filterByCallback.  new ArrayList; changed to new ArrayList(); and added @return as this is particular important for this method (unexpected return type).  --- model/DataList.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/model/DataList.php b/model/DataList.php index 25fafb3d6..9a6d4c64d 100644 --- a/model/DataList.php +++ b/model/DataList.php @@ -411,15 +411,14 @@ class DataList extends ViewableData implements SS_List, SS_Filterable, SS_Sortab * The function will be passed each record of the DataList in turn, and must return true for the record to be * included. Returns the filtered list. * - * Note that, in the current implementation, the filtered list will be an ArrayList, but this may change in a - * future implementation. + * @return ArrayList (this may change in future implementations) */ public function filterByCallback($callback) { if(!is_callable($callback)) { throw new LogicException("DataList::filterByCallback() must be passed something callable."); } - $output = new ArrayList; + $output = new ArrayList(); foreach($this as $item) { if($callback($item)) $output->push($item); }