Classes

Coverage Distribution

Complexity

Insufficient Coverage

Class Coverage
MediaWiki\Rest\HeaderParser\HeaderParserBase0%
MediaWiki\Rest\RouteDefinitionException0%
MediaWiki\Rest\Module\Module0%
MediaWiki\Rest\Reporter\PHPErrorReporter0%
MediaWiki\Rest\LocalizedHttpException0%
MediaWiki\Rest\JsonEncodingException0%
MediaWiki\Rest\HttpException0%
MediaWiki\Rest\BasicAccess\StaticBasicAuthorizer0%
MediaWiki\Rest\Response0%
MediaWiki\Rest\ResponseException0%
MediaWiki\Rest\Handler\PageHistoryHandler0%
MediaWiki\Rest\Reporter\MWErrorReporter0%
MediaWiki\Rest\Handler\PageHistoryCountHandler0%
MediaWiki\Rest\SimpleHandler0%
MediaWiki\Rest\Stream0%
MediaWiki\Rest\Handler\ActionModuleBasedHandler0%
MediaWiki\Rest\Handler\CompareHandler0%
MediaWiki\Rest\Handler\EditHandler0%
MediaWiki\Rest\Validator\UnsupportedContentTypeBodyValidator0%
MediaWiki\Rest\RedirectException0%
MediaWiki\Rest\Validator\NullBodyValidator0%
MediaWiki\Rest\Handler\Helper\ParsoidFormatHelper0%
MediaWiki\Rest\Handler\TransformHandler39%
MediaWiki\Rest\Handler\ParsoidHandler39%
MediaWiki\Rest\EntryPoint44%
MediaWiki\Rest\RequestBase53%
MediaWiki\Rest\Handler\Helper\PageRestHelperFactory62%
MediaWiki\Rest\Validator\ParamValidatorCallbacks63%
MediaWiki\Rest\ResponseFactory65%
MediaWiki\Rest\Module\SpecBasedModule65%
MediaWiki\Rest\Handler\Helper\HtmlInputTransformHelper66%
MediaWiki\Rest\TokenAwareHandlerTrait66%
MediaWiki\Rest\Handler\Helper\HtmlMessageOutputHelper66%
MediaWiki\Rest\Handler\RevisionSourceHandler68%
MediaWiki\Rest\Handler\Helper\RestStatusTrait69%
MediaWiki\Rest\HeaderContainer70%
MediaWiki\Rest\Handler\Helper\HtmlOutputRendererHelper71%
MediaWiki\Rest\Handler\Helper\PageContentHelper71%
MediaWiki\Rest\Module\ExtraRoutesModule78%
MediaWiki\Rest\Handler\PageSourceHandler81%
MediaWiki\Rest\BasicAccess\BasicRequestAuthorizer85%
MediaWiki\Rest\Router86%
MediaWiki\Rest\Handler\RevisionHTMLHandler86%
MediaWiki\Rest\Handler\OpenSearchDescriptionHandler86%
MediaWiki\Rest\StringStream89%
MediaWiki\Rest\Handler\Helper\RevisionContentHelper89%
MediaWiki\Rest\Handler\PageHTMLHandler89%

Project Risks

Class CRAP
MediaWiki\Rest\Handler\PageHistoryCountHandler6480
MediaWiki\Rest\Handler\PageHistoryHandler4970
MediaWiki\Rest\Handler\ParsoidHandler3516
MediaWiki\Rest\Module\Module1406
MediaWiki\Rest\Handler\CompareHandler600
MediaWiki\Rest\Response552
MediaWiki\Rest\Handler\Helper\HtmlInputTransformHelper392
MediaWiki\Rest\Handler\Helper\HtmlOutputRendererHelper373
MediaWiki\Rest\Handler\EditHandler306
MediaWiki\Rest\Handler\Helper\ParsoidFormatHelper210
MediaWiki\Rest\Handler\ActionModuleBasedHandler156
MediaWiki\Rest\HeaderParser\HeaderParserBase132
MediaWiki\Rest\Handler\Helper\PageContentHelper115
MediaWiki\Rest\Handler\TransformHandler109
MediaWiki\Rest\ResponseFactory98
MediaWiki\Rest\RequestBase92
MediaWiki\Rest\Router81
MediaWiki\Rest\EntryPoint80
MediaWiki\Rest\Module\SpecBasedModule38
MediaWiki\Rest\Validator\ParamValidatorCallbacks36
MediaWiki\Rest\Handler\RevisionSourceHandler35
MediaWiki\Rest\HeaderContainer31
MediaWiki\Rest\StringStream30
MediaWiki\Rest\Handler\Helper\RevisionContentHelper27
MediaWiki\Rest\TokenAwareHandlerTrait27
MediaWiki\Rest\Handler\PageSourceHandler27
MediaWiki\Rest\Handler\PageHTMLHandler25
MediaWiki\Rest\Module\ExtraRoutesModule22
MediaWiki\Rest\Handler\Helper\PageRestHelperFactory22
MediaWiki\Rest\Handler\RevisionHTMLHandler22
MediaWiki\Rest\LocalizedHttpException20
MediaWiki\Rest\SimpleHandler20
MediaWiki\Rest\Handler\Helper\HtmlMessageOutputHelper15
MediaWiki\Rest\Handler\OpenSearchDescriptionHandler13
MediaWiki\Rest\BasicAccess\BasicRequestAuthorizer6
MediaWiki\Rest\Handler\Helper\RestStatusTrait5

Methods

Coverage Distribution

Complexity

Insufficient Coverage

Method Coverage
factory0%
getHeaderLine0%
getSupportedRequestTypes0%
assertDomainIsCorrect0%
getParsedBody0%
getRequestAttributes0%
acceptable0%
setProtocolVersion0%
getTransformEndpoint0%
getPageContentEndpoint0%
getRevisionContentEndpoint0%
getBody0%
parseHTML0%
pb2pb0%
getResponseBodySchemaFileName0%
updateRedLinks0%
getHeader0%
validatePb0%
needsWriteAccess0%
generateResponseSpec0%
getResponseBodySchemaFileName0%
hasHeader0%
getHeaders0%
getTargetFormat0%
getResponseBodySchemaFileName0%
getProtocolVersion0%
needsWriteAccess0%
__construct0%
needsWriteAccess0%
getParamSettings0%
getParamSettings0%
getCachedCount0%
getAnonCount0%
getTempCount0%
getBotCount0%
getEditorsCount0%
getRevertedCount0%
getMinorCount0%
getEditsCount0%
getRevisionOrThrow0%
orderRevisions0%
needsWriteAccess0%
getResponseBodySchemaFileName0%
__construct0%
setHeader0%
getRedirectHelper0%
getPage0%
run0%
getDbResults0%
getBitmask0%
processDbResults0%
needsWriteAccess0%
getParamSettings0%
getETag0%
getLastModified0%
hasRepresentation0%
getResponseBodySchemaFileName0%
getResponseBodySchemaFileName0%
needsWriteAccess0%
loggingTableTime0%
getConfigHash0%
getHandlerForPath0%
getRouter0%
throwNoMatch0%
execute0%
recordMetrics0%
instantiateHandlerObject0%
executeHandler0%
setCors0%
setStats0%
loadJsonFile0%
getOpenApiInfo0%
getModuleDescription0%
getRouteFileTimestamp0%
__construct0%
getDefinedPaths0%
newFromCache0%
getCacheData0%
__construct0%
getTarget0%
reportError0%
__construct0%
reportError0%
initHeaders0%
__clone0%
setParsedBody0%
getHeader0%
getPathPrefix0%
getBodyType0%
checkPreconditions0%
assertEnd0%
getRequestAttributes0%
setStatus0%
getReasonPhrase0%
getResponseBodySchemaFileName0%
resetHeaders0%
getHeader0%
getHeaderLine0%
setInput0%
consumeString0%
skipWhitespace0%
error0%
consumeFixedDigits0%
getStatusCode0%
getOpenApiInfo0%
cast0%
getLastError0%
__construct0%
__construct0%
getErrorData0%
__construct0%
__construct0%
getMessageValue0%
getErrorKey0%
getPostParams0%
getDefinedPaths0%
getUploadedFiles0%
getParsedBody0%
getEtag0%
getLastModifiedTimes0%
mapActionModuleResponse0%
getSectionInfo0%
needsWriteAccess0%
getResponseBodySchemaFileName0%
getParamSettings0%
__construct0%
getResponseBodySchemaFileName0%
getResponseBodySchemaFileName0%
__construct0%
needsWriteAccess0%
validate0%
mapActionModuleResult0%
throwHttpExceptionForActionModuleError0%
getParamSettings0%
getRevisionText0%
useHighLimits0%
init0%
recordCondition0%
setMetrics0%
getUploadedFile0%
hasUpload0%
hasParam0%
validateBody0%
throwHttpExceptionForStatus0%
getMetadata0%
init0%
getLastModified0%
getJsonDiff0%
getRole0%
getLastModified0%
validateBody0%
authorize0%
setVarnishETagHack0%
getTokenParamDefinition0%
createRouter0%
getMainRequest0%
logStatusError0%
getRouteFiles0%
getParameterTypeSchemas0%
getModule0%
urlEncodeTitle0%
getResponseBodySchema0%
getResponseBodySchemaFileName0%
getHookContainer0%
isAccessible0%
getHookRunner0%
requireSafeAgainstCsrf0%
getUser0%
setApiMain0%
getApiMain0%
overrideActionModule0%
execute0%
mapActionModuleResponse0%
throwHttpExceptionForActionModuleError0%
__construct0%
execute0%
getRevision0%
getRevisionOrThrow0%
getParamSettings0%
setVariantConversionLanguage0%
putHeaders0%
addHeader0%
getContentType0%
setContentType0%
parseContentTypeHeader0%
getRawHeaderLines0%
needsWriteAccess0%
getResponseBodySchemaFileName0%
setBody0%
needsWriteAccess0%
getResponseBodySchemaFileName0%
removeHeader0%
needsWriteAccess0%
getResponseBodySchemaFileName0%
getResponseBodySchemaFileName0%
detach0%
generateResponseSpec0%
needsWriteAccess0%
generateResponseSpec0%
getResponseBodySchemaFileName0%
__construct0%
getRedirectHelper0%
normalizeType0%
validateParameterCombination0%
run0%
getCount0%
getCurrentRevision0%
getPage0%
newPageRedirectHelper0%
setCookie0%
getCookies0%
getModuleForPath0%
setOutputProfileVersion0%
close0%
init0%
copyToStream0%
__construct0%
getParamSettings0%
execute0%
getRestbaseCompatErrorData0%
newPageContentHelper0%
isParsoidContent0%
constructRestbaseCompatibleMetadata0%
getResponseComponents0%
newRevisionContentHelper0%
__construct0%
getResponse0%
setShowExceptionDetails0%
hasHeader0%
__construct0%
getHtmlOutputContentLanguage23%
getRevisionRecordForMetadata25%
isAccessible28%
getRouteFileTimestamps40%
pageConfigToPageIdentity44%
getModuleDefinition45%
getContentType45%
wtLint53%
tryToCreatePageIdentity55%
doExecute58%
getContent60%
setContentSource60%
parseUncacheable63%
getToken66%
getHeaderLine66%
__construct66%
getHeaders66%
getAcceptedTargetLanguage66%
getOutputMode66%
newHtmlMessageOutputHelper66%
weakCompare66%
getValidatedParams66%
getParserOutputInternal67%
doSetup68%
execute69%
getHtml69%
getFormattedMessage71%
getContent72%
execute72%
normalizeParameters72%
fetchParserOutputFromParsoid73%
setCacheControl75%
getDefaultPageLanguage75%
run76%
initInternal77%
checkHasContent77%
createFromException77%
wt2html78%
setOriginal78%
buildModuleMap78%
run78%
languageConversion79%
execute80%
consumeMonth80%
consumeDayName80%
setFlavor80%
putHeaders80%
authorize80%
encodeJson80%
newHtmlOutputRendererHelper80%
run80%
findVariantPage83%
execute83%
setRevision83%
getLastModified83%
getVariantRedirectTargetUrl83%
getActionModuleParameters84%
constructHtmlUrl85%
createNormalizationRedirectResponseIfNeeded85%
constructHtmlUrl85%
run85%
read85%
getActionModuleParameters86%
formatMessage87%
html2wt87%
initRoutes87%
tryToCreatePageConfig87%
createVariantRedirectResponseIfNeeded88%
hasBody88%
getRoutesFromFiles88%
addRoute88%
fetchSelserContextFromStash89%
getModule89%

Project Risks

Method CRAP
processDbResults756
getRequestAttributes462
getCount342
run272
acceptable272
getDbResults156
pb2pb90
validateParameterCombination72
getHandlerForPath56
throwHttpExceptionForActionModuleError56
getContentType56
orderRevisions42
getParsedBody42
assertDomainIsCorrect42
run42
parseContentTypeHeader42
getParserOutputInternal38
throwNoMatch30
execute30
getRevertedCount30
execute30
mapActionModuleResult30
wt2html30
getRevisionText30
setOriginal28
initInternal24
normalizeParameters21
getCurrentRevision20
getCachedCount20
execute20
getRouteFiles20
recordMetrics20
executeHandler20
getResponseBodySchemaFileName20
getResponseBodySchemaFileName20
execute19
fetchParserOutputFromParsoid13
getDefinedPaths12
getLastModifiedTimes12
getTempCount12
consumeString12
getDefinedPaths12
consumeFixedDigits12
getBitmask12
loadJsonFile12
cast12
getSectionInfo12
execute12
getUploadedFile12
constructRestbaseCompatibleMetadata12
getRevisionOrThrow12
setOutputProfileVersion12
getModuleDefinition11
buildModuleMap10
isAccessible9
getContentType9
getHtml8
parseUncacheable7
createFromException7
getActionModuleParameters7
tryToCreatePageConfig7
getHtmlOutputContentLanguage7
getModule7
getContent6
execute6
getActionModuleParameters6
__construct6
getApiMain6
hasUpload6
mapActionModuleResponse6
getRevisionContentEndpoint6
getPageContentEndpoint6
validatePb6
getRevision6
getResponseBodySchema6
generateResponseSpec6
getHeaderLine6
getHeader6
getRequestAttributes6
getJsonDiff6
getMainRequest6
assertEnd6
__clone6
setMetrics6
getLastModified6
getRouteFileTimestamp6
getConfigHash6
getModuleDescription6
resetHeaders6
hasHeader6
generateResponseSpec6
getBodyType6
__construct6
getPage6
getLastModified6
loggingTableTime6
getAnonCount6
setStatus6
getBotCount6
getMinorCount6
getRevisionOrThrow6
getHeader6
throwHttpExceptionForStatus6
getETag6
getPage6
execute5
checkHasContent5
run5
authorize5
putHeaders5
doExecute5
run5
hasBody5
fetchSelserContextFromStash5
getRouteFileTimestamps4
getFormattedMessage4
getContent4
run4
languageConversion4
run4
newHtmlOutputRendererHelper4
setRevision4
read4
addRoute4
wtLint3
tryToCreatePageIdentity3
getRevisionRecordForMetadata3
getToken3
weakCompare3
setCacheControl3
setFlavor3
getVariantRedirectTargetUrl3
execute3
getLastModified3
createNormalizationRedirectResponseIfNeeded3
formatMessage3
initRoutes3
html2wt3
createVariantRedirectResponseIfNeeded3
getRoutesFromFiles3
pageConfigToPageIdentity2
setContentSource2
getHeaders2
getValidatedParams2
__construct2
getHeaderLine2
getAcceptedTargetLanguage2
newHtmlMessageOutputHelper2
getOutputMode2
doSetup2
getDefaultPageLanguage2
encodeJson2
consumeMonth2
consumeDayName2
findVariantPage2
constructHtmlUrl2
constructHtmlUrl2