Showing 11,545 of 11,545 total issues
Function appendUserGroups
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
protected function appendUserGroups( $property, $numberInGroup ) {
$config = $this->getConfig();
$data = [];
$result = $this->getResult();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function showRevision
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
private function showRevision( $timestamp ) {
if ( !preg_match( '/[0-9]{14}/', $timestamp ) ) {
return;
}
$out = $this->getOutput();
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getHeadLinksArray
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function getHeadLinksArray() {
$tags = [];
$config = $this->getConfig();
if ( $this->cspOutputMode === self::CSP_META ) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function pop
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function pop( $qtype = self::TYPE_DEFAULT, $flags = 0, array $ignored = [] ) {
$job = false;
if ( !$this->localJobClasses ) {
throw new JobQueueError(
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function processSetting
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
private function processSetting( $thisSetting, $wiki, $tags ) {
// Optimization: Avoid native type hint on private method called by hot getAll()
// <https://gerrit.wikimedia.org/r/c/mediawiki/core/+/820244>
$retval = null;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function moveIllegalPage
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
protected function moveIllegalPage( $row ) {
$legalChars = Title::legalChars();
$legalizedUnprefixed = preg_replace_callback( "/([^$legalChars])/",
[ $this, 'hexChar' ],
$row->page_title );
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function execute
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
$dbr = $this->getReplicaDB();
$dbw = $this->getPrimaryDB();
$dryRun = true;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function execute
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
# Options processing
$username = $this->getOption( 'u', false );
$reason = $this->getOption( 'r', '' );
$interval = $this->getOption( 'i', 0 );
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function execute
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public function execute() {
$force = $this->getOption( 'force' );
$startFrom = $this->getOption( 'start-from' );
// We need the namespace index instead of the name to perform the query
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function removeRules
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
def removeRules(path, table):
fp = open(path, 'r', encoding='U8')
texc = list()
for line in fp:
elems = line.split('=>')
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function useButtonGroupKeyboardNav
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
function useButtonGroupKeyboardNav(buttonsProp) {
const rootElement = ref();
const focusedButtonIndex = ref();
const buttonRefs = ref(/* @__PURE__ */ new Map());
const currentDirection = useComputedDirection(rootElement);
Function setup
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
setup(props, { emit, attrs }) {
const idAttribute = attrs.id;
const {
computedDisabled,
computedStatus,
Function computePosition$1
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
const computePosition$1 = (reference, floating, config) => __async(void 0, null, function* () {
const {
placement = "bottom",
strategy = "absolute",
middleware = [],
Function useFloatingMenu
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
function useFloatingMenu(referenceElement, menu, opt) {
var _a;
const menuIsExpanded = () => {
var _a2;
return (_a2 = menu.value) == null ? void 0 : _a2.isExpanded();
Function deepEqual
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
return (function deepEqual(obj1, obj2, path1, path2) {
var type1 = typeof obj1;
var type2 = typeof obj2;
// == null also matches undefined
Function send
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
send: function( headers, complete ) {
var i,
xhr = options.xhr();
xhr.open(
Function deflate_slow
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
const deflate_slow = (s, flush) => {
let hash_head; /* head of hash chain */
let bflush; /* set if current block must be flushed */
Method updateSourcePage
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
private function updateSourcePage( $status, $performer, $reason ): void {
$deleteSource = false;
$legacySourceTitle = $this->titleFactory->newFromPageIdentity( $this->source );
$legacyDestTitle = $this->titleFactory->newFromPageIdentity( $this->dest );
$sourceModel = $legacySourceTitle->getContentModel();
Method checkCache
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
public function checkCache( PageIdentity $page, Content $content, UserIdentity $user ) {
$legacyUser = $this->userFactory->newFromUserIdentity( $user );
if (
// The context is not an HTTP POST request
!$legacyUser->getRequest()->wasPosted() ||
Method getSidebar
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected function getSidebar( $options = [] ) {
// Force the rendering of the following portals
$sidebar = $this->data['sidebar'];
if ( !isset( $sidebar['SEARCH'] ) ) {
// @phan-suppress-next-line PhanTypeMismatchDimAssignment False positive