kai-jacobsen/kontentblocks

View on GitHub

Showing 398 of 4,293 total issues

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

    public static function enqueueScripts()
    {
        global $post;
        $post_id = ( !empty( $post->ID ) ) ? $post->ID : null;
Severity: Minor
Found in core/Fields/Definitions/Plupload.php - About 1 hr to fix

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

        public function prepareTemplateData($data)
        {
            $options = $this->getArg('options', []);
            if (is_callable($options)) {
                $options = call_user_func($options, $this);
    Severity: Minor
    Found in core/Fields/Definitions/Select.php - About 1 hr to fix

      Function update has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

            update: function (ev, ui) {
              if (!isValidModule()) {
                return false;
              }
      
      
      Severity: Minor
      Found in js/src/common/UI.js - About 1 hr to fix

        Function geocode has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            geocode: function(query, cb, context) {
              var params = {
                address: query
              };
        
        
        Severity: Minor
        Found in js/third-party/leaflet.js - About 1 hr to fix

          Method toJSON has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              final public function toJSON()
              {
                  $toJSON = array(
                      'envVars' => $this->context,
                      'settings' => $this->properties->settings,
          Severity: Minor
          Found in core/Modules/Module.php - About 1 hr to fix

            Function reverse has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                reverse: function(location, scale, cb, context) {
                  var params = {
                    latlng: encodeURIComponent(location.lat) + ',' + encodeURIComponent(location.lng)
                  };
                  params = L.Util.extend(params, this.options.reverseQueryParams);
            Severity: Minor
            Found in js/third-party/leaflet.js - About 1 hr to fix

              Function _parseResults has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _parseResults: function(data, bboxname) {
                    var results = [];
                    L.geoJson(data, {
                      pointToLayer: function(feature, latlng) {
                        return L.circleMarker(latlng);
              Severity: Minor
              Found in js/third-party/leaflet.js - About 1 hr to fix

                Function geocode has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                      geocode: function(query, cb, context) {
                        var params = {
                          address: query
                        };
                
                
                Severity: Minor
                Found in js/third-party/leaflet-geocoder.js - About 1 hr to fix

                  Function update has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    update: function () {
                      var that = this;
                      var refresh = false;
                      jQuery.ajax({
                        url: ajaxurl,

                    Function reverse has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                          reverse: function(location, scale, cb, context) {
                            var params = {
                              latlng: encodeURIComponent(location.lat) + ',' + encodeURIComponent(location.lng)
                            };
                            params = L.Util.extend(params, this.options.reverseQueryParams);
                    Severity: Minor
                    Found in js/third-party/leaflet-geocoder.js - About 1 hr to fix

                      Method save has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public function save($postId, \WP_Post $postObj)
                          {
                              // auth request
                              if (!$this->auth($postId)) {
                                  return false;
                      Severity: Minor
                      Found in core/Backend/Dynamic/GlobalModulesMenu.php - About 1 hr to fix

                        Method html has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public function html()
                            {
                                $this->handleLoggedInUsers();
                                $format = '<%1$s id="%4$s" %3$s>%2$s</%1$s>';
                                $formatWithLink = '<%1$s id="%4$s" %3$s><a href="%5$s">%2$s</a></%1$s>';
                        Severity: Minor
                        Found in core/Fields/Definitions/ReturnObjects/EditableElement.php - About 1 hr to fix

                          Function openFrame has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            openFrame: function () {
                              var that = this;
                              if (this.frame) {
                                this.frame.dispose();
                              }
                          Severity: Minor
                          Found in js/src/frontend/Inline/EditableImageView.js - About 1 hr to fix

                            Function openModal has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              openModal: function () {
                                var that = this;
                            
                                // opens dialog if not already declared
                                if (this._frame) {
                            Severity: Minor
                            Found in js/src/fields/controls/gallery2/Gallery2Controller.js - About 1 hr to fix

                              Function openModal has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                openModal: function () {
                                  var that = this;
                              
                                  // opens dialog if not already declared
                                  if (this._frame) {
                              Severity: Minor
                              Found in js/src/fields/controls/gallery-ext/GalleryExtController.js - About 1 hr to fix

                                Function initialize has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  initialize: function (options) {
                                    var that = this;
                                    // CategoryView
                                    this.controller = options.controller;
                                    // ModuleListController
                                Severity: Minor
                                Found in js/src/frontend/Views/Sidebar/AreaDetails/ModuleDragItem.js - About 1 hr to fix

                                  Method action has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      protected static function action(Request $request)
                                      {
                                  
                                          $data = $request->request->filter('data', array(), FILTER_DEFAULT);
                                          // bail if essentials are missing
                                  Severity: Minor
                                  Found in core/Ajax/Actions/SortModules.php - About 1 hr to fix

                                    Method getDefaultContextLayout has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public static function getDefaultContextLayout()
                                        {
                                            $defaults = array(
                                                'top' => array(
                                                    'id' => 'top',
                                    Severity: Minor
                                    Found in core/Backend/EditScreens/ScreenManager.php - About 1 hr to fix

                                      Method setupMenu has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public function setupMenu()
                                          {
                                              if (!$this->menu) {
                                                  return false;
                                              }
                                      Severity: Minor
                                      Found in core/Panels/OptionPanel.php - About 1 hr to fix

                                        Method setupDiff has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public function setupDiff()
                                            {
                                                $trans = get_transient('kb_dynamic_areas');
                                        
                                                if (!$trans) {
                                        Severity: Minor
                                        Found in core/Areas/AreaDynamicManager.php - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language