Code Duplication    Length = 8-10 lines in 2 locations

core/Container/Nav_Menu_Item_Container.php 1 location

@@ 83-90 (lines=8) @@
80
	 * Perform save operation after successful is_valid_save() check.
81
	 * The call is propagated to all fields in the container.
82
	 */
83
	public function save( $data = null ) {
84
		foreach ( $this->fields as $field ) {
85
			$field->set_value_from_input( Helper::input() );
86
			$field->save();
87
		}
88
89
		do_action( 'carbon_fields_nav_menu_item_container_saved', $this );
90
	}
91
92
	/**
93
	 * {@inheritDoc}

core/Container/Term_Meta_Container.php 1 location

@@ 68-77 (lines=10) @@
65
	 *
66
	 * @param int $term_id ID of the term against which save() is ran
67
	 */
68
	public function save( $term_id = null ) {
69
		$this->set_term_id( $term_id );
70
71
		foreach ( $this->fields as $field ) {
72
			$field->set_value_from_input( Helper::input() );
73
			$field->save();
74
		}
75
76
		do_action( 'carbon_fields_term_meta_container_saved', $term_id, $this );
77
	}
78
79
	/**
80
	 * Get environment array for page request (in admin)