neos/neos-development-collection

View on GitHub

Showing 919 of 1,374 total issues

Function XMLHttpRequest has 167 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function XMLHttpRequest() {
        var _status, _response, _iframe;

        function cleanup(cb) {
            var target = this, uid, form, inputs, i, hasFile = false;
Severity: Major
Found in Neos.Media.Browser/Resources/Public/Libraries/plupload/moxie.js - About 6 hrs to fix

    File WorkspacesController.php has 445 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    namespace Neos\Neos\Controller\Module\Management;
    
    /*
     * This file is part of the Neos.Neos package.

      File NodeImportService.php has 444 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      namespace Neos\ContentRepository\Domain\Service\ImportExport;
      
      /*
       * This file is part of the Neos.ContentRepository package.

        Function removeBrokenEntityReferences has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
        Open

            public function removeBrokenEntityReferences($workspaceName)
            {
                $this->dispatch(self::EVENT_NOTICE, 'Checking for broken entity references ...');
        
                /** @var \Neos\ContentRepository\Domain\Model\Workspace $workspace */

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        File NodeTree.js has 440 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        /**
         * Node tree
         */
        define(
            [
        Severity: Minor
        Found in Neos.Neos/Resources/Public/JavaScript/Content/Navigate/NodeTree.js - About 6 hrs to fix

          File InspectorController.js has 438 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /**
           * Inspector
           */
          define(
          [

            NodeData has 47 functions (exceeds 20 allowed). Consider refactoring.
            Open

            class NodeData extends AbstractNodeData
            {
                /**
                 * Auto-incrementing version of this node data, used for optimistic locking
                 *
            Severity: Minor
            Found in Neos.ContentRepository/Classes/Domain/Model/NodeData.php - About 6 hrs to fix

              Function render has a Cognitive Complexity of 41 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function render()
                  {
                      $diff = '';
                      $opCodes = $this->diff->getGroupedOpcodes();
                      foreach ($opCodes as $group) {
              Severity: Minor
              Found in Neos.Diff/Classes/Renderer/Text/TextContextRenderer.php - About 6 hrs to fix

              Cognitive Complexity

              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

              A method's cognitive complexity is based on a few simple rules:

              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
              • Code is considered more complex for each "break in the linear flow of the code"
              • Code is considered more complex when "flow breaking structures are nested"

              Further reading

              Function Runtime has 149 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function Runtime(options, type, caps, modeCaps, preferredMode) {
                      /**
                      Dispatched when runtime is initialized and ready.
                      Results in RuntimeInit on a connected component.
              
              
              Severity: Major
              Found in Neos.Media.Browser/Resources/Public/Libraries/plupload/moxie.js - About 5 hrs to fix

                File Application.js has 415 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /**
                 * Main Ember.Application for the Content Module.
                 *
                 * Entry point which initializes the Content Module UI
                 */
                Severity: Minor
                Found in Neos.Neos/Resources/Public/JavaScript/Content/Application.js - About 5 hrs to fix

                  Function onUploadFile has 148 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      function onUploadFile(up, file) {
                          var url = up.settings.url;
                          var chunkSize = up.settings.chunk_size;
                          var retries = up.settings.max_retries;
                          var features = up.features;

                    Function position has 147 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    $.fn.position = function( options ) {
                        if ( !options || !options.of ) {
                            return _position.apply( this, arguments );
                        }
                    
                    

                      Function FlashRuntime has 147 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          function FlashRuntime(options) {
                              var I = this, initTimer;
                      
                              options = Basic.extend({ swf_url: Env.swf_url }, options);
                      
                      
                      Severity: Major
                      Found in Neos.Media.Browser/Resources/Public/Libraries/plupload/moxie.js - About 5 hrs to fix

                        Function FileInput has 142 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            function FileInput() {
                                var _options, _browseBtnZIndex; // save original z-index
                        
                                Basic.extend(this, {
                                    init: function(options) {
                        Severity: Major
                        Found in Neos.Media.Browser/Resources/Public/Libraries/plupload/moxie.js - About 5 hrs to fix

                          AssetController has 42 functions (exceeds 20 allowed). Consider refactoring.
                          Open

                          class AssetController extends ActionController
                          {
                              use CreateContentContextTrait;
                              use BackendUserTranslationTrait;
                          
                          
                          Severity: Minor
                          Found in Neos.Media.Browser/Classes/Controller/AssetController.php - About 5 hrs to fix

                            Function FileDrop has 136 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                function FileDrop() {
                                    var _files = [], _allowedExts = [], _options, _ruid;
                            
                                    Basic.extend(this, {
                                        init: function(options) {
                            Severity: Major
                            Found in Neos.Media.Browser/Resources/Public/Libraries/plupload/moxie.js - About 5 hrs to fix

                              Function buildItems has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
                              Open

                                  protected function buildItems()
                                  {
                                      $menuItems = [];
                                      $targetDimensionsToMatch = [];
                                      $allDimensionPresets = $this->configurationContentDimensionPresetSource->getAllPresets();
                              Severity: Minor
                              Found in Neos.Neos/Classes/Fusion/DimensionsMenuItemsImplementation.php - About 5 hrs to fix

                              Cognitive Complexity

                              Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                              A method's cognitive complexity is based on a few simple rules:

                              • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                              • Code is considered more complex for each "break in the linear flow of the code"
                              • Code is considered more complex when "flow breaking structures are nested"

                              Further reading

                              Runtime has 40 functions (exceeds 20 allowed). Consider refactoring.
                              Open

                              class Runtime
                              {
                                  /**
                                   * Internal constants defining how evaluateInternal should work in case of an error.
                                   */
                              Severity: Minor
                              Found in Neos.Fusion/Classes/Core/Runtime.php - About 5 hrs to fix

                                Function evaluate has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public function evaluate(FlowQuery $flowQuery, array $arguments)
                                    {
                                        $subject = $arguments[0];
                                        if (!isset($subject) || empty($subject)) {
                                            $flowQuery->setContext([]);

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Function findByParentAndNodeType has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
                                Open

                                    public function findByParentAndNodeType($parentPath, $nodeTypeFilter, Workspace $workspace, array $dimensions = null, $removedNodes = false, $recursive = false)
                                    {
                                        $parentPath = strtolower($parentPath);
                                        $foundNodes = $this->getNodeDataForParentAndNodeType($parentPath, $nodeTypeFilter, $workspace, $dimensions, $removedNodes, $recursive);
                                
                                

                                Cognitive Complexity

                                Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                A method's cognitive complexity is based on a few simple rules:

                                • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                • Code is considered more complex for each "break in the linear flow of the code"
                                • Code is considered more complex when "flow breaking structures are nested"

                                Further reading

                                Severity
                                Category
                                Status
                                Source
                                Language