Code Duplication    Length = 11-11 lines in 2 locations

src/classes/installable.php 2 locations

@@ 191-201 (lines=11) @@
188
	 * @param string $option The name of the option to set.
189
	 * @param mixed  $value  The value of the option.
190
	 */
191
	protected function set_option( $option, $value = true ) {
192
193
		$data = wordpoints_get_array_option(
194
			"wordpoints_{$option}"
195
			, 'site'
196
		);
197
198
		$data[ $this->type ][ $this->slug ] = $value;
199
200
		update_site_option( "wordpoints_{$option}", $data );
201
	}
202
203
	/**
204
	 * Deletes an option in the database for this entity.
@@ 210-220 (lines=11) @@
207
	 *
208
	 * @param string $option The name of the option to delete.
209
	 */
210
	protected function unset_option( $option ) {
211
212
		$data = wordpoints_get_array_option(
213
			"wordpoints_{$option}"
214
			, 'site'
215
		);
216
217
		unset( $data[ $this->type ][ $this->slug ] );
218
219
		update_site_option( "wordpoints_{$option}", $data );
220
	}
221
222
	/**
223
	 * @since 2.4.0