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
$collationObject = null;
Hooks::run( 'Collation::factory', [ $collationName, &$collationObject ] );
$collationObject = null;
Hooks::run( 'Collation::factory', [ $collationName, &$collationObject ] );
- if ( $collationObject instanceof Collation ) {
+ if ( $collationObject instanceof self ) {
return $collationObject;
}
return $collationObject;
}