From: Mikael Nordfeldth <mmn@hethane.se>
Date: Mon, 12 Aug 2013 17:08:11 +0000 (+0200)
Subject: staticGet is a static function
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=3394efca60aac18238efb4589c066d839086057d;p=quix0rs-gnu-social.git

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).
---

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;