pborreli/composer-service

View on GitHub

Showing 23 of 31 total issues

Method __construct has 305 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function __construct()
    {
        /* mandatory requirements follow */

        $installedPhpVersion = PHP_VERSION;
Severity: Major
Found in app/SymfonyRequirements.php - About 1 day to fix

    File SymfonyRequirements.php has 503 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    /*
     * This file is part of the Symfony package.
     *
    Severity: Major
    Found in app/SymfonyRequirements.php - About 1 day to fix

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

      /*!
      * ZeroClipboard
      * The ZeroClipboard library provides an easy way to copy text to the clipboard using an invisible Adobe Flash movie and a JavaScript interface.
      * Copyright (c) 2013 Jon Rohan, James M. Greene
      * Licensed MIT

        Function __construct has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
        Open

            public function __construct()
            {
                /* mandatory requirements follow */
        
                $installedPhpVersion = PHP_VERSION;
        Severity: Minor
        Found in app/SymfonyRequirements.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 create has 74 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function create(button) {
                if (typeof button === "undefined") {
                    console.warn("Ladda button target must be defined.");
                    return;
                }
        Severity: Major
        Found in src/Ayaline/Bundle/ComposerBundle/Resources/public/js/ladda.js - About 2 hrs to fix

          Function initVML has 53 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              function initVML() {
                  function vml(tag, attr) {
                      return createEl("<" + tag + ' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">', attr);
                  }
                  sheet.addRule(".spin-vml", "behavior:url(#default#VML)");
          Severity: Major
          Found in src/Ayaline/Bundle/ComposerBundle/Resources/public/js/spin.js - About 2 hrs to fix

            Function receiveEvent has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              ZeroClipboard.prototype.receiveEvent = function(eventName, args) {
                eventName = eventName.toString().toLowerCase().replace(/^on/, "");
                var element = currentElement;
                var performCallbackAsync = true;
                switch (eventName) {

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

                      Spinner.prototype.lines = function(el, o) {
                          var r = o.length + o.width, s = 2 * r;
                          function grp() {
                              return css(vml("group", {
                                  coordsize: s + " " + s,
              Severity: Minor
              Found in src/Ayaline/Bundle/ComposerBundle/Resources/public/js/spin.js - About 1 hr to fix

                Function __construct has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                Open

                    public function __construct($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null, $optional = false)
                    {
                        $cfgValue = ini_get($cfgName);
                
                        if (is_callable($evaluation)) {
                Severity: Minor
                Found in app/SymfonyRequirements.php - About 1 hr 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 spin has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        spin: function(target) {
                            this.stop();
                            var self = this, o = self.opts, el = self.el = css(createEl(0, {
                                className: o.className
                            }), {
                Severity: Minor
                Found in src/Ayaline/Bundle/ComposerBundle/Resources/public/js/spin.js - About 1 hr to fix

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

                    var _getDOMObjectPosition = function(obj) {
                      var info = {
                        left: 0,
                        top: 0,
                        width: 0,

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

                      var _bridge = function() {
                        var flashBridge, len;
                        var client = ZeroClipboard.prototype._singleton;
                        var container = document.getElementById("global-zeroclipboard-html-bridge");
                        if (!container) {

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

                              lines: function(el, o) {
                                  var i = 0, start = (o.lines - 1) * (1 - o.direction) / 2, seg;
                                  function fill(color, shadow) {
                                      return css(createEl(), {
                                          position: "absolute",
                      Severity: Minor
                      Found in src/Ayaline/Bundle/ComposerBundle/Resources/public/js/spin.js - About 1 hr to fix

                        Function _vars has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          var _vars = function(options) {
                            var str = [];
                            var origins = [];
                            if (options.trustedOrigins) {
                              if (typeof options.trustedOrigins === "string") {

                          Function bind has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              function bind(target, options) {
                                  options = options || {};
                                  var targets = [];
                                  if (typeof target === "string") {
                                      targets = toArray(document.querySelectorAll(target));
                          Severity: Minor
                          Found in src/Ayaline/Bundle/ComposerBundle/Resources/public/js/ladda.js - About 1 hr to fix

                            Method __construct has 7 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                public function __construct($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null, $optional = false)
                            Severity: Major
                            Found in app/SymfonyRequirements.php - About 50 mins to fix

                              Method addPhpIniRequirement has 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  public function addPhpIniRequirement($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null)
                              Severity: Minor
                              Found in app/SymfonyRequirements.php - About 45 mins to fix

                                Method addPhpIniRecommendation has 6 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    public function addPhpIniRecommendation($cfgName, $evaluation, $approveCfgAbsence = false, $testMessage = null, $helpHtml = null, $helpText = null)
                                Severity: Minor
                                Found in app/SymfonyRequirements.php - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                              if (className.indexOf(" " + classNames[c] + " ") < 0) {
                                                setClass += " " + classNames[c];
                                              }
                                  Severity: Major
                                  Found in src/Ayaline/Bundle/ComposerBundle/Resources/public/js/ZeroClipboard.js - About 45 mins to fix

                                    Function _dispatchCallback has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                      var _dispatchCallback = function(func, element, instance, args, async) {
                                    Severity: Minor
                                    Found in src/Ayaline/Bundle/ComposerBundle/Resources/public/js/ZeroClipboard.js - About 35 mins to fix
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language