Code Duplication    Length = 14-15 lines in 2 locations

src/MetaBox.php 1 location

@@ 164-178 (lines=15) @@
161
	/**
162
	 * {@inheritdoc}
163
	 */
164
	protected function normalize()
165
	{
166
		foreach( $this->app->config['meta_boxes'] as $id => $metabox ) {
167
			$defaults = [
168
				'condition' => [],
169
				'fields' => [],
170
				'id' => $id,
171
				'post_types' => [],
172
				'slug' => $id,
173
			];
174
			$this->metaboxes[] = $this->setDependencies(
175
				$this->normalizeThis( $metabox, $defaults, $id )
176
			);
177
		}
178
	}
179
180
	/**
181
	 * @param mixed $conditions

src/Settings.php 1 location

@@ 246-259 (lines=14) @@
243
	/**
244
	 * {@inheritdoc}
245
	 */
246
	protected function normalize()
247
	{
248
		foreach( $this->app->config['settings'] as $id => $metabox ) {
249
			$defaults = [
250
				'condition' => [],
251
				'fields' => [],
252
				'id' => $id,
253
				'slug' => $id,
254
			];
255
			$this->metaboxes[] = $this->setDependencies(
256
				$this->normalizeThis( $metabox, $defaults, $id )
257
			);
258
		}
259
	}
260
261
	/**
262
	 * @param string $name