custom   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A get_name() 0 3 1
A prep_field() 0 4 2
1
<?php
2
/**
3
 *
4
 * @package sitemaker
5
 * @copyright (c) 2019 Daniel A. (blitze)
6
 * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
7
 *
8
 */
9
10
namespace blitze\sitemaker\services\blocks\config\fields;
11
12
/**
13
 * @package sitemaker
14
 */
15
class custom extends cfg_field_base
16
{
17
	/**
18
	 * @inheritdoc
19
	 */
20
	public function get_name()
21
	{
22
		return 'custom';
23
	}
24
25
	/**
26
	 * {@inheritdoc}
27
	 */
28
	public function prep_field(array &$vars, array &$type, $field, array $db_settings)
29
	{
30
		$vars['function'] = (!empty($vars['function'])) ? $vars['function'] : '';
31
		$type[0] = 'custom';
32
	}
33
}
34