Showing 1,386 of 1,391 total issues
Function get_template_blocks
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static function get_template_blocks( $location, $reusable ) {
$blocks = array();
// Email and password are added in different locations depending on the form.
- 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 get_current_tab
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function get_current_tab( $return = 'data' ) {
global $wp;
// Set default tab.
- 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 get_tabs_for_nav
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function get_tabs_for_nav() {
$tabs = array();
foreach ( self::get_tabs() as $var => $data ) {
- 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 get_order_data
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static function get_order_data( $order ) {
$data = array();
$props = self::get_order_data_props( 'export' );
- 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 prepare_options_from_preset
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function prepare_options_from_preset() {
$preset_id = $this->settings['options_preset'];
switch ( $preset_id ) {
case 'countries':
- 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 can_process
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static function can_process( $type, $user_id, $template_id, $related_id = '', $engagement_id = null ) {
/**
* Skip engagement processing checks and force engagements to process.
*
- 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 get_field_blocks
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function get_field_blocks( $blocks ) {
$fields = array();
foreach ( $blocks as $block ) {
- 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 register_post_type
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function register_post_type( $name, $data ) {
if ( ! post_type_exists( $name ) ) {
$unprefixed_name = str_replace( 'llms_', '', $name );
- 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 handle_email
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function handle_email( $args ) {
$can_process = self::can_process( 'email', ...$args );
if ( true !== $can_process ) {
return $can_process;
- 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 set_merge_data
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function set_merge_data( $code ) {
switch ( $code ) {
case '{{DASHBOARD_URL}}':
- 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 llms_agree_to_terms_form_field
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function llms_agree_to_terms_form_field( $echo = true ) {
// Because `do_action()` passes empty string.
if ( '' === $echo ) {
$echo = 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 memberships
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static function memberships( $atts ) {
// Enqueue match height so the loop isn't all messed up visually.
self::enqueue_script( 'llms-jquery-matchheight' );
- 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 llms_is_post_restricted_by_drip_settings
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function llms_is_post_restricted_by_drip_settings( $post_id, $user_id = null ) {
$post_type = get_post_type( $post_id );
switch ( $post_type ) {
- 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 llms_privacy_policy_form_field
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function llms_privacy_policy_form_field( $echo = true ) {
// Because `do_action()` passes empty string.
if ( '' === $echo ) {
$echo = 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 llms_get_callable_name
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function llms_get_callable_name( $callable ) {
// Function name or static class -> method: 'function' or 'class::method'.
if ( is_string( $callable ) ) {
return $callable;
- 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 get_output
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
protected function get_output() {
$this->enqueue_script( 'llms-jquery-matchheight' );
ob_start();
- 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 unset_relationships
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private function unset_relationships( $post, $data ) {
$relationships = $this->get_related_posts( $post->ID, $data['post_type'], $data['meta_key'] );
foreach ( $relationships as $id ) {
- 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 llms_is_post_restricted_by_time_period
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function llms_is_post_restricted_by_time_period( $post_id, $user_id = null ) {
$post_type = get_post_type( $post_id );
switch ( $post_type ) {
- 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 migrate_award_templates
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function migrate_award_templates() {
$per_page = llms_update_util_get_items_per_page();
$query = new \WP_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 action_callback
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public function action_callback( $order_id = null, $type = null ) {
// Make sure order_id and type have been provided.
if ( ! $order_id || ! $type ) {
return false;
- 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"