PHPOffice/PHPPresentation

View on GitHub
src/PhpPresentation/Reader/PowerPoint97.php

Summary

Maintainability
F
1 mo
Test Coverage
B
80%

File PowerPoint97.php has 2279 lines of code (exceeds 250 allowed). Consider refactoring.
Open

<?php
/**
 * This file is part of PHPPresentation - A pure PHP library for reading and writing
 * presentations documents.
 *
Severity: Major
Found in src/PhpPresentation/Reader/PowerPoint97.php - About 6 days to fix

    Function readRecordOfficeArtSpContainer has a Cognitive Complexity of 224 (exceeds 5 allowed). Consider refactoring.
    Open

        private function readRecordOfficeArtSpContainer(string $stream, int $pos)
        {
            $arrayReturn = [
                'length' => 0,
                'shape' => null,
    Severity: Minor
    Found in src/PhpPresentation/Reader/PowerPoint97.php - About 4 days 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 readRecordDocumentContainer has a Cognitive Complexity of 77 (exceeds 5 allowed). Consider refactoring.
    Open

        private function readRecordDocumentContainer(string $stream, int $pos): void
        {
            $documentAtom = $this->loadRecordHeader($stream, $pos);
            $pos += 8;
            if (0x1 != $documentAtom['recVer'] || 0x000 != $documentAtom['recInstance'] || self::RT_DOCUMENTATOM != $documentAtom['recType']) {
    Severity: Minor
    Found in src/PhpPresentation/Reader/PowerPoint97.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

    Function readRecordOfficeArtFOPT has a Cognitive Complexity of 75 (exceeds 5 allowed). Consider refactoring.
    Open

        private function readRecordOfficeArtFOPT(string $stream, int $pos): array
        {
            $arrayReturn = [
                'length' => 0,
            ];
    Severity: Minor
    Found in src/PhpPresentation/Reader/PowerPoint97.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

    Method readRecordDocumentContainer has 223 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private function readRecordDocumentContainer(string $stream, int $pos): void
        {
            $documentAtom = $this->loadRecordHeader($stream, $pos);
            $pos += 8;
            if (0x1 != $documentAtom['recVer'] || 0x000 != $documentAtom['recInstance'] || self::RT_DOCUMENTATOM != $documentAtom['recType']) {
    Severity: Major
    Found in src/PhpPresentation/Reader/PowerPoint97.php - About 1 day to fix

      PowerPoint97 has 61 functions (exceeds 20 allowed). Consider refactoring.
      Open

      class PowerPoint97 implements ReaderInterface
      {
          public const OFFICEARTBLIPEMF = 0xF01A;
          public const OFFICEARTBLIPWMF = 0xF01B;
          public const OFFICEARTBLIPPICT = 0xF01C;
      Severity: Major
      Found in src/PhpPresentation/Reader/PowerPoint97.php - About 1 day to fix

        Method readRecordOfficeArtSpContainer has 199 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private function readRecordOfficeArtSpContainer(string $stream, int $pos)
            {
                $arrayReturn = [
                    'length' => 0,
                    'shape' => null,
        Severity: Major
        Found in src/PhpPresentation/Reader/PowerPoint97.php - About 7 hrs to fix

          Method readRecordOfficeArtFOPT has 168 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private function readRecordOfficeArtFOPT(string $stream, int $pos): array
              {
                  $arrayReturn = [
                      'length' => 0,
                  ];
          Severity: Major
          Found in src/PhpPresentation/Reader/PowerPoint97.php - About 6 hrs to fix

            Method readStructureTextPFRun has 130 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private function readStructureTextPFRun(string $stream, int $pos, int $strLenRT): array
                {
                    $arrayReturn = [
                        'length' => 0,
                        'strLenRT' => $strLenRT,
            Severity: Major
            Found in src/PhpPresentation/Reader/PowerPoint97.php - About 5 hrs to fix

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

                  private function readRecordOfficeArtClientTextbox(string $stream, int $pos)
                  {
                      $arrayReturn = [
                          'length' => 0,
                          'text' => '',
              Severity: Minor
              Found in src/PhpPresentation/Reader/PowerPoint97.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

              Method readRecordOfficeArtClientTextbox has 112 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  private function readRecordOfficeArtClientTextbox(string $stream, int $pos)
                  {
                      $arrayReturn = [
                          'length' => 0,
                          'text' => '',
              Severity: Major
              Found in src/PhpPresentation/Reader/PowerPoint97.php - About 4 hrs to fix

                Function readStructureTextPFRun has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
                Open

                    private function readStructureTextPFRun(string $stream, int $pos, int $strLenRT): array
                    {
                        $arrayReturn = [
                            'length' => 0,
                            'strLenRT' => $strLenRT,
                Severity: Minor
                Found in src/PhpPresentation/Reader/PowerPoint97.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 readRecordOfficeArtSpgrContainer has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                Open

                    private function readRecordOfficeArtSpgrContainer($stream, $pos, $bInGroup = false)
                    {
                        $arrayReturn = [
                            'length' => 0,
                        ];
                Severity: Minor
                Found in src/PhpPresentation/Reader/PowerPoint97.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

                Method readStructureTextCFRun has 92 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    private function readStructureTextCFRun(string $stream, int $pos, int $strLenRT): array
                    {
                        $arrayReturn = [
                            'length' => 0,
                            'strLenRT' => $strLenRT,
                Severity: Major
                Found in src/PhpPresentation/Reader/PowerPoint97.php - About 3 hrs to fix

                  Method readStructureTextRuler has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      private function readStructureTextRuler(string $stream, int $pos): array
                      {
                          $arrayReturn = [
                              'length' => 0,
                          ];
                  Severity: Major
                  Found in src/PhpPresentation/Reader/PowerPoint97.php - About 2 hrs to fix

                    Function loadCurrentUserStream has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                    Open

                        private function loadCurrentUserStream(): void
                        {
                            $pos = 0;
                    
                            /**
                    Severity: Minor
                    Found in src/PhpPresentation/Reader/PowerPoint97.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 loadCurrentUserStream has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private function loadCurrentUserStream(): void
                        {
                            $pos = 0;
                    
                            /**
                    Severity: Major
                    Found in src/PhpPresentation/Reader/PowerPoint97.php - About 2 hrs to fix

                      Function readRecordOfficeArtTertiaryFOPT has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private function readRecordOfficeArtTertiaryFOPT(string $stream, int $pos)
                          {
                              $arrayReturn = [
                                  'length' => 0,
                              ];
                      Severity: Minor
                      Found in src/PhpPresentation/Reader/PowerPoint97.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 readRecordOfficeArtClientData has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          private function readRecordOfficeArtClientData(string $stream, int $pos): array
                          {
                              $arrayReturn = [
                                  'length' => 0,
                              ];
                      Severity: Major
                      Found in src/PhpPresentation/Reader/PowerPoint97.php - About 2 hrs to fix

                        Method readRecordOfficeArtSpgrContainer has 51 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            private function readRecordOfficeArtSpgrContainer($stream, $pos, $bInGroup = false)
                            {
                                $arrayReturn = [
                                    'length' => 0,
                                ];
                        Severity: Major
                        Found in src/PhpPresentation/Reader/PowerPoint97.php - About 2 hrs to fix

                          Function readStructureTextRuler has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
                          Open

                              private function readStructureTextRuler(string $stream, int $pos): array
                              {
                                  $arrayReturn = [
                                      'length' => 0,
                                  ];
                          Severity: Minor
                          Found in src/PhpPresentation/Reader/PowerPoint97.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 readStructureTextSIRun has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              private function readStructureTextSIRun(string $stream, int $pos, int $strLenRT): array
                              {
                                  $arrayReturn = [
                                      'length' => 0,
                                      'strLenRT' => $strLenRT,
                          Severity: Minor
                          Found in src/PhpPresentation/Reader/PowerPoint97.php - About 1 hr to fix

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

                                private function readRecordOfficeArtTertiaryFOPT(string $stream, int $pos)
                                {
                                    $arrayReturn = [
                                        'length' => 0,
                                    ];
                            Severity: Minor
                            Found in src/PhpPresentation/Reader/PowerPoint97.php - About 1 hr to fix

                              Consider simplifying this complex logical expression.
                              Open

                                      if (1 == $masksData['bold'] || 1 == $masksData['italic'] || 1 == $masksData['underline'] || 1 == $masksData['shadow'] || 1 == $masksData['fehint'] || 1 == $masksData['kumi'] || 1 == $masksData['emboss'] || 1 == $masksData['fHasStyle']) {
                                          $data = self::getInt2d($stream, $pos + $arrayReturn['length']);
                                          $arrayReturn['length'] += 2;
                              
                                          $fontStyleFlags = [];
                              Severity: Critical
                              Found in src/PhpPresentation/Reader/PowerPoint97.php - About 1 hr to fix

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

                                    private function readStructureTextCFRun(string $stream, int $pos, int $strLenRT): array
                                    {
                                        $arrayReturn = [
                                            'length' => 0,
                                            'strLenRT' => $strLenRT,
                                Severity: Minor
                                Found in src/PhpPresentation/Reader/PowerPoint97.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 readRecordUserEditAtom has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    private function readRecordUserEditAtom(string $stream, int $pos): void
                                    {
                                        $rHeader = $this->loadRecordHeader($stream, $pos);
                                        $pos += 8;
                                        if (0x0 != $rHeader['recVer'] || 0x000 != $rHeader['recInstance'] || self::RT_USEREDITATOM != $rHeader['recType'] || (0x0000001C != $rHeader['recLen'] && 0x00000020 != $rHeader['recLen'])) {
                                Severity: Minor
                                Found in src/PhpPresentation/Reader/PowerPoint97.php - About 1 hr to fix

                                  Method readRecordOfficeArtBlip has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      private function readRecordOfficeArtBlip(string $stream, int $pos): array
                                      {
                                          $arrayReturn = [
                                              'length' => 0,
                                              'picture' => null,
                                  Severity: Minor
                                  Found in src/PhpPresentation/Reader/PowerPoint97.php - About 1 hr to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                if (isset($clientTextbox['text' . $inc]['bulletChar'])) {
                                                                    $arrayReturn['shape']->getActiveParagraph()->getBulletStyle()->setBulletType(Bullet::TYPE_BULLET);
                                                                    $arrayReturn['shape']->getActiveParagraph()->getBulletStyle()->setBulletChar($clientTextbox['text' . $inc]['bulletChar']);
                                                                }
                                    Severity: Major
                                    Found in src/PhpPresentation/Reader/PowerPoint97.php - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                                  if (isset($clientTextbox['text' . $inc]['leftMargin'])) {
                                                                      if ($lastMarginLeft > $clientTextbox['text' . $inc]['leftMargin']) {
                                                                          --$lastLevel;
                                                                      }
                                                                      if ($lastMarginLeft < $clientTextbox['text' . $inc]['leftMargin']) {
                                      Severity: Major
                                      Found in src/PhpPresentation/Reader/PowerPoint97.php - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                    if (!empty($clientTextbox['hyperlink'])) {
                                                                        foreach ($clientTextbox['hyperlink'] as $itmHyperlink) {
                                                                            if ($itmHyperlink['start'] == $start && ($itmHyperlink['end'] - $itmHyperlink['start']) == (float) $clientTextbox['part' . $inc]['partLength']) {
                                                                                $sText = $this->arrayHyperlinks[$itmHyperlink['id']]['text'];
                                                                                $sHyperlinkURL = $this->arrayHyperlinks[$itmHyperlink['id']]['url'];
                                        Severity: Major
                                        Found in src/PhpPresentation/Reader/PowerPoint97.php - About 45 mins to fix

                                          Avoid deeply nested control flow statements.
                                          Open

                                                                              if ($this->currentNote > 0 && isset($arrayIdxSlide[$this->currentNote])) {
                                                                                  $oSlide = $this->oPhpPresentation->getSlide($arrayIdxSlide[$this->currentNote]);
                                                                                  if (0 == count($oSlide->getNote()->getShapeCollection())) {
                                                                                      $oSlide->getNote()->addShape($fileBlock['shape']);
                                                                                  }
                                          Severity: Major
                                          Found in src/PhpPresentation/Reader/PowerPoint97.php - About 45 mins to fix

                                            Avoid deeply nested control flow statements.
                                            Open

                                                                        if (isset($clientTextbox['text' . $inc]['indent'])) {
                                                                            $indent = $clientTextbox['text' . $inc]['indent'];
                                                                        }
                                            Severity: Major
                                            Found in src/PhpPresentation/Reader/PowerPoint97.php - About 45 mins to fix

                                              Function readRecordOfficeArtClientData has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                              Open

                                                  private function readRecordOfficeArtClientData(string $stream, int $pos): array
                                                  {
                                                      $arrayReturn = [
                                                          'length' => 0,
                                                      ];
                                              Severity: Minor
                                              Found in src/PhpPresentation/Reader/PowerPoint97.php - About 45 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

                                              Avoid deeply nested control flow statements.
                                              Open

                                                                          if ($shadowOffsetX > 0 && $shadowOffsetX == $shadowOffsetY) {
                                                                              $arrayReturn['shape']->getShadow()->setDistance($shadowOffsetX)->setDirection(45);
                                                                          }
                                              Severity: Major
                                              Found in src/PhpPresentation/Reader/PowerPoint97.php - About 45 mins to fix

                                                Function loadPicturesStream has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                    private function loadPicturesStream(): void
                                                    {
                                                        $stream = $this->streamPictures;
                                                
                                                        $pos = 0;
                                                Severity: Minor
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php - About 45 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 readRecordOfficeArtBlip has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                    private function readRecordOfficeArtBlip(string $stream, int $pos): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                            'picture' => null,
                                                Severity: Minor
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php - About 25 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 readRecordUserEditAtom has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                    private function readRecordUserEditAtom(string $stream, int $pos): void
                                                    {
                                                        $rHeader = $this->loadRecordHeader($stream, $pos);
                                                        $pos += 8;
                                                        if (0x0 != $rHeader['recVer'] || 0x000 != $rHeader['recInstance'] || self::RT_USEREDITATOM != $rHeader['recType'] || (0x0000001C != $rHeader['recLen'] && 0x00000020 != $rHeader['recLen'])) {
                                                Severity: Minor
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php - About 25 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 loadPowerpointDocumentStream has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                    private function loadPowerpointDocumentStream(): void
                                                    {
                                                        $this->readRecordUserEditAtom($this->streamPowerpointDocument, $this->offsetToCurrentEdit);
                                                
                                                        $this->readRecordPersistDirectoryAtom($this->streamPowerpointDocument, $this->offsetPersistDirectory);
                                                Severity: Minor
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php - About 25 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 readStructureTextSIRun has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                Open

                                                    private function readStructureTextSIRun(string $stream, int $pos, int $strLenRT): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                            'strLenRT' => $strLenRT,
                                                Severity: Minor
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php - About 25 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

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

                                                                        if (0x0 == $friendlyNameAtom['recVer'] && 0x000 == $friendlyNameAtom['recInstance'] && self::RT_CSTRING == $friendlyNameAtom['recType'] && $friendlyNameAtom['recLen'] % 2 == 0) {
                                                                            $pos += 8;
                                                                            $exObjList['recLen'] -= 8;
                                                                            $this->arrayHyperlinks[$exHyperlinkId]['text'] = '';
                                                                            for ($inc = 0; $inc < ($friendlyNameAtom['recLen'] / 2); ++$inc) {
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 1 other location - About 4 hrs to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 791..801

                                                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 176.

                                                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

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

                                                                        if (0x0 == $targetAtom['recVer'] && 0x001 == $targetAtom['recInstance'] && self::RT_CSTRING == $targetAtom['recType'] && $targetAtom['recLen'] % 2 == 0) {
                                                                            $pos += 8;
                                                                            $exObjList['recLen'] -= 8;
                                                                            $this->arrayHyperlinks[$exHyperlinkId]['url'] = '';
                                                                            for ($inc = 0; $inc < ($targetAtom['recLen'] / 2); ++$inc) {
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 1 other location - About 4 hrs to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 778..788

                                                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 176.

                                                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

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

                                                                    case 0x0181:
                                                                        // Fill : fillColor
                                                                        //@link : http://msdn.microsoft.com/en-us/library/dd921332(v=office.12).aspx
                                                                        $strColor = str_pad(dechex(($opt['op'] >> 0) & bindec('11111111')), 2, '0', STR_PAD_LEFT);
                                                                        $strColor .= str_pad(dechex(($opt['op'] >> 8) & bindec('11111111')), 2, '0', STR_PAD_LEFT);
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 1 other location - About 3 hrs to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2145..2153

                                                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 161.

                                                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

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

                                                                    case 0x0183:
                                                                        // Fill : fillBackColor
                                                                        //@link : http://msdn.microsoft.com/en-us/library/dd950634(v=office.12).aspx
                                                                        $strColor = str_pad(dechex(($opt['op'] >> 0) & bindec('11111111')), 2, '0', STR_PAD_LEFT);
                                                                        $strColor .= str_pad(dechex(($opt['op'] >> 8) & bindec('11111111')), 2, '0', STR_PAD_LEFT);
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 1 other location - About 3 hrs to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2136..2144

                                                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 161.

                                                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

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

                                                    private function readRecordShapeFlags10Atom(string $stream, int $pos): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                        ];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 7 other locations - About 2 hrs to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 1066..1081
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2513..2528
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2561..2576
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2585..2600
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2657..2672
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2867..2882
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2947..2962

                                                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 122.

                                                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

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

                                                    private function readRecordPlaceholderAtom(string $stream, int $pos): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                        ];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 7 other locations - About 2 hrs to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 1066..1081
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2561..2576
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2585..2600
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2633..2648
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2657..2672
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2867..2882
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2947..2962

                                                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 122.

                                                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

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

                                                    private function readRecordRoundTripHFPlaceholder12Atom(string $stream, int $pos): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                        ];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 7 other locations - About 2 hrs to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 1066..1081
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2513..2528
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2585..2600
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2633..2648
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2657..2672
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2867..2882
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2947..2962

                                                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 122.

                                                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

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

                                                    private function readRecordShapeFlagsAtom(string $stream, int $pos): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                        ];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 7 other locations - About 2 hrs to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 1066..1081
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2513..2528
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2561..2576
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2585..2600
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2633..2648
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2867..2882
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2947..2962

                                                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 122.

                                                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

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

                                                    private function readRecordSlideNumberMCAtom(string $stream, int $pos): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                        ];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 7 other locations - About 2 hrs to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 1066..1081
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2513..2528
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2561..2576
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2585..2600
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2633..2648
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2657..2672
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2947..2962

                                                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 122.

                                                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

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

                                                    private function readRecordExObjRefAtom(string $stream, int $pos): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                        ];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 7 other locations - About 2 hrs to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2513..2528
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2561..2576
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2585..2600
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2633..2648
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2657..2672
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2867..2882
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2947..2962

                                                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 122.

                                                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

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

                                                    private function readRecordRoundTripShapeId12Atom(string $stream, int $pos): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                        ];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 7 other locations - About 2 hrs to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 1066..1081
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2513..2528
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2561..2576
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2633..2648
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2657..2672
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2867..2882
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2947..2962

                                                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 122.

                                                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

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

                                                    private function readRecordSlideShowSlideInfoAtom(string $stream, int $pos): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                        ];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 7 other locations - About 2 hrs to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 1066..1081
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2513..2528
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2561..2576
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2585..2600
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2633..2648
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2657..2672
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2867..2882

                                                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 122.

                                                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

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

                                                    private function readRecordDrawingGroupContainer(string $stream, int $pos): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                        ];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 5 other locations - About 1 hr to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2489..2504
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2537..2552
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2609..2624
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2681..2696
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2891..2906

                                                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 110.

                                                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

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

                                                    private function readRecordPerSlideHeadersFootersContainer(string $stream, int $pos): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                        ];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 5 other locations - About 1 hr to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 1043..1057
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2537..2552
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2609..2624
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2681..2696
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2891..2906

                                                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 110.

                                                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

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

                                                    private function readRecordSlideProgTagsContainer(string $stream, int $pos): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                        ];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 5 other locations - About 1 hr to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 1043..1057
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2489..2504
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2537..2552
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2609..2624
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2681..2696

                                                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 110.

                                                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

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

                                                    private function readRecordShapeProgBinaryTagContainer(string $stream, int $pos): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                        ];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 5 other locations - About 1 hr to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 1043..1057
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2489..2504
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2537..2552
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2609..2624
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2891..2906

                                                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 110.

                                                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

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

                                                    private function readRecordRecolorInfoAtom(string $stream, int $pos): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                        ];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 5 other locations - About 1 hr to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 1043..1057
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2489..2504
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2609..2624
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2681..2696
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2891..2906

                                                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 110.

                                                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

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

                                                    private function readRecordRoundTripSlideSyncInfo12Container(string $stream, int $pos): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                        ];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 5 other locations - About 1 hr to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 1043..1057
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2489..2504
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2537..2552
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2681..2696
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 2891..2906

                                                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 110.

                                                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

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

                                                    private function readRecordAnimationInfoContainer(string $stream, int $pos): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                        ];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 1 other location - About 1 hr to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 1188..1205

                                                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 102.

                                                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

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

                                                    private function readRecordMouseOverInteractiveInfoContainer(string $stream, int $pos): array
                                                    {
                                                        $arrayReturn = [
                                                            'length' => 0,
                                                        ];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 1 other location - About 1 hr to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 710..727

                                                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 102.

                                                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

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

                                                                    if (0x0 == $fontEmbedData2['recVer'] && $fontEmbedData2['recInstance'] >= 0x000 && $fontEmbedData2['recInstance'] <= 0x003 && self::RT_FONTEMBEDDATABLOB == $fontEmbedData2['recType']) {
                                                                        $pos += 8;
                                                                        $fontCollection['recLen'] -= 8;
                                                                        $pos += $fontEmbedData2['recLen'];
                                                                        $fontCollection['recLen'] -= $fontEmbedData2['recLen'];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 3 other locations - About 45 mins to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 877..882
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 893..898
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 901..906

                                                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 96.

                                                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

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

                                                                    if (0x0 == $fontEmbedData3['recVer'] && $fontEmbedData3['recInstance'] >= 0x000 && $fontEmbedData3['recInstance'] <= 0x003 && self::RT_FONTEMBEDDATABLOB == $fontEmbedData3['recType']) {
                                                                        $pos += 8;
                                                                        $fontCollection['recLen'] -= 8;
                                                                        $pos += $fontEmbedData3['recLen'];
                                                                        $fontCollection['recLen'] -= $fontEmbedData3['recLen'];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 3 other locations - About 45 mins to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 877..882
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 885..890
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 901..906

                                                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 96.

                                                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

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

                                                                    if (0x0 == $fontEmbedData1['recVer'] && $fontEmbedData1['recInstance'] >= 0x000 && $fontEmbedData1['recInstance'] <= 0x003 && self::RT_FONTEMBEDDATABLOB == $fontEmbedData1['recType']) {
                                                                        $pos += 8;
                                                                        $fontCollection['recLen'] -= 8;
                                                                        $pos += $fontEmbedData1['recLen'];
                                                                        $fontCollection['recLen'] -= $fontEmbedData1['recLen'];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 3 other locations - About 45 mins to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 885..890
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 893..898
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 901..906

                                                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 96.

                                                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

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

                                                                    if (0x0 == $fontEmbedData4['recVer'] && $fontEmbedData4['recInstance'] >= 0x000 && $fontEmbedData4['recInstance'] <= 0x003 && self::RT_FONTEMBEDDATABLOB == $fontEmbedData4['recType']) {
                                                                        $pos += 8;
                                                                        $fontCollection['recLen'] -= 8;
                                                                        $pos += $fontEmbedData4['recLen'];
                                                                        $fontCollection['recLen'] -= $fontEmbedData4['recLen'];
                                                Severity: Major
                                                Found in src/PhpPresentation/Reader/PowerPoint97.php and 3 other locations - About 45 mins to fix
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 877..882
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 885..890
                                                src/PhpPresentation/Reader/PowerPoint97.php on lines 893..898

                                                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 96.

                                                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

                                                There are no issues that match your filters.

                                                Category
                                                Status