Code Duplication    Length = 7-7 lines in 3 locations

core/Container/Comment_Meta_Container.php 1 location

@@ 18-24 (lines=7) @@
15
	/**
16
	 * {@inheritDoc}
17
	 */
18
	public function __construct( $id, $title, $type, $condition_collection, $condition_translator ) {
19
		parent::__construct( $id, $title, $type, $condition_collection, $condition_translator );
20
21
		if ( ! $this->get_datastore() ) {
22
			$this->set_datastore( Datastore::make( 'comment_meta' ), $this->has_default_datastore() );
23
		}
24
	}
25
26
	/**
27
	 * Perform instance initialization

core/Container/Post_Meta_Container.php 1 location

@@ 36-42 (lines=7) @@
33
	/**
34
	 * {@inheritDoc}
35
	 */
36
	public function __construct( $id, $title, $type, $condition_collection, $condition_translator ) {
37
		parent::__construct( $id, $title, $type, $condition_collection, $condition_translator );
38
39
		if ( ! $this->get_datastore() ) {
40
			$this->set_datastore( Datastore::make( 'post_meta' ), $this->has_default_datastore() );
41
		}
42
	}
43
44
	/**
45
	 * Create DataStore instance, set post ID to operate with (if such exists).

core/Container/Term_Meta_Container.php 1 location

@@ 19-25 (lines=7) @@
16
	/**
17
	 * {@inheritDoc}
18
	 */
19
	public function __construct( $id, $title, $type, $condition_collection, $condition_translator ) {
20
		parent::__construct( $id, $title, $type, $condition_collection, $condition_translator );
21
22
		if ( ! $this->get_datastore() ) {
23
			$this->set_datastore( Datastore::make( 'term_meta' ), $this->has_default_datastore() );
24
		}
25
	}
26
27
	/**
28
	 * Bind attach() and save() to the appropriate WordPress actions.