neos/neos-development-collection

View on GitHub

Showing 821 of 1,152 total issues

File AssetController.php has 552 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php

namespace Neos\Media\Browser\Controller;

/*
Severity: Major
Found in Neos.Media.Browser/Classes/Controller/AssetController.php - About 1 day to fix

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

        public function render()
        {
            $changes = parent::render();
            $html = '';
            if (empty($changes)) {
    Severity: Minor
    Found in Neos.Diff/Classes/Renderer/Html/HtmlInlineRenderer.php - About 1 day 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 getProcessedValue has a Cognitive Complexity of 55 (exceeds 5 allowed). Consider refactoring.
    Open

        protected function getProcessedValue($unparsedValue)
        {
            if (preg_match(self::SPLIT_PATTERN_VALUENUMBER, $unparsedValue, $matches) === 1) {
                $processedValue = intval($unparsedValue);
            } elseif (preg_match(self::SPLIT_PATTERN_VALUEFLOATNUMBER, $unparsedValue, $matches) === 1) {
    Severity: Minor
    Found in Neos.Fusion/Classes/Core/Parser.php - About 1 day 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 pluploadQueue has 212 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        $.fn.pluploadQueue = function(settings) {
            if (settings) {
                this.each(function() {
                    var uploader, target, id, contents_bak;
    
    

      Function createChildNodesByNodeType has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
      Open

          protected function createChildNodesByNodeType(NodeType $nodeType, $workspaceName, $dryRun)
          {
              $createdNodesCount = 0;
              $updatedNodesCount = 0;
              $incorrectNodeTypeCount = 0;

      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 IconNameMappingService.php has 507 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      <?php
      namespace Neos\Neos\Service;
      
      /*
       * This file is part of the Neos.Flow package.
      Severity: Major
      Found in Neos.Neos/Classes/Service/IconNameMappingService.php - About 1 day to fix

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

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

        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

        NodeDataRepository has 56 functions (exceeds 20 allowed). Consider refactoring.
        Open

        class NodeDataRepository extends Repository
        {
            /**
             * Constants for setNewIndex()
             */

          File NodeData.php has 496 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          <?php
          namespace Neos\ContentRepository\Domain\Model;
          
          /*
           * This file is part of the Neos.ContentRepository package.
          Severity: Minor
          Found in Neos.ContentRepository/Classes/Domain/Model/NodeData.php - About 7 hrs to fix

            Function initAloha has 183 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function initAloha() {
                    var nodeTypes = Configuration.get('Schema'),
                        nodeSettings = {},
                        placeholderSettings = {};
                    $.each(nodeTypes, function (nodeTypeName, nodeType) {
            Severity: Major
            Found in Neos.Neos/Resources/Public/JavaScript/aloha.js - About 7 hrs to fix

              File TimeSeriesChart.js has 460 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              define(
                  [
                      'emberjs',
                      'Library/d3/d3'
                  ],

                Function _initUploader has 175 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _initUploader: function() {
                        var self = this
                        , id = this.id
                        , uploader
                        , options = {

                  File SequenceMatcher.php has 452 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  <?php
                  namespace Neos\Diff;
                  
                  /**
                   * This file is part of the Neos.Diff package.
                  Severity: Minor
                  Found in Neos.Diff/Classes/SequenceMatcher.php - About 6 hrs to fix

                    Function setNodeProperties has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring.
                    Open

                        protected function setNodeProperties($nodeLike, NodeType $nodeType, array $properties, TYPO3CRContext $context, PropertyMappingConfigurationInterface $configuration = null)
                        {
                            $nodeTypeProperties = $nodeType->getProperties();
                            unset($properties['_lastPublicationDateTime']);
                            foreach ($properties as $nodePropertyName => $nodePropertyValue) {
                    Severity: Minor
                    Found in Neos.ContentRepository/Classes/TypeConverter/NodeConverter.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 FileInput has 167 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function FileInput() {
                            var _uid, _mimes = [], _options, _browseBtnZIndex; // save original z-index;
                    
                            function addInput() {
                                var comp = this, I = comp.getRuntime(), shimContainer, browseButton, currForm, form, input, uid;
                    Severity: Major
                    Found in Neos.Media.Browser/Resources/Public/Libraries/plupload/moxie.js - About 6 hrs to fix

                      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

                            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
                              Severity
                              Category
                              Status
                              Source
                              Language