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

LayoutSettings::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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