Passed
Push — master ( f6be53...47fb7a )
by Rias
03:42
created

ContactFormExtensionsVariable::recaptcha()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 0
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
/**
3
 * schema plugin for Craft CMS 3.x.
4
 *
5
 * A fluent builder Schema.org types and ld+json generator based on Spatie's schema-org package
6
 *
7
 * @link      https://rias.be
8
 *
9
 * @copyright Copyright (c) 2017 Rias
10
 */
11
12
namespace rias\contactformextensions\variables;
13
14
use rias\contactformextensions\ContactFormExtensions;
15
16
/**
17
 * @author    Rias
18
 *
19
 * @since     1.0.0
20
 */
21
class ContactFormExtensionsVariable
22
{
23
    public function name()
24
    {
25
        return ContactFormExtensions::$plugin->name;
26
    }
27
28
    public function recaptcha()
29
    {
30
        if (ContactFormExtensions::$plugin->settings->recaptcha) {
31
            return ContactFormExtensions::$plugin->contactFormExtensionsService->getRecaptcha()->render();
32
        }
33
34
        return '';
35
    }
36
}
37