Your project should not contain commented code 2

More information: https://insight.symfony.com/what-we-analyse/php.commented_out_code

in src/TTFParser.php, line 519
  1. do {
  2. $flags = $this->readUShort();
  3. $index = $this->readUShort();
  4. $components[$offset + 2] = $index;
  5. if ($this->isBitSet($flags, 1)) { // ARG_1_AND_2_ARE_WORDS
  6. $skip = 4; // 2 * 2;

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Read doc Open Issue Permalink
    Last edited by Laurent Muller
  7. } else {
  8. $skip = 2;
  9. }
  10. if ($this->isBitSet($flags, 8)) { // WE_HAVE_A_SCALE
  11. $skip += 2;
in src/TTFParser.php, line 528
  1. if ($this->isBitSet($flags, 8)) { // WE_HAVE_A_SCALE
  2. $skip += 2;
  3. } elseif ($this->isBitSet($flags, 64)) { // WE_HAVE_AN_X_AND_Y_SCALE
  4. $skip += 4; // 2 * 2
  5. } elseif ($this->isBitSet($flags, 128)) { // WE_HAVE_A_TWO_BY_TWO
  6. $skip += 8; // 4 * 2;

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Read doc Open Issue Permalink
    Last edited by Laurent Muller
  7. }
  8. $this->skip($skip);
  9. $offset += 2 * 2 + $skip;
  10. } while ($flags & 32); // MORE COMPONENTS
  11. $glyph['components'] = $components;