Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and unit test PHPWord_Style_Font #93

Merged
merged 3 commits into from
Mar 9, 2014

Conversation

ivanlanin
Copy link
Contributor

For consistency, we will use points instead of halfpoints. The size will be converted to halfpoints during XML writing. I've checked and corrected all usages. I also introduce DEFAULT_FONT_COLOR constant instead of hardcoded '000000'.

PHP_Style_Font is now in 100% coverage.

@@ -40,7 +40,8 @@ class PHPWord
{

const DEFAULT_FONT_NAME = 'Arial';
const DEFAULT_FONT_SIZE = 20;
const DEFAULT_FONT_SIZE = 10;
Copy link
Member

Choose a reason for hiding this comment

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

Why do you change again 😉 the default size ?

@Progi1984 Progi1984 added this to the 0.7.1 milestone Mar 9, 2014
@ivanlanin
Copy link
Contributor Author

The "old" default font size was defined in halfpoints. Now we define it in points. It's the same: 10 (points) * 2 = 20 (halfpoints).

@Progi1984
Copy link
Member

Could you add a comment to the constant for understanding the unit of the const ? Thanks ;)

@ivanlanin
Copy link
Contributor Author

Ok. Done. Thanks for reminding.

@Progi1984
Copy link
Member

I merge it now :)

Progi1984 added a commit that referenced this pull request Mar 9, 2014
Refactor and unit test PHPWord_Style_Font
@Progi1984 Progi1984 merged commit 9bae85e into PHPOffice:develop Mar 9, 2014
@ivanlanin
Copy link
Contributor Author

Thanks. Should I write the refactoring to the changelog?

@Progi1984
Copy link
Member

As you want for this ;) or add it in the next pull request :)

@ivanlanin
Copy link
Contributor Author

I'll add it to the next request :)

By the way, do we want to remove the underscore prefix for private properties/methods name on this version? I see that's one of the source of error reported by Travis.

@Progi1984
Copy link
Member

As you want, but the first step stays unit tests and issues fixing.

@ivanlanin
Copy link
Contributor Author

Ok. I'll stay with unit tests and issues fixing.

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