Classes

Coverage Distribution

Complexity

Insufficient Coverage

Class Coverage
MediaWiki\Rest\BasicAccess\StaticBasicAuthorizer0%
MediaWiki\Rest\HttpException0%
MediaWiki\Rest\Validator\UnsupportedContentTypeBodyValidator0%
MediaWiki\Rest\Validator\NullBodyValidator0%
MediaWiki\Rest\Stream0%
MediaWiki\Rest\SimpleHandler0%
MediaWiki\Rest\RouteDefinitionException0%
MediaWiki\Rest\ResponseException0%
MediaWiki\Rest\Response0%
MediaWiki\Rest\Reporter\PHPErrorReporter0%
MediaWiki\Rest\Reporter\MWErrorReporter0%
MediaWiki\Rest\RedirectException0%
MediaWiki\Rest\LocalizedHttpException0%
MediaWiki\Rest\JsonEncodingException0%
MediaWiki\Rest\HeaderParser\HeaderParserBase0%
MediaWiki\Rest\Handler\EditHandler0%
MediaWiki\Rest\Handler0%
MediaWiki\Rest\Handler\PageHistoryHandler0%
MediaWiki\Rest\Handler\PageHistoryCountHandler0%
MediaWiki\Rest\Handler\Helper\ParsoidFormatHelper0%
MediaWiki\Rest\Handler\ActionModuleBasedHandler0%
MediaWiki\Rest\Handler\CompareHandler0%
MediaWiki\Rest\Handler\ParsoidHandler39%
MediaWiki\Rest\Handler\Helper\PageRestHelperFactory44%
MediaWiki\Rest\Handler\Helper\RevisionContentHelper45%
MediaWiki\Rest\EntryPoint47%
MediaWiki\Rest\Handler\TransformHandler48%
MediaWiki\Rest\RequestBase53%
MediaWiki\Rest\Validator\ParamValidatorCallbacks54%
MediaWiki\Rest\ResponseFactory59%
MediaWiki\Rest\TokenAwareHandlerTrait66%
MediaWiki\Rest\Handler\Helper\HtmlInputTransformHelper69%
MediaWiki\Rest\HeaderContainer70%
MediaWiki\Rest\Handler\Helper\RestStatusTrait72%
MediaWiki\Rest\Handler\Helper\HtmlMessageOutputHelper76%
MediaWiki\Rest\Handler\Helper\HtmlOutputRendererHelper79%
MediaWiki\Rest\Handler\Helper\PageContentHelper85%
MediaWiki\Rest\Handler\RevisionSourceHandler87%
MediaWiki\Rest\StringStream89%

Methods

Coverage Distribution

Complexity

Insufficient Coverage

Method Coverage
__construct0%
checkPreconditions0%
acceptable0%
getTransformEndpoint0%
getPageContentEndpoint0%
getRevisionContentEndpoint0%
parseHTML0%
pb2pb0%
updateRedLinks0%
validatePb0%
needsWriteAccess0%
getResponseBodySchema0%
needsWriteAccess0%
getParamSettings0%
getRequestAttributes0%
getParsedBody0%
resetHeaders0%
getHeader0%
getHeaderLine0%
setInput0%
consumeString0%
skipWhitespace0%
error0%
consumeFixedDigits0%
assertEnd0%
getLastError0%
__construct0%
getErrorData0%
getRequestAttributes0%
assertDomainIsCorrect0%
__construct0%
needsWriteAccess0%
getLastModifiedTimes0%
loggingTableTime0%
getEtag0%
getCachedCount0%
getAnonCount0%
getBotCount0%
getEditorsCount0%
getRevertedCount0%
authorize0%
getEditsCount0%
getRevisionOrThrow0%
orderRevisions0%
getParamSettings0%
factory0%
__construct0%
getRedirectHelper0%
getPage0%
run0%
getDbResults0%
getBitmask0%
processDbResults0%
needsWriteAccess0%
getParamSettings0%
getETag0%
getLastModified0%
hasRepresentation0%
needsWriteAccess0%
__construct0%
getMessageValue0%
getPage0%
copyToStream0%
getRawHeaderLines0%
setCookie0%
getCookies0%
__construct0%
getResponse0%
setShowExceptionDetails0%
getResponseComponents0%
__construct0%
setCors0%
setStats0%
execute0%
__construct0%
close0%
removeHeader0%
detach0%
getMetadata0%
validateBody0%
hasParam0%
hasUpload0%
getUploadedFile0%
recordCondition0%
useHighLimits0%
__construct0%
validateBody0%
getParameterTypeSchemas0%
logStatusError0%
getTokenParamDefinition0%
setBody0%
addHeader0%
getErrorKey0%
setParsedBody0%
newFromCache0%
getCacheData0%
__construct0%
getTarget0%
reportError0%
__construct0%
reportError0%
initHeaders0%
__clone0%
getHeader0%
hasHeader0%
getParsedBody0%
getBodyType0%
setHeader0%
getUploadedFiles0%
getPostParams0%
__construct0%
getStatusCode0%
getReasonPhrase0%
setStatus0%
getProtocolVersion0%
getHeaders0%
hasHeader0%
getHeader0%
getHeaderLine0%
getBody0%
setProtocolVersion0%
getLastModified0%
getMinorCount0%
getCurrentRevision0%
mapActionModuleResponse0%
getLastModified0%
getETag0%
hasRepresentation0%
needsReadAccess0%
needsWriteAccess0%
requireSafeAgainstCsrf0%
postInitSetup0%
postValidationSetup0%
getUser0%
setApiMain0%
getApiMain0%
overrideActionModule0%
execute0%
throwHttpExceptionForActionModuleError0%
getHookContainer0%
makeMessageValue0%
__construct0%
execute0%
getRevision0%
getRevisionOrThrow0%
isAccessible0%
getRole0%
getRevisionText0%
getJsonDiff0%
getSectionInfo0%
getCount0%
getParamSettings0%
__construct0%
getHookRunner0%
parseBodyData0%
mapActionModuleResult0%
getSession0%
setVarnishETagHack0%
createRouter0%
getMainRequest0%
getRouteFiles0%
init0%
getPath0%
getRouter0%
getRouteUrl0%
urlEncodeTitle0%
getRequest0%
getAuthority0%
getConfig0%
getResponseFactory0%
validate0%
getValidatedBody0%
detectExtraneousBodyFields0%
checkSession0%
getConditionalHeaderUtil0%
checkPreconditions0%
applyConditionalResponseHeaders0%
applyCacheControl0%
getParamSettings0%
getOpenApiSpec0%
getRequestSpec0%
getResponseBodySchema0%
getResponseSpec0%
getBodyValidator0%
getValidatedParams0%
needsWriteAccess0%
needsWriteAccess0%
throwHttpExceptionForActionModuleError0%
getLastModified0%
newPageContentHelper0%
newHtmlInputTransformHelper0%
newPageRedirectHelper0%
getParamSettings0%
getContentType0%
setContentType0%
setOutputProfileVersion0%
parseContentTypeHeader0%
getResponseBodySchema0%
newRevisionContentHelper0%
putHeaders0%
setVariantConversionLanguage0%
getParamSettings0%
needsWriteAccess0%
throwHttpExceptionForStatus0%
setMetrics0%
getParamSettings0%
mapActionModuleResponse0%
needsWriteAccess0%
run0%
validateParameterCombination0%
normalizeType0%
getRedirectHelper0%
__construct0%
needsWriteAccess0%
needsWriteAccess0%
getHtmlOutputContentLanguage23%
isAccessible28%
getRouteFileTimestamps40%
wtLint42%
pageConfigToPageIdentity44%
getStatusErrorKeys55%
createFromException58%
setContentSource60%
fetchCacheData60%
getContent60%
weakCompare66%
instantiateHandlerObject66%
getToken66%
getHeaderLine66%
getHeaders66%
getAcceptedTargetLanguage66%
stripParsoidSectionTags70%
tryToCreatePageIdentity71%
execute72%
wt2html72%
getHtml73%
doSetup74%
setCacheControl75%
constructMetadata75%
getDefaultPageLanguage75%
checkHasContent77%
run78%
languageConversion79%
execute80%
encodeJson80%
putHeaders80%
consumeDayName80%
normalizeParameters80%
consumeMonth80%
setFlavor80%
run80%
setOriginal81%
execute83%
getLastModified83%
getVariantRedirectTargetUrl83%
setRevision83%
findVariantPage83%
getActionModuleParameters84%
init84%
getMatchers85%
read85%
createNormalizationRedirectResponseIfNeeded85%
getContent86%
getActionModuleParameters86%
fetchSelserContextFromStash86%
html2wt87%
formatMessage87%
createVariantRedirectResponseIfNeeded88%

Project Risks

Method CRAP
processDbResults756
getRequestAttributes462
getCount306
acceptable272
run272
getDbResults156
pb2pb90
parseBodyData90
validateParameterCombination72
getContentType56
throwHttpExceptionForActionModuleError56
orderRevisions42
assertDomainIsCorrect42
applyCacheControl42
getParsedBody42
run42
parseContentTypeHeader42
wt2html40
getRevertedCount30
mapActionModuleResult30
getRevisionText30
execute30
getRequestSpec30
getOpenApiSpec30
setOriginal27
init21
execute20
getRouteFiles20
checkSession20
getCurrentRevision20
getCachedCount20
execute19
normalizeParameters18
consumeString12
applyConditionalResponseHeaders12
consumeFixedDigits12
getUploadedFile12
setOutputProfileVersion12
getBitmask12
validate12
getSectionInfo12
getLastModifiedTimes12
execute12
getRevisionOrThrow12
createFromException10
isAccessible9
getMatchers9
getHtml7
getStatusErrorKeys7
getActionModuleParameters7
getHtmlOutputContentLanguage7
getContent6
execute6
getActionModuleParameters6
validatePb6
__clone6
getRevisionContentEndpoint6
getPageContentEndpoint6
getRequestAttributes6
getPage6
getETag6
resetHeaders6
getHeader6
getHeaderLine6
getLastModified6
getRevisionOrThrow6
hasHeader6
getMinorCount6
getHeader6
getPage6
getBotCount6
getAnonCount6
detectExtraneousBodyFields6
getConditionalHeaderUtil6
checkPreconditions6
getResponseSpec6
getValidatedParams6
getApiMain6
getRevision6
getJsonDiff6
mapActionModuleResponse6
setMetrics6
throwHttpExceptionForStatus6
hasUpload6
assertEnd6
__construct6
loggingTableTime6
getLastModified6
getMainRequest6
getBodyType6
setStatus6
checkHasContent5
run5
putHeaders5
fetchSelserContextFromStash5
getRouteFileTimestamps4
wtLint4
instantiateHandlerObject4
stripParsoidSectionTags4
languageConversion4
run4
setRevision4
read4
getContent4
fetchCacheData3
weakCompare3
getToken3
tryToCreatePageIdentity3
setCacheControl3
setFlavor3
getLastModified3
execute3
getVariantRedirectTargetUrl3
createNormalizationRedirectResponseIfNeeded3
html2wt3
formatMessage3
createVariantRedirectResponseIfNeeded3
pageConfigToPageIdentity2
setContentSource2
getHeaderLine2
getHeaders2
getAcceptedTargetLanguage2
doSetup2
constructMetadata2
getDefaultPageLanguage2
encodeJson2
consumeDayName2
consumeMonth2
findVariantPage2