Showing 1,432 of 2,096 total issues
Function ae93
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__("d039");
Method doQuery
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function doQuery( array $params, ApiPageSet $resultPageSet = null ): ?IResultWrapper {
if ( !$params['entities'] ) {
return null;
}
Method getPageHeader
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getPageHeader() {
$excludeNamespaces = array_diff(
$this->namespaceInfo->getValidNamespaces(),
$this->namespaceChecker->getWikibaseNamespaces()
);
Method formatEntityUsage
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function formatEntityUsage( array $usages, IContextSource $context ): array {
$usageAspectsByEntity = [];
$entityIds = [];
foreach ( $usages as $entityUsage ) {
Method getPagesUsing
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function getPagesUsing( array $entityIds, array $aspects = [] ): Traversable {
if ( !$this->aspectsMatchImplicitUsage( $aspects ) ) {
// Caller is not interested in implicit usage,
// no need to add anything
return yield from $this->usageLookup->getPagesUsing( $entityIds, $aspects );
Method attemptSave
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function attemptSave(
Title $title,
EntityContent $content,
string $summary,
int $undidRevId,
Method getAllowedParams
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getAllowedParams(): array {
return array_merge(
[
'claim' => [
ParamValidator::PARAM_TYPE => 'string',
Method execute
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute(): void {
$params = $this->extractRequestParams();
$result = $this->getResult();
$context = $params['context'];
Method getAllowedParams
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected function getAllowedParams(): array {
return array_merge( [
'fromid' => [
ParamValidator::PARAM_TYPE => 'string',
ParamValidator::PARAM_REQUIRED => true,
Method rdfSerialize
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function rdfSerialize(
EntityRevision $entityRevision,
?RedirectRevision $followedRedirect,
array $incomingRedirects,
RdfBuilder $rdfBuilder,
Method convertUnit
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function convertUnit( $unit, $convertUnits, $coherentUnits, $unitUsage, &$reconvert ) {
$unit['unit'] = substr( $unit['unit'], $this->baseLen );
$unit['siUnit'] = substr( $unit['siUnit'], $this->baseLen );
if ( isset( $convertUnits[$unit['unit']] ) ) {
Method processStatements
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function processStatements( $values, $map ) {
$shortValues = array_map( function ( $str ) {
return 'wdv:' . $str;
}, $values );
$valuesStr = implode( ' ', $shortValues );
Method execute
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute( PatchPropertyRequest $request ): PatchPropertyResponse {
$deserializedRequest = $this->validator->validateAndDeserialize( $request );
$propertyId = $deserializedRequest->getPropertyId();
$providedMetadata = $deserializedRequest->getEditMetadata();
Method handleDescriptionsValidationError
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private function handleDescriptionsValidationError( ValidationError $validationError ): void {
$context = $validationError->getContext();
switch ( $validationError->getCode() ) {
case DescriptionsSyntaxValidator::CODE_DESCRIPTIONS_NOT_ASSOCIATIVE:
throw UseCaseError::newPatchResultInvalidValue(
Method execute
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute( PatchStatementRequest $request ): PatchStatementResponse {
$deserializedRequest = $this->useCaseValidator->validateAndDeserialize( $request );
$statementId = $deserializedRequest->getStatementId();
$editMetadata = $deserializedRequest->getEditMetadata();
Method execute
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public function execute() {
$stripProtocols = (bool)$this->getOption( 'strip-protocols', false );
$forceProtocol = $this->getOption( 'force-protocol', null );
$url = $this->getOption( 'load-from', 'https://meta.wikimedia.org/w/api.php' );
$scriptPath = $this->getOption( 'script-path', '/w/$1' );
Function attachCopyrightTooltip
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function attachCopyrightTooltip( $entityview, viewName ) {
var startEditingEvents = [
'entitytermsviewafterstartediting',
'sitelinkgroupviewafterstartediting',
'statementviewafterstartediting'
Function value
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
value: function ( value ) {
if ( value !== undefined ) {
return this.option( 'value', value );
}
Function stopEditing
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SELF.prototype.stopEditing = function ( dropValue ) {
if ( !dropValue && !this._viewHasSavableValue() ) {
return;
}
Function _createHelperTag
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_createHelperTag: function () {
var $tag = this.createTag( '', '', true ),
input = $tag.find( 'input' );
// Add placeholder and auto-expand afterwards: