-
Notifications
You must be signed in to change notification settings - Fork 2.7k
#160 refactoring: Merge TableFull-Table Style + Merge MemoryImage-Image #169
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
Conversation
$this->_elementCollection[] = $image; | ||
return $image; | ||
} else { | ||
throw new Exception('Src does not exist or invalid image type.'); | ||
throw new Exception('Source does not exist or unsupported image type.'); |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Else very good job.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
#160 refactoring: Merge TableFull-Table Style + Merge MemoryImage-Image
Guys, this is part of #160. I propose merging TableFull-Table style and MemoryImage-Image
Benefits:
Consequences:
addMemoryImage
is deprecatedPlease review. Thanks.