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: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"> xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<rule ref="rulesets/naming.xml"> <rule ref="rulesets/naming.xml">
<exclude name="ShortVariable" />
<exclude name="ShortClassName" />
<exclude name="LongVariable" /> <exclude name="LongVariable" />
</rule> </rule>
<rule ref="rulesets/naming.xml/LongVariable"> <rule ref="rulesets/naming.xml/LongVariable">

View File

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

View File

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