gocodebox/lifterlms

View on GitHub

Showing 309 of 1,394 total issues

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        } else if ( ! semver.valid( version ) ) {
            logResult( `The supplied version string ${ chalk.bold( version ) } is invalid.`, 'error' );
            process.exit( 1 );
        }
Severity: Major
Found in packages/dev/src/cmds/changelog/write.js and 2 other locations - About 55 mins to fix
packages/dev/src/cmds/changelog/version.js on lines 17..20
packages/dev/src/cmds/update-version.js on lines 179..182

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        if ( ! whichOpts.includes( which ) ) {
            logResult( `Unknown argument: "${ chalk.bold( which ) }".`, 'error' );
            process.exit( 1 );
        }
Severity: Major
Found in packages/dev/src/cmds/changelog/version.js and 2 other locations - About 55 mins to fix
packages/dev/src/cmds/changelog/write.js on lines 253..256
packages/dev/src/cmds/update-version.js on lines 179..182

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

function CertificateDocumentSettings( { type, title, sequentialId, background, height, margins, orientation, size, unit, width } ) {
    return (

        <PluginDocumentSettingPanel
            className="llms-certificate-doc-settings"
Severity: Minor
Found in src/js/admin-certificate-editor/document-settings.js and 1 other location - About 55 mins to fix
packages/dev/src/cmds/changelog/add.js on lines 113..176

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    action: ( { significance, type, comment, entry, interactive, links, attributions, dir, title, useEditor } ) => {
        if ( ! entry && ! interactive ) {
            logResult( 'A changelog entry is required.', 'error' );
            process.exit( 1 );
        }
Severity: Minor
Found in packages/dev/src/cmds/changelog/add.js and 1 other location - About 55 mins to fix
src/js/admin-certificate-editor/document-settings.js on lines 32..63

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 53.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    $l18n_plural   = array(
        'year'   => __( 'years', 'lifterlms' ),
        'month'  => __( 'months', 'lifterlms' ),
        'day'    => __( 'days', 'lifterlms' ),
        'hour'   => __( 'hours', 'lifterlms' ),
Severity: Major
Found in includes/llms.functions.core.php and 3 other locations - About 55 mins to fix
includes/abstracts/llms.abstract.notification.view.quiz.completion.php on lines 52..59
includes/admin/reporting/class.llms.admin.reporting.php on lines 323..330
includes/llms.functions.core.php on lines 335..342

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 98.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

        $tabs = array(
            'students'    => __( 'Students', 'lifterlms' ),
            'courses'     => __( 'Courses', 'lifterlms' ),
            'memberships' => __( 'Memberships', 'lifterlms' ),
            'quizzes'     => __( 'Quizzes', 'lifterlms' ),
Severity: Major
Found in includes/admin/reporting/class.llms.admin.reporting.php and 3 other locations - About 55 mins to fix
includes/abstracts/llms.abstract.notification.view.quiz.completion.php on lines 52..59
includes/llms.functions.core.php on lines 335..342
includes/llms.functions.core.php on lines 343..350

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 98.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        if ( 'any' !== $this->filter ) {

            $serialized_id = serialize(
                array(
                    'id' => absint( $this->filter ),
Severity: Minor
Found in includes/admin/reporting/tables/llms.table.memberships.php and 1 other location - About 55 mins to fix
includes/admin/reporting/tables/llms.table.courses.php on lines 206..223

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 98.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

        $rows = array(
            'STUDENT_NAME' => __( 'Student', 'lifterlms' ),
            'QUIZ_TITLE'   => __( 'Quiz', 'lifterlms' ),
            'LESSON_TITLE' => __( 'Lesson', 'lifterlms' ),
            'COURSE_TITLE' => __( 'Course', 'lifterlms' ),
includes/admin/reporting/class.llms.admin.reporting.php on lines 323..330
includes/llms.functions.core.php on lines 335..342
includes/llms.functions.core.php on lines 343..350

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 98.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

        if ( 'any' !== $this->filter ) {

            $serialized_id = serialize(
                array(
                    'id' => absint( $this->filter ),
Severity: Minor
Found in includes/admin/reporting/tables/llms.table.courses.php and 1 other location - About 55 mins to fix
includes/admin/reporting/tables/llms.table.memberships.php on lines 214..231

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 98.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    $l18n_singular = array(
        'year'   => __( 'year', 'lifterlms' ),
        'month'  => __( 'month', 'lifterlms' ),
        'day'    => __( 'day', 'lifterlms' ),
        'hour'   => __( 'hour', 'lifterlms' ),
Severity: Major
Found in includes/llms.functions.core.php and 3 other locations - About 55 mins to fix
includes/abstracts/llms.abstract.notification.view.quiz.completion.php on lines 52..59
includes/admin/reporting/class.llms.admin.reporting.php on lines 323..330
includes/llms.functions.core.php on lines 343..350

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 98.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                {
                    type: 'list',
                    name: 'type',
                    message: 'Change Type',
                    default: significance,
Severity: Minor
Found in packages/dev/src/cmds/changelog/add.js and 1 other location - About 50 mins to fix
packages/dev/src/cmds/changelog/add.js on lines 123..130

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 52.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                {
                    type: 'list',
                    name: 'significance',
                    message: 'Change Significance',
                    default: significance,
Severity: Minor
Found in packages/dev/src/cmds/changelog/add.js and 1 other location - About 50 mins to fix
packages/dev/src/cmds/changelog/add.js on lines 131..138

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 52.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            array(
                'blockName'   => 'llms/form-field-user-address-street',
                'innerBlocks' => array(
                    array(
                        'blockName' => 'llms/form-field-user-address-street-primary',
Severity: Minor
Found in includes/schemas/llms-reusable-blocks.php and 1 other location - About 50 mins to fix
includes/schemas/llms-reusable-blocks.php on lines 126..148

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if (
            isset( $current_screen->post_type ) &&
            in_array( $current_screen->post_type, array( 'course', 'lesson', 'llms_review', 'llms_membership', 'llms_engagement', 'llms_order', 'llms_coupon', 'llms_voucher', 'llms_form', 'llms_achievement', 'llms_my_achievement', 'llms_certificate', 'llms_my_certificate', 'llms_email' ), true ) &&
            false === $current_screen->is_block_editor
        ) {
Severity: Minor
Found in includes/admin/class-llms-admin-review.php and 1 other location - About 50 mins to fix
includes/admin/class-llms-admin-header.php on lines 50..56

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            array(
                'blockName'   => 'llms/form-field-user-address-region',
                'innerBlocks' => array(
                    array(
                        'blockName' => 'llms/form-field-user-address-state',
Severity: Minor
Found in includes/schemas/llms-reusable-blocks.php and 1 other location - About 50 mins to fix
includes/schemas/llms-reusable-blocks.php on lines 89..111

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if (
            isset( $current_screen->post_type ) &&
            in_array( $current_screen->post_type, array( 'course', 'lesson', 'llms_review', 'llms_membership', 'llms_engagement', 'llms_order', 'llms_coupon', 'llms_voucher', 'llms_form', 'llms_achievement', 'llms_my_achievement', 'llms_certificate', 'llms_my_certificate', 'llms_email' ), true ) &&
            false === $current_screen->is_block_editor
        ) {
Severity: Minor
Found in includes/admin/class-llms-admin-header.php and 1 other location - About 50 mins to fix
includes/admin/class-llms-admin-review.php on lines 56..62

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 97.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

const Icon = () => (
    <SVG className="llms-block-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">
        <Path
            d="M64 32C64 14.3 49.7 0 32 0S0 14.3 0 32v96V384c0 35.3 28.7 64 64 64H256V384H64V160H256V96H64V32zM288 192c0 17.7 14.3 32 32 32H544c17.7 0 32-14.3 32-32V64c0-17.7-14.3-32-32-32H445.3c-8.5 0-16.6-3.4-22.6-9.4L409.4 9.4c-6-6-14.1-9.4-22.6-9.4H320c-17.7 0-32 14.3-32 32V192zm0 288c0 17.7 14.3 32 32 32H544c17.7 0 32-14.3 32-32V352c0-17.7-14.3-32-32-32H445.3c-8.5 0-16.6-3.4-22.6-9.4l-13.3-13.3c-6-6-14.1-9.4-22.6-9.4H320c-17.7 0-32 14.3-32 32V480z"
        />
Severity: Major
Found in src/blocks/course-outline/icon.jsx and 15 other locations - About 50 mins to fix
src/blocks/access-plan-button/icon.jsx on lines 5..11
src/blocks/checkout/icon.jsx on lines 5..11
src/blocks/course-author/icon.jsx on lines 5..11
src/blocks/course-continue/icon.jsx on lines 5..11
src/blocks/course-meta-info/icon.jsx on lines 5..11
src/blocks/course-prerequisites/icon.jsx on lines 5..14
src/blocks/course-reviews/icon.jsx on lines 5..11
src/blocks/course-syllabus/icon.jsx on lines 5..14
src/blocks/courses/icon.jsx on lines 5..11
src/blocks/login/icon.jsx on lines 5..11
src/blocks/memberships/icon.jsx on lines 5..11
src/blocks/my-account/icon.jsx on lines 5..11
src/blocks/my-achievements/icon.jsx on lines 5..11
src/blocks/navigation-link/icon.jsx on lines 5..11
src/blocks/registration/icon.jsx on lines 5..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

const Icon = () => (
    <SVG className="llms-block-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512">
        <Path
            d="M224 256A128 128 0 1 0 224 0a128 128 0 1 0 0 256zm-45.7 48C79.8 304 0 383.8 0 482.3C0 498.7 13.3 512 29.7 512H418.3c16.4 0 29.7-13.3 29.7-29.7C448 383.8 368.2 304 269.7 304H178.3z"
        />
Severity: Major
Found in src/blocks/course-author/icon.jsx and 15 other locations - About 50 mins to fix
src/blocks/access-plan-button/icon.jsx on lines 5..11
src/blocks/checkout/icon.jsx on lines 5..11
src/blocks/course-continue/icon.jsx on lines 5..11
src/blocks/course-meta-info/icon.jsx on lines 5..11
src/blocks/course-outline/icon.jsx on lines 5..11
src/blocks/course-prerequisites/icon.jsx on lines 5..14
src/blocks/course-reviews/icon.jsx on lines 5..11
src/blocks/course-syllabus/icon.jsx on lines 5..14
src/blocks/courses/icon.jsx on lines 5..11
src/blocks/login/icon.jsx on lines 5..11
src/blocks/memberships/icon.jsx on lines 5..11
src/blocks/my-account/icon.jsx on lines 5..11
src/blocks/my-achievements/icon.jsx on lines 5..11
src/blocks/navigation-link/icon.jsx on lines 5..11
src/blocks/registration/icon.jsx on lines 5..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

const Icon = () => (
    <SVG className="llms-block-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">
        <Path
            d="M0 24C0 10.7 10.7 0 24 0H69.5c22 0 41.5 12.8 50.6 32h411c26.3 0 45.5 25 38.6 50.4l-41 152.3c-8.5 31.4-37 53.3-69.5 53.3H170.7l5.4 28.5c2.2 11.3 12.1 19.5 23.6 19.5H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H199.7c-34.6 0-64.3-24.6-70.7-58.5L77.4 54.5c-.7-3.8-4-6.5-7.9-6.5H24C10.7 48 0 37.3 0 24zM128 464a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm336-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"
        />
Severity: Major
Found in src/blocks/checkout/icon.jsx and 15 other locations - About 50 mins to fix
src/blocks/access-plan-button/icon.jsx on lines 5..11
src/blocks/course-author/icon.jsx on lines 5..11
src/blocks/course-continue/icon.jsx on lines 5..11
src/blocks/course-meta-info/icon.jsx on lines 5..11
src/blocks/course-outline/icon.jsx on lines 5..11
src/blocks/course-prerequisites/icon.jsx on lines 5..14
src/blocks/course-reviews/icon.jsx on lines 5..11
src/blocks/course-syllabus/icon.jsx on lines 5..14
src/blocks/courses/icon.jsx on lines 5..11
src/blocks/login/icon.jsx on lines 5..11
src/blocks/memberships/icon.jsx on lines 5..11
src/blocks/my-account/icon.jsx on lines 5..11
src/blocks/my-achievements/icon.jsx on lines 5..11
src/blocks/navigation-link/icon.jsx on lines 5..11
src/blocks/registration/icon.jsx on lines 5..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 16 locations. Consider refactoring.
Open

const Icon = () => (
    <SVG
        className="llms-block-icon"
        xmlns="http://www.w3.org/2000/svg"
        viewBox="0 0 512 512"
Severity: Major
Found in src/blocks/course-prerequisites/icon.jsx and 15 other locations - About 50 mins to fix
src/blocks/access-plan-button/icon.jsx on lines 5..11
src/blocks/checkout/icon.jsx on lines 5..11
src/blocks/course-author/icon.jsx on lines 5..11
src/blocks/course-continue/icon.jsx on lines 5..11
src/blocks/course-meta-info/icon.jsx on lines 5..11
src/blocks/course-outline/icon.jsx on lines 5..11
src/blocks/course-reviews/icon.jsx on lines 5..11
src/blocks/course-syllabus/icon.jsx on lines 5..14
src/blocks/courses/icon.jsx on lines 5..11
src/blocks/login/icon.jsx on lines 5..11
src/blocks/memberships/icon.jsx on lines 5..11
src/blocks/my-account/icon.jsx on lines 5..11
src/blocks/my-achievements/icon.jsx on lines 5..11
src/blocks/navigation-link/icon.jsx on lines 5..11
src/blocks/registration/icon.jsx on lines 5..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 51.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language