diff --git a/includes/block/AbstractBlock.php b/includes/block/AbstractBlock.php index 699c1ea2992..d7ebdf751cf 100644 --- a/includes/block/AbstractBlock.php +++ b/includes/block/AbstractBlock.php @@ -290,8 +290,6 @@ abstract class AbstractBlock implements Block { $res = $this->isSitewide(); break; case 'read': - $res = false; - break; case 'purge': $res = false; break; diff --git a/includes/block/BlockManager.php b/includes/block/BlockManager.php index 3a0f55458f2..aef68511cf4 100644 --- a/includes/block/BlockManager.php +++ b/includes/block/BlockManager.php @@ -682,8 +682,6 @@ class BlockManager { return $id; } $hmac = MWCryptHash::hmac( $id, $this->options->get( MainConfigNames::SecretKey ), false ); - $cookieValue = $id . '!' . $hmac; - return $cookieValue; + return $id . '!' . $hmac; } - } diff --git a/includes/block/BlockPermissionChecker.php b/includes/block/BlockPermissionChecker.php index 0fbf93468ac..ea8193556ec 100644 --- a/includes/block/BlockPermissionChecker.php +++ b/includes/block/BlockPermissionChecker.php @@ -42,11 +42,6 @@ class BlockPermissionChecker { */ private $target; - /** - * @var int|null One of AbstractBlock::TYPE_* constants, or null when unknown - */ - private $targetType = null; - /** * @var Authority Block performer */ @@ -76,7 +71,7 @@ class BlockPermissionChecker { ) { $options->assertRequiredOptions( self::CONSTRUCTOR_OPTIONS ); $this->options = $options; - [ $this->target, $this->targetType ] = $blockUtils->parseBlockTarget( $target ); + [ $this->target, ] = $blockUtils->parseBlockTarget( $target ); $this->performer = $performer; } diff --git a/includes/block/DatabaseBlock.php b/includes/block/DatabaseBlock.php index 5d849f1dea8..d97dd4e91fe 100644 --- a/includes/block/DatabaseBlock.php +++ b/includes/block/DatabaseBlock.php @@ -103,7 +103,7 @@ class DatabaseBlock extends AbstractBlock { $options += $defaults; - if ( $options['by'] && $options['by'] instanceof UserIdentity ) { + if ( $options['by'] instanceof UserIdentity ) { $this->setBlocker( $options['by'] ); }