Passed
Push — master ( 992e52...dc2c5c )
by Georgi
03:52
created

UserSettingsJoint   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A link() 0 2 1
A group() 0 3 2
1
<?php 
2
3
namespace Epesi\Core\System\User\Settings\Integration\Joints;
4
5
use Epesi\Core\System\Integration\Modules\ModuleJoint;
6
use Epesi\Core\System\Integration\Modules\Concerns\HasLaunchButton;
7
use Epesi\Core\System\Integration\Modules\Concerns\HasOptions;
8
9
abstract class UserSettingsJoint extends ModuleJoint
10
{
11
	use HasOptions;
12
	use HasLaunchButton;
13
	
14
	/**
15
	 * Define group under which the settings are saved
16
	 * 
17
	 * @var string
18
	 */
19
	protected $group;
20
21
	/**
22
	 * Get the group under which settings are saved
23
	 *
24
	 * @return string
25
	 */
26
	public function group()
27
	{
28
		return $this->group?: static::class;
29
	}
30
	
31
	/**
32
	 * Define the settings view
33
	 */
34
	public function link() {
35
		return ['user.settings', 'edit', static::class];
36
	}
37
}