compatibility with phpmd 2.9

This commit is contained in:
Libor M 2020-10-17 13:39:22 +02:00
parent adb917273c
commit e334ecf059
3 changed files with 13 additions and 11 deletions

View File

@ -5,6 +5,8 @@
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<rule ref="rulesets/naming.xml">
<exclude name="ShortVariable" />
<exclude name="ShortClassName" />
<exclude name="LongVariable" />
</rule>
<rule ref="rulesets/naming.xml/LongVariable">

View File

@ -1581,7 +1581,7 @@ class MsDoc extends AbstractReader implements ReaderInterface
// Variables
$sprmCPicLocation = null;
$sprmCFData = null;
$sprmCFSpec = null;
//$sprmCFSpec = null;
do {
// Variables
@ -1830,7 +1830,7 @@ class MsDoc extends AbstractReader implements ReaderInterface
break;
// sprmCFSpec
case 0x55:
$sprmCFSpec = $operand;
//$sprmCFSpec = $operand;
break;
// sprmCFtcBi
case 0x5E:
@ -2094,11 +2094,11 @@ class MsDoc extends AbstractReader implements ReaderInterface
$sprmCPicLocation += 1;
// stPicName
$stPicName = '';
//$stPicName = '';
for ($inc = 0; $inc <= $cchPicName; $inc++) {
$chr = self::getInt1d($this->dataData, $sprmCPicLocation);
//$chr = self::getInt1d($this->dataData, $sprmCPicLocation);
$sprmCPicLocation += 1;
$stPicName .= chr($chr);
//$stPicName .= chr($chr);
}
}
@ -2143,11 +2143,11 @@ class MsDoc extends AbstractReader implements ReaderInterface
$sprmCPicLocation += 1;
// nameData
if ($cbName > 0) {
$nameData = '';
//$nameData = '';
for ($inc = 0; $inc <= ($cbName / 2); $inc++) {
$chr = self::getInt2d($this->dataData, $sprmCPicLocation);
//$chr = self::getInt2d($this->dataData, $sprmCPicLocation);
$sprmCPicLocation += 2;
$nameData .= chr($chr);
//$nameData .= chr($chr);
}
}
// embeddedBlip

View File

@ -99,10 +99,10 @@ class TableTest extends \PHPUnit\Framework\TestCase
{
$oTable = new Table();
$oTable->addRow();
$element = $oTable->addCell();
$oTable->addCell();
$this->assertEquals($oTable->countColumns(), 1);
$element = $oTable->addCell();
$element = $oTable->addCell();
$oTable->addCell();
$oTable->addCell();
$this->assertEquals($oTable->countColumns(), 3);
}
}