From 9e8f5c3067e52b3f73ba4abe191be8606b12c59c Mon Sep 17 00:00:00 2001 From: Derick Alangi Date: Wed, 20 Mar 2019 21:00:03 +0100 Subject: [PATCH] collation: Use `self` to reference same class instead of class name With the use of `self`, even if the class name is changed (which is very unlikely), then the code won't break. So it's a way of future proofing the code. Change-Id: Ib4046315b8aaee2e77af036893924962d25ceeb1 --- includes/collation/Collation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/collation/Collation.php b/includes/collation/Collation.php index ab3c6fb432..312c2d438c 100644 --- a/includes/collation/Collation.php +++ b/includes/collation/Collation.php @@ -76,7 +76,7 @@ abstract class Collation { $collationObject = null; Hooks::run( 'Collation::factory', [ $collationName, &$collationObject ] ); - if ( $collationObject instanceof Collation ) { + if ( $collationObject instanceof self ) { return $collationObject; } -- 2.20.1