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

@@ 203-215 (lines=13) @@
200
	/**
201
	 * {@inheritdoc}
202
	 */
203
	protected function normalize()
204
	{
205
		$this->metaboxes = [];
206
		foreach( $this->app->config['settings'] as $id => $metabox ) {
207
			$defaults = [
208
				'condition' => [],
209
				'fields' => [],
210
				'id' => $id,
211
				'slug' => $id,
212
			];
213
			$this->metaboxes[] = $this->normalizeThis( $metabox, $defaults, $id );
214
		}
215
	}
216
217
	/**
218
	 * @param string $name