Scrutinizer fixes
This commit is contained in:
parent
6a460c292d
commit
23bc837666
@ -1,14 +1,20 @@
|
||||
#!/bin/bash
|
||||
echo "Running composer update"
|
||||
composer update
|
||||
|
||||
## PHP_CodeSniffer
|
||||
echo "Running CodeSniffer"
|
||||
./vendor/bin/phpcs src/ tests/ --standard=PSR2 -n --ignore=src/PhpWord/Shared/PCLZip
|
||||
|
||||
## PHP-CS-Fixer
|
||||
echo "Running CS Fixer"
|
||||
./vendor/bin/php-cs-fixer fix --diff --verbose --dry-run
|
||||
|
||||
## PHP Mess Detector
|
||||
echo "Running Mess Detector"
|
||||
./vendor/bin/phpmd src/,tests/ text ./phpmd.xml.dist --exclude pclzip.lib.php
|
||||
|
||||
## PHPUnit
|
||||
./vendor/bin/phpunit -c ./ --no-coverage
|
||||
echo "Running PHPUnit"
|
||||
./vendor/bin/phpunit -c ./
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ class Field extends AbstractElement
|
||||
/**
|
||||
* Field text
|
||||
*
|
||||
* @var TextRun | string
|
||||
* @var TextRun|string
|
||||
*/
|
||||
protected $text;
|
||||
|
||||
@ -98,7 +98,7 @@ class Field extends AbstractElement
|
||||
* @param string $type
|
||||
* @param array $properties
|
||||
* @param array $options
|
||||
* @param TextRun | string $text
|
||||
* @param TextRun|string $text
|
||||
*/
|
||||
public function __construct($type = null, $properties = array(), $options = array(), $text = null)
|
||||
{
|
||||
|
||||
@ -37,7 +37,7 @@ class TrackChange extends AbstractContainer
|
||||
/**
|
||||
* Date
|
||||
*
|
||||
* @var DateTime
|
||||
* @var \DateTime
|
||||
*/
|
||||
private $date;
|
||||
|
||||
|
||||
@ -150,11 +150,11 @@ class Settings extends AbstractPart
|
||||
protected function setRevisionView(XMLReader $xmlReader, PhpWord $phpWord, \DOMElement $node)
|
||||
{
|
||||
$revisionView = new TrackChangesView();
|
||||
$revisionView->setMarkup($xmlReader->getAttribute('w:markup', $node));
|
||||
$revisionView->setMarkup(filter_var($xmlReader->getAttribute('w:markup', $node), FILTER_VALIDATE_BOOLEAN));
|
||||
$revisionView->setComments($xmlReader->getAttribute('w:comments', $node));
|
||||
$revisionView->setInsDel($xmlReader->getAttribute('w:insDel', $node));
|
||||
$revisionView->setFormatting($xmlReader->getAttribute('w:formatting', $node));
|
||||
$revisionView->setInkAnnotations($xmlReader->getAttribute('w:inkAnnotations', $node));
|
||||
$revisionView->setFormatting(filter_var($xmlReader->getAttribute('w:formatting', $node), FILTER_VALIDATE_BOOLEAN));
|
||||
$revisionView->setInkAnnotations(filter_var($xmlReader->getAttribute('w:inkAnnotations', $node), FILTER_VALIDATE_BOOLEAN));
|
||||
$phpWord->getSettings()->setRevisionView($revisionView);
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ abstract class AbstractEnum
|
||||
/**
|
||||
* Returns true the value is valid for this enum
|
||||
*
|
||||
* @param strign $value
|
||||
* @param string $value
|
||||
* @return bool true if value is valid
|
||||
*/
|
||||
public static function isValid($value)
|
||||
|
||||
@ -351,7 +351,7 @@ class ZipArchive
|
||||
* Returns the name of an entry using its index (emulate \ZipArchive)
|
||||
*
|
||||
* @param int $index
|
||||
* @return string
|
||||
* @return string|bool
|
||||
* @since 0.10.0
|
||||
*/
|
||||
public function pclzipGetNameIndex($index)
|
||||
|
||||
@ -18,7 +18,6 @@
|
||||
namespace PhpOffice\PhpWord\Writer\ODText\Element;
|
||||
|
||||
use PhpOffice\PhpWord\Exception\Exception;
|
||||
use PhpOffice\PhpWord\Settings;
|
||||
|
||||
/**
|
||||
* Text element writer
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user