mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/DiscussionTools
synced 2024-11-30 11:07:24 +00:00
Always use === in PHP
Change-Id: I30ca7cdf73921dcae48997841816099972cdbed0
This commit is contained in:
parent
5bf0110b4b
commit
e389fc48f1
|
@ -254,8 +254,8 @@ class CommentUtils {
|
|||
do {
|
||||
if (
|
||||
$node instanceof Element && (
|
||||
( $node->nextSibling && ( $direction === 'next' || $direction == 'either' ) ) ||
|
||||
( $node->previousSibling && ( $direction === 'previous' || $direction == 'either' ) )
|
||||
( $node->nextSibling && ( $direction === 'next' || $direction === 'either' ) ) ||
|
||||
( $node->previousSibling && ( $direction === 'previous' || $direction === 'either' ) )
|
||||
)
|
||||
) {
|
||||
return $node;
|
||||
|
|
|
@ -318,7 +318,7 @@ class HookUtils {
|
|||
( $feature ? in_array( $feature, (array)$abtest, true ) : (bool)$abtest ) &&
|
||||
$user->isRegistered()
|
||||
) {
|
||||
return $user->getId() % 2 == 0 ? 'test' : 'control';
|
||||
return $user->getId() % 2 === 0 ? 'test' : 'control';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
|
|
@ -457,7 +457,7 @@ class PageHooks implements
|
|||
$descParams = [];
|
||||
$buttonMsg = 'discussiontools-emptystate-button';
|
||||
$title = $context->getTitle();
|
||||
if ( $title->getNamespace() == NS_USER_TALK && !$title->isSubpage() ) {
|
||||
if ( $title->getNamespace() === NS_USER_TALK && !$title->isSubpage() ) {
|
||||
// This is a user talk page
|
||||
$isIP = $this->userNameUtils->isIP( $title->getText() );
|
||||
$isTemp = $this->userNameUtils->isTemp( $title->getText() );
|
||||
|
|
|
@ -29,7 +29,7 @@ class ThreadItemStoreTest extends IntegrationTestCase {
|
|||
*/
|
||||
public function testInsertThreadItems( string $dir ): void {
|
||||
if (
|
||||
$this->db->getType() == 'mysql' &&
|
||||
$this->db->getType() === 'mysql' &&
|
||||
strpos( $this->db->getSoftwareLink(), 'MySQL' ) &&
|
||||
!$this->getCliArg( 'use-normal-tables' )
|
||||
) {
|
||||
|
|
Loading…
Reference in a new issue