Showing 1,432 of 2,096 total issues
Method getSiteLinkAddRemoveParams
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function getSiteLinkAddRemoveParams( DiffOp $diffOp, $action, $siteId, Title $title = null ) {
$params = [];
if ( in_array( $action, [ 'remove', 'restore' ] ) ) {
// Messages: wikibase-comment-remove, wikibase-comment-restore
Function commit
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Store.prototype.commit = function commit (_type, _payload, _options) {
var this$1$1 = this;
// check object-style commit
var ref = unifyObjectStyle(_type, _payload, _options);
Method getRecentChangeId
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getRecentChangeId( RecentChange $change ) {
$attribs = $change->getAttributes();
//XXX: need to check master?
$db = $this->connectionManager->getReadConnection();
Function ddb0
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("da84");
var DOMIterables = __webpack_require__("fdbc");
var ArrayIteratorMethods = __webpack_require__("e260");
Function main
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function main() {
const client = new ApolloClient( {
uri: 'https://api.github.com/graphql',
request: ( operation ) => {
operation.setContext( {
Function buildSizeDeltaAnnotation
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildSizeDeltaAnnotation( revision ) {
if ( revision[ CUSTOM_FIELDS.PREVIOUS_SIZE ] === null || revision[ FIELDS.SIZE ] === null ) {
// inception & removal may be a notable but not with respect to size
return null;
}
Method newRendererFromParser
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function newRendererFromParser(
Parser $parser,
string $type = DataAccessSnakFormatterFactory::TYPE_ESCAPED_PLAINTEXT
): StatementGroupRenderer {
$usageAccumulator = $this->usageAccumulatorFactory->newFromParser( $parser );
Method getSecondaryLinks
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getSecondaryLinks() {
$ret = [];
if ( $this->getBundleCount( true, [ $this, 'callbackForBundleCount' ] ) === 1 ) {
$ret[] = $this->getAgentLink();
Method fetchIds
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function fetchIds( $limit ) {
Assert::parameter( is_int( $limit ) && $limit > 0, '$limit', '$limit must be a positive integer' );
$dbr = $this->db->connections()->getReadConnection();
$queryBuilder = $dbr->newSelectQueryBuilder();
Method execute
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute( $subPage ) {
parent::execute( $subPage );
$this->checkPermissions();
$this->checkBlocked();
Method applyChangeOp
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function applyChangeOp( ChangeOp $changeOp, EntityDocument $entity, Summary $summary = null ): ChangeOpResult {
try {
// NOTE: Always validate modification against the current revision, if it exists!
// Otherwise, we may miss e.g. a combination of language/label/description
// that was already taken.
Method getAllowedParams
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getAllowedParams(): array {
return [
'generate' => [
ParamValidator::PARAM_TYPE => [
SnakFormatter::FORMAT_PLAIN,
Method getAllowedParams
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getAllowedParams(): array {
return [
'search' => [
ParamValidator::PARAM_TYPE => 'string',
ParamValidator::PARAM_REQUIRED => true,
Method onPageHistoryLineEnding
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public static function onPageHistoryLineEnding( HistoryPager $history, $row, &$html, array $classes ) {
// Note: This assumes that HistoryPager::getTitle returns a Title.
$entityContentFactory = WikibaseRepo::getEntityContentFactory();
$services = MediaWikiServices::getInstance();
Method httpContentNegotiation
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function httpContentNegotiation( WebRequest $request, OutputPage $output, EntityId $id, $revision = 0 ) {
$headers = $request->getAllHeaders();
if ( isset( $headers['ACCEPT'] ) ) {
$parser = new HttpAcceptParser();
$accept = $parser->parseWeights( $headers['ACCEPT'] );
Method cleanupGregorianValue
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function cleanupGregorianValue( $dateValue, $precision ) {
try {
[ $minus, $y, $m, $d, $time ] = $this->parseDateValue( $dateValue );
} catch ( IllegalValueException $e ) {
return null;
Method newEditEntity
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function newEditEntity(
IContextSource $context,
EntityId $entityId = null,
int $baseRevId = 0,
$allowMasterConnection = true
Method execute
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
if ( !WikibaseSettings::isRepoEnabled() ) {
$this->fatalError( "You need to have Wikibase enabled in order to use this maintenance script!\n" );
}
if ( !in_array( Property::ENTITY_TYPE, WikibaseRepo::getLocalEntitySource()->getEntityTypes() ) ) {
Method execute
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute( PatchSitelinksRequest $request ): PatchSitelinksResponse {
$deserializedRequest = $this->useCaseValidator->validateAndDeserialize( $request );
$itemId = $deserializedRequest->getItemId();
$this->assertItemExists->execute( $itemId );
Method newItemView
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function newItemView(
Language $language,
TermLanguageFallbackChain $termFallbackChain,
CacheableEntityTermsView $entityTermsView
) {