forked from GNUsocial/gnu-social
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).
This commit is contained in:
parent
0cb5b6fba7
commit
3394efca60
@ -30,7 +30,7 @@ class Memcached_DataObject extends Safe_DataObject
|
|||||||
* @param mixed $v key field value, or leave out for primary key lookup
|
* @param mixed $v key field value, or leave out for primary key lookup
|
||||||
* @return mixed Memcached_DataObject subtype or false
|
* @return mixed Memcached_DataObject subtype or false
|
||||||
*/
|
*/
|
||||||
function &staticGet($cls, $k, $v=null)
|
static function staticGet($cls, $k, $v=null)
|
||||||
{
|
{
|
||||||
if (is_null($v)) {
|
if (is_null($v)) {
|
||||||
$v = $k;
|
$v = $k;
|
||||||
|
Loading…
Reference in New Issue
Block a user