Update documentation for Style::add*Style methods (#1383)
* Update documentation for Style::add*Style methods * remove phpDocumentor, simplify dependencies
This commit is contained in:
parent
e02c5f74e6
commit
82f3a2ab44
|
|
@ -37,7 +37,7 @@ before_script:
|
||||||
- composer self-update
|
- composer self-update
|
||||||
- travis_wait composer install --prefer-source
|
- travis_wait composer install --prefer-source
|
||||||
## PHPDocumentor
|
## PHPDocumentor
|
||||||
- mkdir -p build/docs
|
##- mkdir -p build/docs
|
||||||
- mkdir -p build/coverage
|
- mkdir -p build/coverage
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
|
@ -52,7 +52,7 @@ script:
|
||||||
## PHPLOC
|
## PHPLOC
|
||||||
- if [ -z "$COVERAGE" ]; then ./vendor/bin/phploc src/ ; fi
|
- if [ -z "$COVERAGE" ]; then ./vendor/bin/phploc src/ ; fi
|
||||||
## PHPDocumentor
|
## PHPDocumentor
|
||||||
- if [ -z "$COVERAGE" ]; then ./vendor/bin/phpdoc -q -d ./src -t ./build/docs --ignore "*/src/PhpWord/Shared/*/*" --template="responsive-twig" ; fi
|
##- if [ -z "$COVERAGE" ]; then ./vendor/bin/phpdoc -q -d ./src -t ./build/docs --ignore "*/src/PhpWord/Shared/*/*" --template="responsive-twig" ; fi
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
## Coveralls
|
## Coveralls
|
||||||
|
|
|
||||||
|
|
@ -65,14 +65,13 @@
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^4.8.36 || ^5.0",
|
"phpunit/phpunit": "^4.8.36 || ^5.0",
|
||||||
"phpdocumentor/phpdocumentor":"2.*",
|
"squizlabs/php_codesniffer": "^2.9",
|
||||||
"squizlabs/php_codesniffer": "^2.7",
|
"friendsofphp/php-cs-fixer": "^2.2",
|
||||||
"friendsofphp/php-cs-fixer": "^2.0",
|
|
||||||
"phpmd/phpmd": "2.*",
|
"phpmd/phpmd": "2.*",
|
||||||
"phploc/phploc": "2.* || 3.* || 4.*",
|
"phploc/phploc": "2.* || 3.* || 4.*",
|
||||||
"dompdf/dompdf":"0.8.*",
|
"dompdf/dompdf":"0.8.*",
|
||||||
"tecnickcom/tcpdf": "6.*",
|
"tecnickcom/tcpdf": "6.*",
|
||||||
"mpdf/mpdf": "5.* || 6.* || 7.*",
|
"mpdf/mpdf": "5.7.4 || 6.* || 7.*",
|
||||||
"php-coveralls/php-coveralls": "1.1.0 || ^2.0"
|
"php-coveralls/php-coveralls": "1.1.0 || ^2.0"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
|
|
|
||||||
|
|
@ -347,7 +347,7 @@ abstract class AbstractElement
|
||||||
*
|
*
|
||||||
* @param \PhpOffice\PhpWord\Element\AbstractElement $container
|
* @param \PhpOffice\PhpWord\Element\AbstractElement $container
|
||||||
*/
|
*/
|
||||||
public function setParentContainer(AbstractElement $container)
|
public function setParentContainer(self $container)
|
||||||
{
|
{
|
||||||
$this->parentContainer = substr(get_class($container), strrpos(get_class($container), '\\') + 1);
|
$this->parentContainer = substr(get_class($container), strrpos(get_class($container), '\\') + 1);
|
||||||
$this->parent = $container;
|
$this->parent = $container;
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,10 @@ use PhpOffice\PhpWord\Exception\Exception;
|
||||||
* @method int addChart(Element\Chart $chart)
|
* @method int addChart(Element\Chart $chart)
|
||||||
* @method int addComment(Element\Comment $comment)
|
* @method int addComment(Element\Comment $comment)
|
||||||
*
|
*
|
||||||
* @method Style\Paragraph addParagraphStyle(string $styleName, array $styles)
|
* @method Style\Paragraph addParagraphStyle(string $styleName, mixed $styles)
|
||||||
* @method Style\Font addFontStyle(string $styleName, mixed $fontStyle, mixed $paragraphStyle = null)
|
* @method Style\Font addFontStyle(string $styleName, mixed $fontStyle, mixed $paragraphStyle = null)
|
||||||
* @method Style\Font addLinkStyle(string $styleName, mixed $styles)
|
* @method Style\Font addLinkStyle(string $styleName, mixed $styles)
|
||||||
* @method Style\Font addTitleStyle(int $depth, mixed $fontStyle, mixed $paragraphStyle = null)
|
* @method Style\Font addTitleStyle(mixed $depth, mixed $fontStyle, mixed $paragraphStyle = null)
|
||||||
* @method Style\Table addTableStyle(string $styleName, mixed $styleTable, mixed $styleFirstRow = null)
|
* @method Style\Table addTableStyle(string $styleName, mixed $styleTable, mixed $styleFirstRow = null)
|
||||||
* @method Style\Numbering addNumberingStyle(string $styleName, mixed $styles)
|
* @method Style\Numbering addNumberingStyle(string $styleName, mixed $styles)
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ class Style
|
||||||
* Add paragraph style
|
* Add paragraph style
|
||||||
*
|
*
|
||||||
* @param string $styleName
|
* @param string $styleName
|
||||||
* @param array $styles
|
* @param array|\PhpOffice\PhpWord\Style\AbstractStyle $styles
|
||||||
* @return \PhpOffice\PhpWord\Style\Paragraph
|
* @return \PhpOffice\PhpWord\Style\Paragraph
|
||||||
*/
|
*/
|
||||||
public static function addParagraphStyle($styleName, $styles)
|
public static function addParagraphStyle($styleName, $styles)
|
||||||
|
|
@ -51,8 +51,8 @@ class Style
|
||||||
* Add font style
|
* Add font style
|
||||||
*
|
*
|
||||||
* @param string $styleName
|
* @param string $styleName
|
||||||
* @param array $fontStyle
|
* @param array|\PhpOffice\PhpWord\Style\AbstractStyle $fontStyle
|
||||||
* @param array $paragraphStyle
|
* @param array|\PhpOffice\PhpWord\Style\AbstractStyle $paragraphStyle
|
||||||
* @return \PhpOffice\PhpWord\Style\Font
|
* @return \PhpOffice\PhpWord\Style\Font
|
||||||
*/
|
*/
|
||||||
public static function addFontStyle($styleName, $fontStyle, $paragraphStyle = null)
|
public static function addFontStyle($styleName, $fontStyle, $paragraphStyle = null)
|
||||||
|
|
@ -64,7 +64,7 @@ class Style
|
||||||
* Add link style
|
* Add link style
|
||||||
*
|
*
|
||||||
* @param string $styleName
|
* @param string $styleName
|
||||||
* @param array $styles
|
* @param array|\PhpOffice\PhpWord\Style\AbstractStyle $styles
|
||||||
* @return \PhpOffice\PhpWord\Style\Font
|
* @return \PhpOffice\PhpWord\Style\Font
|
||||||
*/
|
*/
|
||||||
public static function addLinkStyle($styleName, $styles)
|
public static function addLinkStyle($styleName, $styles)
|
||||||
|
|
@ -76,7 +76,7 @@ class Style
|
||||||
* Add numbering style
|
* Add numbering style
|
||||||
*
|
*
|
||||||
* @param string $styleName
|
* @param string $styleName
|
||||||
* @param array $styleValues
|
* @param array|\PhpOffice\PhpWord\Style\AbstractStyle $styleValues
|
||||||
* @return \PhpOffice\PhpWord\Style\Numbering
|
* @return \PhpOffice\PhpWord\Style\Numbering
|
||||||
* @since 0.10.0
|
* @since 0.10.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -88,14 +88,14 @@ class Style
|
||||||
/**
|
/**
|
||||||
* Add title style
|
* Add title style
|
||||||
*
|
*
|
||||||
* @param int $depth
|
* @param int|null $depth Provide null to set title font
|
||||||
* @param array $fontStyle
|
* @param array|\PhpOffice\PhpWord\Style\AbstractStyle $fontStyle
|
||||||
* @param array $paragraphStyle
|
* @param array|\PhpOffice\PhpWord\Style\AbstractStyle $paragraphStyle
|
||||||
* @return \PhpOffice\PhpWord\Style\Font
|
* @return \PhpOffice\PhpWord\Style\Font
|
||||||
*/
|
*/
|
||||||
public static function addTitleStyle($depth, $fontStyle, $paragraphStyle = null)
|
public static function addTitleStyle($depth, $fontStyle, $paragraphStyle = null)
|
||||||
{
|
{
|
||||||
if ($depth == null) {
|
if (empty($depth)) {
|
||||||
$styleName = 'Title';
|
$styleName = 'Title';
|
||||||
} else {
|
} else {
|
||||||
$styleName = "Heading_{$depth}";
|
$styleName = "Heading_{$depth}";
|
||||||
|
|
@ -141,7 +141,7 @@ class Style
|
||||||
/**
|
/**
|
||||||
* Set default paragraph style
|
* Set default paragraph style
|
||||||
*
|
*
|
||||||
* @param array $styles Paragraph style definition
|
* @param array|\PhpOffice\PhpWord\Style\AbstractStyle $styles Paragraph style definition
|
||||||
* @return \PhpOffice\PhpWord\Style\Paragraph
|
* @return \PhpOffice\PhpWord\Style\Paragraph
|
||||||
*/
|
*/
|
||||||
public static function setDefaultParagraphStyle($styles)
|
public static function setDefaultParagraphStyle($styles)
|
||||||
|
|
|
||||||
|
|
@ -264,7 +264,7 @@ class Font extends AbstractStyle
|
||||||
* Create new font style
|
* Create new font style
|
||||||
*
|
*
|
||||||
* @param string $type Type of font
|
* @param string $type Type of font
|
||||||
* @param array $paragraph Paragraph styles definition
|
* @param array|string|\PhpOffice\PhpWord\Style\AbstractStyle $paragraph Paragraph styles definition
|
||||||
*/
|
*/
|
||||||
public function __construct($type = 'text', $paragraph = null)
|
public function __construct($type = 'text', $paragraph = null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue