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

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