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

RatingField::field_icon()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 1
c 1
b 0
f 1
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
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