From 3394efca60aac18238efb4589c066d839086057d Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 12 Aug 2013 19:08:11 +0200 Subject: [PATCH] staticGet is a static function We always call staticGet statically, so we define it statically. Next step is to remove a bunch of definitions of 'staticGet' from classes that can instead fall back to a parent class in Managed_DataObject. The ampersand is removed as we're returning a class anyway, which does not need a reference (and when we return false, it means nothing). --- classes/Memcached_DataObject.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index 54c885e737..16ef7e4516 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -30,7 +30,7 @@ class Memcached_DataObject extends Safe_DataObject * @param mixed $v key field value, or leave out for primary key lookup * @return mixed Memcached_DataObject subtype or false */ - function &staticGet($cls, $k, $v=null) + static function staticGet($cls, $k, $v=null) { if (is_null($v)) { $v = $k;