Code Duplication    Length = 14-15 lines in 2 locations

src/MetaBox/MetaBox.php 1 location

@@ 100-114 (lines=15) @@
97
	/**
98
	 * {@inheritdoc}
99
	 */
100
	protected function normalize()
101
	{
102
		foreach( $this->app->config['meta_boxes'] as $id => $metabox ) {
103
			$defaults = [
104
				'condition' => [],
105
				'fields' => [],
106
				'id' => $id,
107
				'post_types' => [],
108
				'slug' => $id,
109
			];
110
			$this->metaboxes[] = $this->setDependencies(
111
				$this->normalizeThis( $metabox, $defaults, $id )
112
			);
113
		}
114
	}
115
116
	/**
117
	 * @param string $depends

src/Settings/Settings.php 1 location

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