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

@@ 187-199 (lines=13) @@
184
	/**
185
	 * {@inheritdoc}
186
	 */
187
	protected function normalize()
188
	{
189
		$this->metaboxes = [];
190
		foreach( $this->app->config['settings'] as $id => $metabox ) {
191
			$defaults = [
192
				'condition' => [],
193
				'fields' => [],
194
				'id' => $id,
195
				'slug' => $id,
196
			];
197
			$this->metaboxes[] = $this->normalizeThis( $metabox, $defaults, $id );
198
		}
199
	}
200
201
	/**
202
	 * @param string $name