Skip to content

Conversation

@ivanlanin
Copy link
Contributor

Guys, this is part of #160. I propose merging TableFull-Table style and MemoryImage-Image

Benefits:

  • Easier to maintain and enhance
  • Reduce code repetition
  • Allow more features

Consequences:

  • Style\TableFull and Section\MemoryImage is deprecated
  • addMemoryImage is deprecated

Please review. Thanks.

@ivanlanin ivanlanin added the Pull label Mar 25, 2014
Copy link
Member

Choose a reason for hiding this comment

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

Maybe could you create a new PHPWord Exception ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. Agree.

Copy link
Member

Choose a reason for hiding this comment

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

Else very good job.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I change to InvalidImageException, but I can't create any test case where this will happen since all exceptions will have been handled by the Image class. If this is the case, can we remove this if .. then structure?

Copy link
Member

Choose a reason for hiding this comment

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

If we can't in any case access to the code, you can delete this, because it's a zombie code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. Thanks. I guess that's also the benefit of forcing ourself to create unit tests for our own code: remove useless parts of code.

Copy link
Member

Choose a reason for hiding this comment

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

Exactly :) Good job for your refactoring :) For me, you can merge.

@Progi1984 Progi1984 added this to the 0.9.0 milestone Mar 25, 2014
ivanlanin added a commit that referenced this pull request Mar 26, 2014
#160 refactoring: Merge TableFull-Table Style + Merge MemoryImage-Image
@ivanlanin ivanlanin merged commit 004edd5 into PHPOffice:develop Mar 26, 2014
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