Always use === in PHP

Change-Id: I30ca7cdf73921dcae48997841816099972cdbed0
This commit is contained in:
Ed Sanders 2023-07-26 14:29:40 +01:00
parent 5bf0110b4b
commit e389fc48f1
4 changed files with 5 additions and 5 deletions

View file

@ -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;

View file

@ -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 '';
}

View file

@ -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() );

View file

@ -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' )
) {