Passed
Branch master (fbf0a6)
by Volodymyr
04:04
created

LayoutSettings   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getCaptchaSettings() 0 3 1
1
<?php
2
/**
3
 * Copyright (c) 2019. Volodymyr Hryvinskyi.  All rights reserved.
4
 * @author: <mailto:[email protected]>
5
 * @github: <https://github.com/hryvinskyi>
6
 */
7
8
declare(strict_types=1);
9
10
namespace Hryvinskyi\InvisibleCaptcha\Model;
11
12
use Hryvinskyi\InvisibleCaptcha\Helper\Config\General;
13
14
/**
15
 * Class LayoutSettings
16
 */
17
class LayoutSettings
18
{
19
    /**
20
     * @var General
21
     */
22
    private $config;
23
24
    /**
25
     * LayoutSettings constructor.
26
     *
27
     * @param General $config
28
     */
29
    public function __construct(
30
        General $config
31
    ) {
32
        $this->config = $config;
33
    }
34
35
    /**
36
     * Return captcha config for frontend
37
     * @return array
38
     */
39
    public function getCaptchaSettings()
40
    {
41
        return ['siteKey' => $this->config->getSiteKey()];
42
    }
43
}
44