neos/neos-development-collection

View on GitHub

Showing 919 of 1,374 total issues

Function earlyOptimizationOfFilters has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
Open

    protected function earlyOptimizationOfFilters(FlowQuery $flowQuery, array $parsedFilter)
    {
        $optimized = false;
        $output = [];
        $outputNodeAggregateIdentifiers = [];

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 XMLHttpRequest has 254 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function XMLHttpRequest() {
        var self = this
        , _xhr
        , _filename
        ;
Severity: Major
Found in Neos.Media.Browser/Resources/Public/Libraries/plupload/moxie.js - About 1 day to fix

    File Runtime.php has 578 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

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

      Function _cropView has 246 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              _cropView: function () {
                  var parent = this;
      
                  return Ember.View.extend({
                      classNames: ['neos-secondary-inspector-image-crop'],

        File AssetController.php has 561 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 Gruntfile.js has 512 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            module.exports = function (grunt) {
                var path = require('path'),
                    packagePath = path.join(__dirname, '../'),
                    libraryPath = path.join(packagePath, 'Resources/Public/Library/');
            
            
            Severity: Major
            Found in Neos.Neos/Scripts/Gruntfile.js - About 1 day to fix

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