protected function updatePreferencesForKey(string $key, Collection $tags)
	{
		$tags = str_replace('"', '', $tags->implode(','));

		$tags = Collection::make(explode(',', $tags))
			->merge(explode(',',$this->preferences[$key]))
			->unique()
			->take(self::MAX_TAGS)
			->implode(',');

		$this->preferences[$key] = rtrim($tags, ',');
	}
protected function updatePreferencesForKey(string $key, Collection $tags)
	{
		$tags = str_replace('"', '', $tags->implode(','));

		$tags = Collection::make(explode(',', $tags))
			->merge(explode(',',$this->preferences[$key]))
			->unique()
			->take(self::MAX_TAGS)
			->implode(',');

		$this->preferences[$key] = rtrim($tags, ',');
	}
protected function updatePreferencesForKey ( string $ key , Collection $ tags ) { $ tags = str_replace ( '"' , '' , $ tags -> implode ( ',' ) ) ; $ tags = Collection :: make ( explode ( ',' , $ tags ) ) -> merge ( explode ( ',' , $ this -> preferences [ $ key ] ) ) -> unique ( ) -> take ( self :: MAX_TAGS ) -> implode ( ',' ) ; $ this -> preferences [ $ key ] = rtrim ( $ tags , ',' ) ; }
Updates the user references for a given key.

@param  string $key
@param  Collection $tags

@return void
Updates the user references for a given key .