DerDu/MOC-Framework-Mark-V

View on GitHub

Showing 65 of 88 total issues

Method getCode has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public function getCode()
    {

        $FuncArgs = func_get_args();
        if (empty( $FuncArgs )) {
Severity: Minor
Found in Component/Document/Vendor/UniversalXml/Source/Node.php - About 1 hr to fix

    Method getDelimiterType has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function getDelimiterType()
        {
    
            $Delimiter = array(
                ',',
    Severity: Minor
    Found in Component/Document/Component/Bridge/Repository/PhpExcel/File.php - About 1 hr to fix

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

          public function read($sFileName)
          {
              // Check if file exists and is readable
              if (!is_readable($sFileName)) {
                  throw new \Exception("Could not open " . $sFileName . " for reading! File does not exist, or it is not readable.");

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

          function __construct(Tokenizer $Tokenizer)
          {
      
              /** @var Token $Token */
              foreach ((array)$Tokenizer->getResult() as $Token) {
      Severity: Minor
      Found in Component/Document/Vendor/UniversalXml/Source/Parser.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 getStream has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          public function getStream($stream)
          {
              if ($stream === null) {
                  return null;
              }

      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

      Method buildConnectionParameter has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private function buildConnectionParameter(
              UsernameParameter $Username,
              PasswordParameter $Password,
              DatabaseParameter $Database,
              DriverParameter $Driver,
      Severity: Minor
      Found in Component/Database/Component/Bridge/Repository/Doctrine2DBAL.php - About 1 hr to fix

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

            function __construct(Tokenizer $Tokenizer)
            {
        
                /** @var Token $Token */
                foreach ((array)$Tokenizer->getResult() as $Token) {
        Severity: Minor
        Found in Component/Document/Vendor/UniversalXml/Source/Parser.php - About 1 hr to fix

          Method getStream has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function getStream($stream)
              {
                  if ($stream === null) {
                      return null;
                  }

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

                private function getWriterType(\SplFileInfo $Info)
                {
            
                    $WriterList = array(
                        'Excel2007' => array(
            Severity: Minor
            Found in Component/Document/Component/Bridge/Repository/PhpExcel/File.php - About 1 hr to fix

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

                  public function __construct()
                  {
              
                      if (null === self::$Instance) {
                          if (!isset($_GET)) {
              Severity: Minor
              Found in Core/GlobalsKernel/Component/Bridge/Repository/UniversalGlobals.php - About 55 mins 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 extractFiles has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function extractFiles()
                  {
                      if ($this->getFileParameter()->getFileInfo()->isFile()) {
                          $TmpDirectory = sys_get_temp_dir();
                          $SubDirectory = uniqid(sha1(__METHOD__), true);
              Severity: Minor
              Found in Component/Packer/Component/Bridge/Repository/PclZip.php - About 55 mins 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 loadClass has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
              Open

                  public function loadClass($ClassName)
                  {
              
                      if ($this->checkExists($ClassName)) {
                          return true;
              Severity: Minor
              Found in Core/AutoLoader/Vendor/Multiton/NamespaceLoader.php - About 55 mins 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

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

                      UsernameParameter $Username,
                      PasswordParameter $Password,
                      DatabaseParameter $Database,
                      DriverParameter $Driver,
                      HostParameter $Host,
              Severity: Major
              Found in Component/Database/Component/IBridgeInterface.php - About 50 mins to fix

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

                        UsernameParameter $Username,
                        PasswordParameter $Password,
                        DatabaseParameter $Database,
                        DriverParameter $Driver,
                        HostParameter $Host,
                Severity: Major
                Found in Component/Database/Component/Bridge/Repository/Doctrine2DBAL.php - About 50 mins to fix

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

                          UsernameParameter $Username,
                          PasswordParameter $Password,
                          DatabaseParameter $Database,
                          DriverParameter $Driver,
                          HostParameter $Host,
                  Severity: Major
                  Found in Component/Database/Component/Bridge/Repository/Doctrine2DBAL.php - About 50 mins to fix

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

                            $Username,
                            $Password,
                            $Database,
                            $Driver,
                            $Host,
                    Severity: Major
                    Found in Component/Database/Database.php - About 50 mins to fix

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

                          public static function getDatabase($Username, $Password, $Database, $Driver, $Host, $Port = null, $Timeout = 5)
                      Severity: Major
                      Found in Component/Database/Database.php - About 50 mins to fix

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

                                $Name,
                                $AttributeList = null,
                                $Index = null,
                                $Recursive = true,
                                $NameIsRegExp = false,
                        Severity: Minor
                        Found in Component/Document/Vendor/UniversalXml/Source/Node.php - About 45 mins to fix

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

                              public function connectServer($Host, $Username, $Password, $Port = null, $useSSL = false, $useTLS = false)
                          Severity: Minor
                          Found in Component/Mail/Component/Bridge/Repository/EdenPhpImap.php - About 45 mins to fix

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

                                public function connectServer($Host, $Username, $Password, $Port = null, $useSSL = false, $useTLS = false);
                            Severity: Minor
                            Found in Component/Mail/Component/IBridgeInterface.php - About 45 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language