Skip to content
This repository has been archived by the owner on Jun 16, 2020. It is now read-only.

Removing setters from Store #2

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

Conversation

euantorano
Copy link
Member

Creating, updating and deleting settings should instead be handled by the repository. This simplifies the store greatly.

The database store can be updated in the future to use the repository too, but for now I'm keeping it simple.

Signed-off-by: Euan Torano [email protected]

Creating, updating and deleting settings should instead be handled by the repository. This simplifies the store greatly.

The database store can be updated in the future to use the repository too, but for now I'm keeping it simple.

Signed-off-by: Euan Torano <[email protected]>
Signed-off-by: Euan Torano <[email protected]>
Signed-off-by: Euan Torano <[email protected]>
Signed-off-by: Euan Torano <[email protected]>
*/
public function update(array $name, $userId = SettingRepositoryInterface::USER_NONE, $package = 'mybb/core')
{
$user = $userId = (int)$userId;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it really necessary to have $user and $userId here? Could be simply $userId which is set to null in the if below.

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

Successfully merging this pull request may close these issues.

2 participants