DerDu/MOC-Framework-Mark-V

View on GitHub

Showing 65 of 88 total issues

Function getChild has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring.
Open

    public function getChild(
        $Name,
        $AttributeList = null,
        $Index = null,
        $Recursive = true,
Severity: Minor
Found in Component/Document/Vendor/UniversalXml/Source/Node.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

Style has 29 functions (exceeds 20 allowed). Consider refactoring.
Open

class Style implements IStyleInterface
{

    /** @var null|\PHPExcel_Worksheet $Worksheet */
    private $Worksheet = null;
Severity: Minor
Found in Component/Document/Component/Bridge/Repository/PhpExcel/Style.php - About 3 hrs to fix

    Function getCode has a Cognitive Complexity of 22 (exceeds 5 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 3 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 determineType has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
    Open

        protected function determineType($Content)
        {
    
            if (preg_match($this->PatternTagCDATA, $Content)) {
                $this->Type = self::TYPE_CDATA;
    Severity: Minor
    Found in Component/Document/Vendor/UniversalXml/Source/TokenPattern.php - About 2 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

    Method getChild has 56 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function getChild(
            $Name,
            $AttributeList = null,
            $Index = null,
            $Recursive = true,
    Severity: Major
    Found in Component/Document/Vendor/UniversalXml/Source/Node.php - About 2 hrs to fix

      Method read has 53 lines of code (exceeds 25 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.");

        Function compactFile has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

            public function compactFile(FileParameter $Location, $RewriteBase = null)
            {
                if ($this->getFileParameter()->getFileInfo()->isFile()) {
                    if ($RewriteBase === null) {
                        $this->Instance->add($Location->getFile(), PCLZIP_OPT_TEMP_FILE_OFF);
        Severity: Minor
        Found in Component/Packer/Component/Bridge/Repository/PclZip.php - About 2 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 utf8ToUnicode has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
        Open

            public static function utf8ToUnicode($text)
            {
                $unicode = array();
                $values = array();
                $lookingFor = 1;
        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

        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

          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

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