summaryrefslogtreecommitdiff
path: root/app/Fact.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2019-04-25 22:40:04 +0100
committerGreg Roach <fisharebest@webtrees.net>2019-04-25 22:40:04 +0100
commit6c2179e2012ee7bb08bc76647556f957e4eeaa05 (patch)
treefa3197bfef661ccfb5ab93d3f03e5aabbe336754 /app/Fact.php
parent50b578bcabecafb340f098799257a978dd06404e (diff)
downloadwebtrees-6c2179e2012ee7bb08bc76647556f957e4eeaa05.tar.gz
webtrees-6c2179e2012ee7bb08bc76647556f957e4eeaa05.tar.bz2
webtrees-6c2179e2012ee7bb08bc76647556f957e4eeaa05.zip
Closures that do not use $this should be declared static
Diffstat (limited to 'app/Fact.php')
-rw-r--r--app/Fact.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/Fact.php b/app/Fact.php
index 86b5cb0898..0a093a0f9a 100644
--- a/app/Fact.php
+++ b/app/Fact.php
@@ -591,7 +591,7 @@ class Fact
*/
private static function dateComparator(): Closure
{
- return function (Fact $a, Fact $b): int {
+ return static function (Fact $a, Fact $b): int {
if ($a->date()->isOK() && $b->date()->isOK()) {
// If both events have dates, compare by date
$ret = Date::compare($a->date(), $b->date());
@@ -627,7 +627,7 @@ class Fact
$factsort = array_flip(self::FACT_ORDER);
}
- return function (Fact $a, Fact $b) use ($factsort): int {
+ return static function (Fact $a, Fact $b) use ($factsort): int {
// Facts from same families stay grouped together
// Keep MARR and DIV from the same families from mixing with events from other FAMs
// Use the original order in which the facts were added