Code Duplication    Length = 9-9 lines in 2 locations

core/Container/Block_Container.php 2 locations

@@ 314-322 (lines=9) @@
311
	 * @param  string $position
312
	 * @return Block_Container
313
	 */
314
	public function set_inner_blocks_position( $position = 'above' ) {
315
		if ( ! in_array( $position, [ 'above', 'below' ] ) ) {
316
			throw new \Exception( __( "The position of inner blocks must be 'above' or 'below'.", 'crb' ) );
317
		}
318
319
		$this->settings[ 'inner_blocks' ][ 'position' ] = $position;
320
321
		return $this;
322
	}
323
324
	/**
325
	 * Set the default template that should be rendered in inner blocks.
@@ 350-358 (lines=9) @@
347
	 * @param  string|boolean|null $lock
348
	 * @return Block_Container
349
	 */
350
	public function set_inner_blocks_template_lock( $lock = null ) {
351
		if ( is_string( $lock ) && ! in_array( $lock, [ 'all', 'insert' ] ) ) {
352
			throw new \Exception( __( "The template lock must be 'all', 'insert', 'false' or 'null'.", 'crb' ) );
353
		}
354
355
		$this->settings[ 'inner_blocks' ][ 'template_lock' ] = $lock;
356
357
		return $this;
358
	}
359
360
	/**
361
	 * Set the list of allowed blocks that can be inserted.