Code Duplication    Length = 13-14 lines in 2 locations

src/MetaBox.php 1 location

@@ 156-169 (lines=14) @@
153
	/**
154
	 * {@inheritdoc}
155
	 */
156
	protected function normalize()
157
	{
158
		$this->metaboxes = [];
159
		foreach( $this->app->config['meta_boxes'] as $id => $metabox ) {
160
			$defaults = [
161
				'condition' => [],
162
				'fields' => [],
163
				'id' => $id,
164
				'post_types' => [],
165
				'slug' => $id,
166
			];
167
			$this->metaboxes[] = $this->normalizeThis( $metabox, $defaults, $id );
168
		}
169
	}
170
171
	/**
172
	 * @param mixed $conditions

src/Settings.php 1 location

@@ 216-228 (lines=13) @@
213
	/**
214
	 * {@inheritdoc}
215
	 */
216
	protected function normalize()
217
	{
218
		$this->metaboxes = [];
219
		foreach( $this->app->config['settings'] as $id => $metabox ) {
220
			$defaults = [
221
				'condition' => [],
222
				'fields' => [],
223
				'id' => $id,
224
				'slug' => $id,
225
			];
226
			$this->metaboxes[] = $this->normalizeThis( $metabox, $defaults, $id );
227
		}
228
	}
229
230
	/**
231
	 * @param string $name