gocodebox/lifterlms

View on GitHub

Showing 1,420 of 1,425 total issues

Function render has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        render: function() {
            var self = this;
            setTimeout( function () {
                self.$el.llmsSelect2( {
                    ajax: {
Severity: Minor
Found in assets/js/builder/Views/PostSearch.js - About 1 hr to fix

    Function open_media_lib has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            open_media_lib: function( event ) {
    
                event.stopPropagation();
    
                var self = this,
    Severity: Minor
    Found in assets/js/builder/Views/_Editable.js - About 1 hr to fix

      Function get_sibling has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              get_sibling: function( direction, status ) {
      
                  direction = 'next' === direction ? direction : 'prev';
      
                  // Functions and vars to use when direction is 'prev' (default).
      Severity: Minor
      Found in assets/js/builder/Models/Lesson.js - About 1 hr to fix

        Function bind_gateways has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                this.bind_gateways = function() {
        
                    this.load_gateways();
        
                    if ( ! $( 'input[name="llms_payment_gateway"]' ).length ) {
        Severity: Minor
        Found in assets/js/llms-form-checkout.js - About 1 hr to fix

          Function setup_fields has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  function setup_fields() {
          
                      $els = $( '.llms-quiz-attempt-question:not(.type--content):not(.type--removed)' );
          
                      if ( $els.length < 1 ) {
          Severity: Minor
          Found in assets/js/llms-quiz-attempt-review.js - About 1 hr to fix

            Function add_row has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                add_row: function( $repeater, data, expand ) {
            
                    var self      = this,
                        $rows     = $repeater.find( '.llms-repeater-rows' ),
                        $model    = $repeater.find( '.llms-repeater-model' ),
            Severity: Minor
            Found in assets/js/partials/_metabox-field-repeater.js - About 1 hr to fix

              Method set_columns has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  protected function set_columns() {
                      return array(
                          'id'          => array(
                              'exportable' => true,
                              'title'      => __( 'ID', 'lifterlms' ),
              Severity: Minor
              Found in includes/admin/reporting/tables/llms.table.courses.php - About 1 hr to fix

                Method get_data has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    protected function get_data( $key, $data ) {
                
                        $membership = llms_get_post( $data );
                
                        switch ( $key ) {
                Severity: Minor
                Found in includes/admin/reporting/tables/llms.table.memberships.php - About 1 hr to fix

                  Method get_settings_gateway has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function get_settings_gateway( $curr_section ) {
                  
                          $settings = array();
                  
                          $settings[] = array(
                  Severity: Minor
                  Found in includes/admin/settings/class.llms.settings.checkout.php - About 1 hr to fix

                    Method get_results has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public function get_results( $args = array() ) {
                    
                            $this->title = __( 'Quiz Attempts', 'lifterlms' );
                    
                            $args = $this->clean_args( $args );
                    Severity: Minor
                    Found in includes/admin/reporting/tables/llms.table.quiz.attempts.php - About 1 hr to fix

                      Method get_widget_data has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function get_widget_data() {
                              return apply_filters(
                                  'llms_reporting_tab_enrollments_widgets',
                                  array(
                                      array(

                        Method get_settings has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            protected function get_settings() {
                        
                                $settings   = array();
                                $settings[] = array(
                                    'type' => 'sectionstart',
                        Severity: Minor
                        Found in includes/abstracts/llms.abstract.integration.php - About 1 hr to fix

                          Method randomize_attempt_questions has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static function randomize_attempt_questions( $questions ) {
                          
                                  if ( empty( $questions ) ) {
                                      return $questions;
                                  }
                          Severity: Minor
                          Found in includes/models/model.llms.quiz.attempt.php - About 1 hr to fix

                            Method update_custom_schemas has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public static function update_custom_schemas( $type, $post, $post_data ) {
                            
                                    $schemas = self::get_custom_schemas();
                                    if ( empty( $schemas[ $type ] ) ) {
                                        return;
                            Severity: Minor
                            Found in includes/admin/class.llms.admin.builder.php - About 1 hr to fix

                              Method remove_coupon_code has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public static function remove_coupon_code( $request ) {
                              
                                      llms()->session->set( 'llms_coupon', false );
                              
                                      $plan = new LLMS_Access_Plan( $request['plan_id'] );
                              Severity: Minor
                              Found in includes/class.llms.ajax.handler.php - About 1 hr to fix

                                Method create has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function create( $data = array() ) {
                                
                                        $time = current_time( 'mysql' );
                                
                                        $data = wp_parse_args(
                                Severity: Minor
                                Found in includes/models/model.llms.notification.php - About 1 hr to fix

                                  Method includes_libraries has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function includes_libraries() {
                                  
                                          $libs = array(
                                              'blocks' => array(
                                                  'const' => 'LLMS_BLOCKS_LIB',
                                  Severity: Minor
                                  Found in includes/class-llms-loader.php - About 1 hr to fix

                                    Method get_post_type_caps has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public static function get_post_type_caps( $post_type ) {
                                    
                                            if ( ! is_array( $post_type ) ) {
                                                $singular = $post_type;
                                                $plural   = $post_type . 's';
                                    Severity: Minor
                                    Found in includes/class.llms.post-types.php - About 1 hr to fix

                                      Method create has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private function create( $content ) {
                                              global $wpdb;
                                      
                                              $new_user_certificate = apply_filters(
                                                  'lifterlms_new_page',
                                      Severity: Minor
                                      Found in includes/class.llms.certificate.php - About 1 hr to fix

                                        Method register_certificate_post_type has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            private static function register_certificate_post_type( $post_type, $labels, $args, $rewrite_slug, $admin_cap ) {
                                        
                                                $user_can = current_user_can( $admin_cap );
                                                $supports = array( 'title', 'editor', 'thumbnail' );
                                        
                                        
                                        Severity: Minor
                                        Found in includes/class.llms.post-types.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language