src/Settings/Settings.php
protected function setKeyValue($key, $value)
    {
        $this->validateKeyValue($key, $value);

        if ($this->isDefault($key, $value) && $this->isSaved($key)) {
            return $this->deleteRecord($key);
        } elseif ($this->isDefault($key, $value)) {
            return;
        } elseif ($this->isSaved($key)) {
            return $this->updateRecord($key, $value);
        }

        return $this->createRecord($key, $value);
    }
protected function setKeyValue($key, $value)
    {
        $this->validateKeyValue($key, $value);

        if ($this->isDefault($key, $value) && $this->isSaved($key)) {
            return $this->deleteRecord($key);
        } elseif ($this->isDefault($key, $value)) {
            return;
        } elseif ($this->isSaved($key)) {
            return $this->updateRecord($key, $value);
        }

        return $this->createRecord($key, $value);
    }
protected function setKeyValue ( $ key , $ value ) { $ this -> validateKeyValue ( $ key , $ value ) ; if ( $ this -> isDefault ( $ key , $ value ) && $ this -> isSaved ( $ key ) ) { return $ this -> deleteRecord ( $ key ) ; } elseif ( $ this -> isDefault ( $ key , $ value ) ) { return ; } elseif ( $ this -> isSaved ( $ key ) ) { return $ this -> updateRecord ( $ key , $ value ) ; } return $ this -> createRecord ( $ key , $ value ) ; }
Set a value to a key in local and database settings.

@param string $key
@param mixed  $value

@return mixed
Set a value to a key in local and database settings .