From 06ef8e025079fd29d56aff675f7e1fed723f571f Mon Sep 17 00:00:00 2001 From: Greg Roach Date: Mon, 1 Jun 2015 17:21:14 +0100 Subject: Prefer self/static to class name --- app/Individual.php | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'app/Individual.php') diff --git a/app/Individual.php b/app/Individual.php index 43762db667..0949ab721a 100644 --- a/app/Individual.php +++ b/app/Individual.php @@ -34,27 +34,6 @@ class Individual extends GedcomRecord { /** @var Date The estimated date of death */ private $_getEstimatedDeathDate; - /** - * Get an instance of an individual object. For single records, - * we just receive the XREF. For bulk records (such as lists - * and search results) we can receive the GEDCOM data as well. - * - * @param string $xref - * @param Tree $tree - * @param string|null $gedcom - * - * @return Individual|null - */ - public static function getInstance($xref, Tree $tree, $gedcom = null) { - $record = parent::getInstance($xref, $tree, $gedcom); - - if ($record instanceof Individual) { - return $record; - } else { - return null; - } - } - /** * Sometimes, we'll know in advance that we need to load a set of records. * Typically when we load families and their members. @@ -162,7 +141,7 @@ class Individual extends GedcomRecord { private static function isRelated(Individual $target, $distance) { static $cache = null; - $user_individual = Individual::getInstance($target->tree->getUserPreference(Auth::user(), 'gedcomid'), $target->tree); + $user_individual = self::getInstance($target->tree->getUserPreference(Auth::user(), 'gedcomid'), $target->tree); if ($user_individual) { if (!$cache) { $cache = array( -- cgit v1.3