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 (WP-874) #519

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

refactor (WP-874) #519

wants to merge 5 commits into from

Conversation

vsolovei-smartling
Copy link
Contributor

Controversial, because on one side, I'm not a fan of the god object. On the other side, however, having traits that pretend they're usable without the root object makes it really harder to write tests and understand code in general.

# Conflicts:
#	inc/Smartling/Base/SmartlingCoreTrait.php
#	tests/Smartling/Base/SmartlingCoreTest.php
#	tests/Smartling/Base/SmartlingCoreUploadTraitTest.php
Copy link
Contributor

@PavelLoparev PavelLoparev left a comment

Choose a reason for hiding this comment

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

I'm afraid of such refactorings. But if all tests are passed then I'm ok

Comment on lines -96 to +98
$this->getContentHelper()->ensureTargetBlogId($submission);
$this->siteHelper->withBlog($submission->getTargetBlogId(), function () use ($submission) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It was ensureTargetBlogId now it's withBlog, is it expected change? I thought you've just got rid of traits and moved everything inside classes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants