neos/neos-development-collection

View on GitHub

Showing 837 of 1,173 total issues

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

      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 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 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 replaceAssetResource has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
            Open

                public function replaceAssetResource(AssetInterface $asset, PersistentResource $resource, array $options = []): void
                {
                    $originalAssetResource = $asset->getResource();
                    $asset->setResource($resource);
            
            
            Severity: Minor
            Found in Neos.Media/Classes/Domain/Service/AssetService.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

            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 41 functions (exceeds 20 allowed). Consider refactoring.
              Open

              class AssetController extends ActionController
              {
                  use CreateContentContextTrait;
                  use BackendUserTranslationTrait;
                  use AddFlashMessageTrait;
              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

                  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

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

                      function FileInput(options) {
                          if (MXI_DEBUG) {
                              Env.log("Instantiating FileInput...");
                          }
                  
                  
                  Severity: Major
                  Found in Neos.Media.Browser/Resources/Public/Libraries/plupload/moxie.js - About 4 hrs to fix

                    Function setOption has 124 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        function setOption(option, value, init) {
                            var self = this, reinitRequired = false;
                    
                            function _setOption(option, value, init) {
                                var oldValue = settings[option];

                      Function send has 122 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  send: function(meta, data) {
                                      var target = this
                                      , isGecko2_5_6 = (Env.browser === 'Mozilla' && Env.verComp(Env.version, 4, '>=') && Env.verComp(Env.version, 7, '<'))
                                      , isAndroidBrowser = Env.browser === 'Android Browser'
                                      , mustSendAsBinary = false
                      Severity: Major
                      Found in Neos.Media.Browser/Resources/Public/Libraries/plupload/moxie.js - About 4 hrs to fix

                        File UserService.php has 370 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

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

                          Function buildModuleList has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function buildModuleList(ControllerContext $controllerContext)
                              {
                                  $modules = [];
                                  foreach ($this->settings['modules'] as $moduleName => $moduleConfiguration) {
                                      if (!$this->isModuleEnabled($moduleName)) {
                          Severity: Minor
                          Found in Neos.Neos/Classes/Controller/Backend/MenuHelper.php - About 4 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 addMissingDefaultValuesByNodeType has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function addMissingDefaultValuesByNodeType(NodeType $nodeType, $workspaceName, $dryRun)
                              {
                                  $addedMissingDefaultValuesCount = 0;
                          
                                  $nodeTypes = $this->nodeTypeManager->getSubNodeTypes($nodeType->getName(), false);

                          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 render has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                          Open

                              public function render()
                              {
                                  // As we'll be modifying a & b to include our change markers,
                                  // we need to get the contents and store them here. That way
                                  // we're not going to destroy the original data
                          Severity: Minor
                          Found in Neos.Diff/Classes/Renderer/Html/HtmlArrayRenderer.php - About 4 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

                          Severity
                          Category
                          Status
                          Source
                          Language