Test Failed
Push — develop ( c0d6f9...325b33 )
by Paul
08:37
created

BricksSiteReviewsSummary::shortcode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace GeminiLabs\SiteReviews\Integrations\Bricks;
4
5
use GeminiLabs\SiteReviews\Contracts\ShortcodeContract;
6
use GeminiLabs\SiteReviews\Shortcodes\SiteReviewsSummaryShortcode;
7
8
class BricksSiteReviewsSummary extends BricksElement
9
{
10
    public function render()
11
    {
12
        if (!$this->elShortcode->hasVisibleFields($this->settings)) {
13
            $this->render_element_placeholder([
14
                'title' => esc_html_x('You have hidden all of the fields.', 'admin-text', 'site-reviews'),
15
            ]);
16
            return;
17
        }
18
        parent::render();
19
    }
20
21
    public static function shortcode(): ShortcodeContract
22
    {
23
        return glsr(SiteReviewsSummaryShortcode::class);
24
    }
25
}
26