gocodebox/lifterlms

View on GitHub
includes/class-llms-rest-fields.php

Summary

Maintainability
A
3 hrs
Test Coverage
A
100%

Method get_fields_for_certificates has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function get_fields_for_certificates() {

        return array(
            'size'        => array(
                'description' => __( 'Certificate size.', 'lifterlms' ),
Severity: Minor
Found in includes/class-llms-rest-fields.php - About 1 hr to fix

    Method register_fields_for_certificate_templates has 40 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function register_fields_for_certificate_templates() {
    
            register_rest_field(
                'llms_certificate',
                'certificate_title',
    Severity: Minor
    Found in includes/class-llms-rest-fields.php - About 1 hr to fix

      Avoid too many return statements within this method.
      Open

                          return $cert ? $cert->set( 'sequential_id', $value ) : null;
      Severity: Major
      Found in includes/class-llms-rest-fields.php - About 30 mins to fix

        There are no issues that match your filters.

        Category
        Status