Skip to content

Conversation

hultberg
Copy link
Contributor

@hultberg hultberg commented May 23, 2018

Description

Methods addFontStyle, addParagraphStyle, addLinkStyle, addNumberingStyle, addTitleStyle, and setDefaultParagraphStyle does allow \PhpOffice\PhpWord\Style\AbstractStyle to be passed as Style::setStyleValues checks for this on line 193.

Checklist:

  • I have run composer run-script check --timeout=0 and no errors were reported
  • The new code is covered by unit tests (check build/coverage for coverage report)
  • I have update the documentation to describe the changes

Methods `addFontStyle`, `addParagraphStyle`, `addLinkStyle`, `addNumberingStyle, `addTitleStyle`, and `setDefaultParagraphStyle` does allow `\PhpOffice\PhpWord\Style\AbstractStyle` to be passed as `Style::setStyleValues` checks for this on line 193.
@troosan
Copy link
Contributor

troosan commented May 23, 2018

@hultberg
Copy link
Contributor Author

@troosan I have changed the documentation of Font::__constructor now.

@hultberg
Copy link
Contributor Author

@troosan I have also changed to allow null on $depth on Style::addTitleStyle

@troosan
Copy link
Contributor

troosan commented May 24, 2018

public static function addTitleStyle($depth, $fontStyle, $paragraphStyle = null)
{
if ($depth === null) {
if ($depth === null || $depth === '' || $depth === 0) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we just use empty($depth) here? it would catch all these cases.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed, that would definitely be cleaner

@hultberg
Copy link
Contributor Author

@troosan Looks like php 5.3 travis CV fails during composer install here as on develop branch.

@troosan
Copy link
Contributor

troosan commented May 29, 2018

indeed, it seems finding the dependencies for (and with) php 5.3 is consuming a lot of memory (1.5Gb).
I'll try to restrict the ranges a bit for 5.3

@troosan troosan merged commit 82f3a2a into PHPOffice:develop May 30, 2018
@hultberg hultberg deleted the patch-1 branch May 31, 2018 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants