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

Add a storeOriginalConfiguration method #196

Merged
merged 4 commits into from
Sep 21, 2018
Merged

Add a storeOriginalConfiguration method #196

merged 4 commits into from
Sep 21, 2018

Conversation

jonathanjfshaw
Copy link
Contributor

Adds a helper method to avoid overwriting original configuration, that stores a value to the original configuration store only if no such value has previously been stored.

Don't store overwrite original configuration.
@jonathanjfshaw
Copy link
Contributor Author

Fixes #195, from #182.

@jonathanjfshaw
Copy link
Contributor Author

I've not tested it properly.

$this->originalConfiguration[$name] = $value;
return TRUE;
}
return ($this->originalConfiguration[$name] === $value);
Copy link
Owner

Choose a reason for hiding this comment

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

Is there a reason to have a return value at all here? It doesn't appear to be used in this change...

@jonathanjfshaw
Copy link
Contributor Author

jonathanjfshaw commented Aug 27, 2018 via email

@jhedstrom
Copy link
Owner

Yeah, can you remove it and then update the docblock comment to make it clear that the value will only be set if it isn't already (and perhaps the reasoning for this)? If we need a return value in the future it can always be added I think.

@jonathanjfshaw
Copy link
Contributor Author

Done

@jhedstrom jhedstrom merged commit 724789d into jhedstrom:master Sep 21, 2018
@jhedstrom
Copy link
Owner

Thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants