Completed
Push — master ( 7ceac0...7f8a05 )
by Paras
17s
created

Role::singularLabel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Insenseanalytics\LaravelNovaPermission;
4
5
use Laravel\Nova\Resource;
0 ignored issues
show
Bug introduced by
The type Laravel\Nova\Resource was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Spatie\Permission\Models\Role as SpatieRole;
7
8
class Role extends Resource
9
{
10
	use RoleResourceTrait, TranslationHandelTrait;
11
12
	/**
13
	 * The model the resource corresponds to.
14
	 *
15
	 * @var string
16
	 */
17
	public static $model = SpatieRole::class;
18
19
	/**
20
	 * The single value that should be used to represent the resource when being displayed.
21
	 *
22
	 * @var string
23
	 */
24
	public static $title = 'name';
25
26
	/**
27
	 * The columns that should be searched.
28
	 *
29
	 * @var array
30
	 */
31
	public static $search = [
32
		'name',
33
	];
34
35
	/**
36
	 * Indicates if the resource should be displayed in the sidebar.
37
	 *
38
	 * @var bool
39
	 */
40
	public static $displayInNavigation = false;
41
42
	/**
43
	 * Get the displayable label of the resource.
44
	 *
45
	 * @return string
46
	 */
47
	public static function label()
48
	{
49
		return __('laravel-nova-permission::resources.Roles');
0 ignored issues
show
Bug introduced by
The function __ was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

49
		return /** @scrutinizer ignore-call */ __('laravel-nova-permission::resources.Roles');
Loading history...
50
	}
51
52
	/**
53
	 * Get the displayable singular label of the resource.
54
	 *
55
	 * @return string
56
	 */
57
	public static function singularLabel()
58
	{
59
		return __('laravel-nova-permission::resources.Role');
0 ignored issues
show
Bug introduced by
The function __ was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

59
		return /** @scrutinizer ignore-call */ __('laravel-nova-permission::resources.Role');
Loading history...
60
	}
61
}
62