dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e552f30
)
collation: Use `self` to reference same class instead of class name
author
Derick Alangi
<alangiderick@gmail.com>
Wed, 20 Mar 2019 20:00:03 +0000
(21:00 +0100)
committer
Derick Alangi
<alangiderick@gmail.com>
Wed, 20 Mar 2019 20:00:03 +0000
(21:00 +0100)
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
patch
|
blob
|
history
diff --git
a/includes/collation/Collation.php
b/includes/collation/Collation.php
index
ab3c6fb
..
312c2d4
100644
(file)
--- 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;
}