summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
007bfbf)
According to the coding standards we even enforce with a custom PHPCS sniff.
It currently does not pick these mistakes up because of the curly brackets.
I'm not sure if this is worth an update of the PHPCS sniff. I wanted to
suggest this fix anyway.
Change-Id: I9041ea7a00baf7f55e0ff0e56879a89fb74bb479
*/
public static function getType() {
return static::TYPE;
}
/**
*/
public static function getType() {
return static::TYPE;
}
/**
*/
public static function getTypeId() {
return static::TYPE_ID;
}
/**
*/
public static function getTypeId() {
return static::TYPE_ID;
}
/**
*/
public function getBlockId() {
return $this->blockId;
}
/**
*/
public function getBlockId() {
return $this->blockId;
}
/**
*/
public function setBlockId( $blockId ) {
$this->blockId = (int)$blockId;
*/
public function setBlockId( $blockId ) {
$this->blockId = (int)$blockId;
*/
public function getValue() {
return $this->value;
}
/**
*/
public function getValue() {
return $this->value;
}
/**
*/
public static function newFromRow( \stdClass $row ) {
return new static( $row->ir_ipb_id, $row->ir_value );
}
/**
*/
public static function newFromRow( \stdClass $row ) {
return new static( $row->ir_ipb_id, $row->ir_value );
}
/**
*/
public function toRow() {
return [
*/
public function toRow() {
return [
*/
public function equals( Restriction $other ) {
return $this->getHash() === $other->getHash();
}
/**
*/
public function equals( Restriction $other ) {
return $this->getHash() === $other->getHash();
}
/**
*/
public function getHash() {
return $this->getType() . '-' . $this->getValue();
*/
public function getHash() {
return $this->getType() . '-' . $this->getValue();
class NamespaceRestriction extends AbstractRestriction {
/**
class NamespaceRestriction extends AbstractRestriction {
/**
*/
const TYPE = 'ns';
/**
*/
const TYPE = 'ns';
/**
*/
const TYPE_ID = 2;
/**
*/
const TYPE_ID = 2;
/**
*/
public function matches( \Title $title ) {
return $this->getValue() === $title->getNamespace();
*/
public function matches( \Title $title ) {
return $this->getValue() === $title->getNamespace();
class PageRestriction extends AbstractRestriction {
/**
class PageRestriction extends AbstractRestriction {
/**
*/
const TYPE = 'page';
/**
*/
const TYPE = 'page';
/**
*/
public function matches( \Title $title ) {
if ( !$this->getTitle() ) {
*/
public function matches( \Title $title ) {
if ( !$this->getTitle() ) {
*/
public static function newFromRow( \stdClass $row ) {
$restriction = parent::newFromRow( $row );
*/
public static function newFromRow( \stdClass $row ) {
$restriction = parent::newFromRow( $row );
*
* Use whatever the relative field is as the standard HTML input.
*/
*
* Use whatever the relative field is as the standard HTML input.
*/
*/
protected function getOOUIModules() {
return array_merge(
*/
protected function getOOUIModules() {
return array_merge(
*/
public function getInputOOUI( $value ) {
return new ExpiryInputWidget(
*/
public function getInputOOUI( $value ) {
return new ExpiryInputWidget(
*/
public function loadDataFromRequest( $request ) {
return $this->relativeField->loadDataFromRequest( $request );
*/
public function loadDataFromRequest( $request ) {
return $this->relativeField->loadDataFromRequest( $request );
*/
public function getInputHTML( $value ) {
$this->selected = $value;
*/
public function getInputHTML( $value ) {
$this->selected = $value;
*/
public function getConfig( &$config ) {
$config['required'] = $this->required;
*/
public function getConfig( &$config ) {
$config['required'] = $this->required;
*/
protected function getClass() {
return NamespaceRestriction::class;
*/
protected function getClass() {
return NamespaceRestriction::class;
*/
protected function getClass() {
return PageRestriction::class;
*/
protected function getClass() {
return PageRestriction::class;
*/
class SpecialBlockTest extends SpecialPageTestBase {
/**
*/
class SpecialBlockTest extends SpecialPageTestBase {
/**
*/
protected function newSpecialPage() {
return new SpecialBlock();
*/
protected function newSpecialPage() {
return new SpecialBlock();