DerDu/MOC-Framework-Mark-V

View on GitHub

Showing 88 of 88 total issues

Method readPropertySets has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function readPropertySets()
    {
        $offset = 0;

        // loop through entires, each entry is 128 bytes

    Identical blocks of code found in 3 locations. Consider refactoring.
    Open

        public function connectServer($Host, $Username, $Password, $Port = null, $useSSL = false, $useTLS = false)
        {
    
            try {
                $this->Instance = new Smtp($Host, $Username, $Password, $Port, $useSSL, $useTLS);
    Severity: Major
    Found in Component/Mail/Component/Bridge/Repository/EdenPhpSmtp.php and 2 other locations - About 1 hr to fix
    Component/Mail/Component/Bridge/Repository/EdenPhpImap.php on lines 56..66
    Component/Mail/Component/Bridge/Repository/EdenPhpPop3.php on lines 56..66

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 117.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 3 locations. Consider refactoring.
    Open

        public function connectServer($Host, $Username, $Password, $Port = null, $useSSL = false, $useTLS = false)
        {
    
            try {
                $this->Instance = new Imap($Host, $Username, $Password, $Port, $useSSL, $useTLS);
    Severity: Major
    Found in Component/Mail/Component/Bridge/Repository/EdenPhpImap.php and 2 other locations - About 1 hr to fix
    Component/Mail/Component/Bridge/Repository/EdenPhpPop3.php on lines 56..66
    Component/Mail/Component/Bridge/Repository/EdenPhpSmtp.php on lines 59..69

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 117.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 3 locations. Consider refactoring.
    Open

        public function connectServer($Host, $Username, $Password, $Port = null, $useSSL = false, $useTLS = false)
        {
    
            try {
                $this->Instance = new Pop3($Host, $Username, $Password, $Port, $useSSL, $useTLS);
    Severity: Major
    Found in Component/Mail/Component/Bridge/Repository/EdenPhpPop3.php and 2 other locations - About 1 hr to fix
    Component/Mail/Component/Bridge/Repository/EdenPhpImap.php on lines 56..66
    Component/Mail/Component/Bridge/Repository/EdenPhpSmtp.php on lines 59..69

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 117.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function chr has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function chr($dec)
        {
            if ($dec<=0x7F) {
                return chr($dec);
            }
    Severity: Minor
    Found in Component/Document/Vendor/PhpOfficeCommon/0.2.6/src/Common/Text.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 realpath has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
    Open

        public static function realpath($pFilename)
        {
            // Try using realpath()
            $returnValue = realpath($pFilename);
    
    
    Severity: Minor
    Found in Component/Document/Vendor/PhpOfficeCommon/0.2.6/src/Common/File.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

    Method getReaderType has 41 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

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

      Function __toString has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

          public function __toString()
          {
      
              if ($this->getRealPath()) {
                  if (function_exists('mime_content_type')) {
      Severity: Minor
      Found in Core/FileSystem/Vendor/Universal/Download.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 __toString has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

          public function __toString()
          {
      
              if ($this->getRealPath()) {
                  if (function_exists('mime_content_type')) {
      Severity: Minor
      Found in Core/FileSystem/Vendor/Universal/Stream.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 findSource has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

          private function findSource($ClassName)
          {
      
              $LoadNamespace = $this->getClassNamespace($ClassName);
              /**
      Severity: Minor
      Found in Core/AutoLoader/Vendor/Universal/NamespaceLoader.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 parseSimpleXml has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
      Open

          private function parseSimpleXml(\SimpleXMLElement $Xml)
          {
      
              $Node = new Node();
              $Node->setName($Xml->getName());
      Severity: Minor
      Found in Component/Document/Vendor/UniversalXml/Api.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

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      <?php
      namespace MOC\V\Component\Documentation\Component\Parameter\Repository;
      
      use MOC\V\Component\Documentation\Component\Exception\Repository\EmptyDirectoryException;
      use MOC\V\Component\Documentation\Component\Exception\Repository\TypeDirectoryException;
      Core/FileSystem/Component/Parameter/Repository/DirectoryParameter.php on lines 1..58

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 109.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Identical blocks of code found in 2 locations. Consider refactoring.
      Open

      <?php
      namespace MOC\V\Core\FileSystem\Component\Parameter\Repository;
      
      use MOC\V\Core\FileSystem\Component\Exception\Repository\EmptyDirectoryException;
      use MOC\V\Core\FileSystem\Component\Exception\Repository\TypeDirectoryException;
      Component/Documentation/Component/Parameter/Repository/DirectoryParameter.php on lines 1..58

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 109.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Function readPropertySets has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

          private function readPropertySets()
          {
              $offset = 0;
      
              // loop through entires, each entry is 128 bytes

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

          private function getConfig()
          {
      
              $Default = array(
                  // Source file or directory to parse
      Severity: Minor
      Found in Component/Documentation/Component/Bridge/Repository/ApiGen.php - About 1 hr to fix

        Method __toString has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public function __toString()
            {
        
                if ($this->getRealPath()) {
                    if (function_exists('mime_content_type')) {
        Severity: Minor
        Found in Core/FileSystem/Vendor/Universal/Stream.php - About 1 hr to fix

          Method __toString has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public function __toString()
              {
          
                  if ($this->getRealPath()) {
                      if (function_exists('mime_content_type')) {
          Severity: Minor
          Found in Core/FileSystem/Vendor/Universal/Download.php - About 1 hr to fix

            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

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        } else {
                            if ($RewriteBase === null) {
                                $this->Instance->create($Location->getFile(), PCLZIP_OPT_TEMP_FILE_OFF);
                            } else if ($RewriteBase === false) {
                                $this->Instance->create($Location->getFile(), PCLZIP_OPT_REMOVE_ALL_PATH, PCLZIP_OPT_TEMP_FILE_OFF);
                Severity: Major
                Found in Component/Packer/Component/Bridge/Repository/PclZip.php and 1 other location - About 1 hr to fix
                Component/Packer/Component/Bridge/Repository/PclZip.php on lines 61..77

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 106.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Severity
                Category
                Status
                Source
                Language