Code Duplication    Length = 8-8 lines in 3 locations

core/Provider/Container_Condition_Provider.php 3 locations

@@ 135-142 (lines=8) @@
132
			$condition->set_comparers( $ioc['container_condition_comparer_collections']['array'] );
133
			return $condition;
134
		} );
135
		$cc_ioc['user_capabiltiy'] = $cc_ioc->factory( function() use ( $ioc ) {
136
			$condition = new \Carbon_Fields\Container\Condition\User_Capability_Condition();
137
			$condition->set_comparers( array(
138
				// Only support the custom comparer as this condition has it's own comparison methods
139
				$ioc['container_condition_comparers']['custom'],
140
			) );
141
			return $condition;
142
		} );
143
144
		$cc_ioc['blog_id'] = $cc_ioc->factory( function() use ( $ioc ) {
145
			$condition = new \Carbon_Fields\Container\Condition\Blog_ID_Condition();
@@ 155-162 (lines=8) @@
152
			$condition->set_comparers( $ioc['container_condition_comparer_collections']['generic'] );
153
			return $condition;
154
		} );
155
		$cc_ioc['current_user_role'] = $cc_ioc->factory( function() use ( $ioc ) {
156
			$condition = new \Carbon_Fields\Container\Condition\Current_User_Role_Condition();
157
			$condition->set_comparers( array(
158
				// Only support the custom comparer as this condition has it's own comparison methods
159
				$ioc['container_condition_comparers']['custom'],
160
			) );
161
			return $condition;
162
		} );
163
		$cc_ioc['current_user_capability'] = $cc_ioc->factory( function() use ( $ioc ) {
164
			$condition = new \Carbon_Fields\Container\Condition\Current_User_Capability_Condition();
165
			$condition->set_comparers( array(
@@ 163-170 (lines=8) @@
160
			) );
161
			return $condition;
162
		} );
163
		$cc_ioc['current_user_capability'] = $cc_ioc->factory( function() use ( $ioc ) {
164
			$condition = new \Carbon_Fields\Container\Condition\Current_User_Capability_Condition();
165
			$condition->set_comparers( array(
166
				// Only support the custom comparer as this condition has it's own comparison methods
167
				$ioc['container_condition_comparers']['custom'],
168
			) );
169
			return $condition;
170
		} );
171
	}
172
173
	/**