Test Failed
Push — develop ( 6a684d...5c54e5 )
by Paul
08:51
created

RatingField   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A field_type() 0 3 1
A field_settings() 0 7 1
A field_title() 0 3 1
A field_icon() 0 3 1
1
<?php
2
3
namespace GeminiLabs\SiteReviews\Integrations\ProfilePress;
4
5
use ProfilePress\Core\Admin\SettingsPages\DragDropBuilder\FieldBase;
0 ignored issues
show
Bug introduced by
The type ProfilePress\Core\Admin\...agDropBuilder\FieldBase 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
7
class RatingField extends FieldBase
8
{
9
    public const HIGH_RATED = 'high-rated';
10
    public const LOW_RATED = 'low-rated';
11
12
    public function field_type()
13
    {
14
        return 'profile-rating';
15
    }
16
17
    public static function field_icon()
18
    {
19
        return '<span class="dashicons dashicons-star-filled"></span>';
20
    }
21
22
    public function field_title()
23
    {
24
        return esc_html_x('Rating', 'admin-text', 'site-reviews');
25
    }
26
27
    public function field_settings()
28
    {
29
        return [
30
            parent::GENERAL_TAB => [
31
                'label' => [
32
                    'label' => esc_html_x('Title', 'admin-text', 'site-reviews'),
33
                    'field' => self::INPUT_FIELD
34
                ]
35
            ]
36
        ];
37
    }
38
}
39