gocodebox/lifterlms

View on GitHub

Showing 1,420 of 1,425 total issues

Method output has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function output() {

        $post_id = $this->post->ID;

        $lesson  = false;

    Method media_protection has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static function media_protection() {
            $id = 'using-nginx';
            if (
                apply_filters(
                    'llms_admin_notice_using_nginx',
    Severity: Minor
    Found in includes/admin/class.llms.admin.notices.core.php - About 1 hr to fix

      Method menu_item_classes has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public function menu_item_classes( $menu_items ) {
      
              if ( ! function_exists( 'is_lifterlms' ) || ! is_lifterlms() ) {
                  return $menu_items;
              }
      Severity: Minor
      Found in includes/class.llms.nav.menus.php - About 1 hr to fix

        Method llms_sort_orders has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function llms_sort_orders( $vars ) {
        
                if ( isset( $vars['post_type'] ) && 'llms_order' == $vars['post_type'] ) {
        
                    if ( isset( $vars['orderby'] ) && 'order' == $vars['orderby'] ) {

          Method output has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function output() {
          
                  global $post;
          
                  parent::output();

            Method get_revenue has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public function get_revenue( $period ) {
            
                    $query     = $this->orders_query( -1 );
                    $order_ids = wp_list_pluck( $query->posts, 'ID' );
            
            
            Severity: Minor
            Found in includes/class.llms.membership.data.php - About 1 hr to fix

              Method handle_manage_addons has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function handle_manage_addons() {
              
                      // phpcs:disable WordPress.Security.NonceVerification.Missing -- nonce is verified in $this->handle_actions() method.
              
                      $actions = apply_filters(
              Severity: Minor
              Found in includes/admin/class.llms.admin.addons.php - About 1 hr to fix

                Method set_field_descriptions has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static function set_field_descriptions( $field = array() ) {
                
                        $description = '';
                        $tooltip     = '';
                
                
                Severity: Minor
                Found in includes/admin/class.llms.admin.settings.php - About 1 hr to fix

                  Method update_section has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private static function update_section( $section_data, $course_id ) {
                  
                          $res = array_merge(
                              $section_data,
                              array(
                  Severity: Minor
                  Found in includes/admin/class.llms.admin.builder.php - About 1 hr to fix

                    Method parse_hook_find_trigger_type has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function parse_hook_find_trigger_type( $action, $related_post_id ) {
                    
                            $trigger_type = '';
                    
                            switch ( $action ) {
                    Severity: Minor
                    Found in includes/class.llms.engagements.php - About 1 hr to fix

                      Method build_template_result_from_post has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function build_template_result_from_post( $post ) {
                      
                              $terms = get_the_terms( $post, 'wp_theme' );
                      
                              if ( is_wp_error( $terms ) ) {
                      Severity: Minor
                      Found in includes/class-llms-block-templates.php - About 1 hr to fix

                        Method get_questions has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function get_questions( $return = 'questions' ) {
                        
                                $query = new WP_Query(
                                    array(
                                        'meta_query'     => array(
                        Severity: Minor
                        Found in includes/class.llms.question.manager.php - About 1 hr to fix

                          Method get_sync_action_texts has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function get_sync_action_texts() {
                          
                                  if ( $this->is_current_post_a_template ) {
                                      $awarded_number = $this->count_awarded_engagements( $this->post->ID );
                          
                          
                          Severity: Minor
                          Found in includes/abstracts/llms-abstract-meta-box-user-engagement-sync.php - About 1 hr to fix

                            Method get_overall_progress has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public function get_overall_progress( $use_cache = true ) {
                            
                                    $progress = null;
                            
                                    // Attempt to pull from the cache first.
                            Severity: Minor
                            Found in includes/models/model.llms.student.php - About 1 hr to fix

                              Method modify_editor_settings has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  public function modify_editor_settings( $settings, $context ) {
                              
                                      // Only load fonts when in post editor context for a certificate post type.
                                      if ( ! empty( $context->post ) && in_array( $context->post->post_type, array( 'llms_certificate', 'llms_my_certificate' ), true ) ) {
                              
                              
                              Severity: Minor
                              Found in includes/class-llms-block-library.php - About 1 hr to fix

                                Method merge_content has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public function merge_content( $content = null, $load_reusable_blocks = false ) {
                                
                                        $content = parent::merge_content( $content, $load_reusable_blocks );
                                
                                        // Merge.
                                Severity: Minor
                                Found in includes/models/model.llms.user.certificate.php - About 1 hr to fix

                                  Method get_sections has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public function get_sections( $return = 'sections' ) {
                                  
                                          $q = new WP_Query(
                                              array(
                                                  'meta_key'       => '_llms_order',
                                  Severity: Minor
                                  Found in includes/models/model.llms.course.php - About 1 hr to fix

                                    Method toArrayAfter has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public function toArrayAfter( $arr ) {
                                    
                                            $product             = $this->get_product();
                                            $arr['access_plans'] = array();
                                            foreach ( $product->get_access_plans( false, false ) as $p ) {
                                    Severity: Minor
                                    Found in includes/models/model.llms.course.php - About 1 hr to fix

                                      Method get_custom_fonts has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function get_custom_fonts( $blocks = null ) {
                                      
                                              $fonts = array();
                                      
                                              $blocks = is_null( $blocks ) ? parse_blocks( $this->get( 'content', true ) ) : $blocks;
                                      Severity: Minor
                                      Found in includes/models/model.llms.user.certificate.php - About 1 hr to fix

                                        Method output_table_html has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function output_table_html() {
                                        
                                                $post_type = null;
                                                if ( 'certificates' === $this->id ) {
                                                    $post_type = 'llms_my_certificate';
                                        Severity: Minor
                                        Found in includes/traits/llms-trait-earned-engagement-reporting-table.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language